public void UnFreeze() { lock (freezeLock) { Flashlight.InitCamera(); secondsTimer_Tick(null, null); SecondsTimer.Start(); MusicView.XNAFrameworkDispatcher.Start(); } }
private void SessionState_Change(Session.SessionState state) { switch (state) { case Session.SessionState.Started: mTimer.Start(); break; case Session.SessionState.Paused: mTimer.Pause(); break; } }
private void btnStart_Click(object sender, EventArgs e) { fileName = tbFileName.Text; //configure all the serial settings and getting preferences mySerialPort = new SerialPort(COM); mySerialPort.BaudRate = BAUD; mySerialPort.Parity = Parity.None; mySerialPort.StopBits = StopBits.One; mySerialPort.DataBits = 8; mySerialPort.Handshake = Handshake.None; logID = tbLogID.Text; //binding the event mySerialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler); //opening the serialport and turn logging on mySerialPort.Open(); lblMessage.Text = "Log Started"; btnStart.Enabled = false; btnStop.Enabled = true; logging = true; fileclose = false; SecondsTimer.Start(); //disableing preferences for reasons: spacebar is used to start/stop logging, otherwise you would type in the boxes btnSearchCom.Enabled = false; cbCom.Enabled = false; cbBaudRate.Enabled = false; btnLocation.Enabled = false; tbFileName.Enabled = false; tbLogID.Enabled = false; cbTimer.Enabled = false; }
private void StartTimer() { _downloadTimer = new SecondsTimer(userData.GetJumpHashTime()); _downloadTimer.Start(); _downloadTimer.TimeOutEvent += OnTimerInvoked; }