Change Program.cs in testapp
This commit is contained in:
parent
ce0a287e4e
commit
cf0a7c630d
@ -16,14 +16,16 @@ while(apiKey is null || apiKey.Length < 1)
|
|||||||
OpenShockHttp openShockHttp = new (apiKey, logger: logger);
|
OpenShockHttp openShockHttp = new (apiKey, logger: logger);
|
||||||
OpenShockShocker shocker = openShockHttp.GetShockers().First();
|
OpenShockShocker shocker = openShockHttp.GetShockers().First();
|
||||||
shocker.Control(ControlAction.Vibrate, 20, 1000);
|
shocker.Control(ControlAction.Vibrate, 20, 1000);
|
||||||
|
Thread.Sleep(1100);
|
||||||
|
|
||||||
|
/*
|
||||||
File.WriteAllText("shockers.json", JsonConvert.SerializeObject(shocker));
|
File.WriteAllText("shockers.json", JsonConvert.SerializeObject(shocker));
|
||||||
OpenShockShocker deserialized = JsonConvert.DeserializeObject<OpenShockShocker>(File.ReadAllText("shockers.json"), new ApiJsonConverter())!;
|
OpenShockShocker deserialized = JsonConvert.DeserializeObject<OpenShockShocker>(File.ReadAllText("shockers.json"), new ApiJsonConverter())!;
|
||||||
Thread.Sleep(1100); //Wait for previous to end
|
Thread.Sleep(1100); //Wait for previous to end
|
||||||
deserialized.Control(ControlAction.Vibrate, 20, 1000);
|
deserialized.Control(ControlAction.Vibrate, 20, 1000);
|
||||||
shocker.Dispose();
|
shocker.Dispose();
|
||||||
deserialized.Dispose();
|
deserialized.Dispose();
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#pragma warning disable CA1416
|
#pragma warning disable CA1416
|
||||||
|
Loading…
Reference in New Issue
Block a user