Exemplo n.º 1
0
 private void BtnClose_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         // Save position
         Properties.Settings.Default.WindowTop    = Top;
         Properties.Settings.Default.WindowLeft   = Left;
         Properties.Settings.Default.WindowHeight = Height;
         Properties.Settings.Default.Save();
         // Stop
         tugManager.Disable();
         simConnectManager.Stop();
         listener.UnHookKeyboard();
     }
     catch (Exception)
     {
     }
     Close();
 }
Exemplo n.º 2
0
 public void ExitApp()
 {
     try
     {
         // Save position
         if (WindowState == WindowState.Normal)
         {
             Properties.Settings.Default.WindowTop    = Top;
             Properties.Settings.Default.WindowLeft   = Left;
             Properties.Settings.Default.WindowHeight = Height;
         }
         Properties.Settings.Default.TugSpeed = tugManager.SpeedFactor;
         Properties.Settings.Default.Save();
         // Stop
         tugManager.Disable();
         simConnectManager.Stop();
         listener.UnHookKeyboard();
     }
     catch (Exception)
     {
     }
     Close();
 }