Пример #1
0
        private void connectButton_Click_1(object sender, RoutedEventArgs e)
        {
            if (_lt != null)
            {
                _lt.Stop(true);
                _lt.Dispose();
                _lt = null;

                listBox1.Items.Clear();
            }

            _lt = new LiveTiming(user.Text, password.Password, false);
            _lt.CarMessageHandler     += _lt_CarMessageHandler;
            _lt.SystemMessageHandler  += _lt_SystemMessageHandler;
            _lt.ControlMessageHandler += _lt_ControlMessageHandler;
            _lt.StartThread();
        }
Пример #2
0
 private void StopClient()
 {
     if (_lt != null)
     {
         _lt.Stop(true);
         _lt.Dispose();
         _lt = null;
     }
 }
Пример #3
0
 private void ConsoleCancelKeyPress(object sender, ConsoleCancelEventArgs e)
 {
     Log.Info("Caught ctrl+c, exiting application.");
     _lt.Stop(false);
 }