static void WriteInteractiveState() { switch (prgState) { case ProgramState.H0_G0_I0: StateInstruction.writeInteractiveState(false); StateInstruction.writeHumanDetect(false); break; case ProgramState.H1_G0_I0: StateInstruction.writeInteractiveState(false); StateInstruction.writeHumanDetect(true); if (ConfigParams.EnableSound) { StateInstruction.PlaySound(AssetSource.wavH1G0I0); } break; case ProgramState.H1_G1_I0: StateInstruction.writeInteractiveState(false); break; case ProgramState.H1_G1_I1: StateInstruction.writeInteractiveState(true); if (ConfigParams.EnableSound) { StateInstruction.PlaySound(AssetSource.wavH1G1I1); } break; } }
//On zoom out event void OnZoomOut() { Trace.WriteLine("Zoom Out"); //Sound alert StateInstruction.PlaySound(AssetSource.beep); //============================================================== //Write action to run.txt file try { using (StreamWriter sr2 = new StreamWriter("C:\\GDS_Controller\\GUI_Controller\\Launcher.DesktopApp.txt", false)) { sr2.WriteLine("home"); } } catch (Exception e) { Trace.WriteLine(e.ToString()); } //============================================================== //Reset timer EnableZoom = false; ResetZoom(gestureResetTime); }