Beispiel #1
0
 private void CloseApplication()
 {
     Hide();
     notify.Visible = false;
     ActiveController.SoftKill(true);
     Environment.Exit(0);
 }
Beispiel #2
0
 private void OpenVpnSwitch(string config, bool ask = true)
 {
     if (ask && ActiveController.IsRunning &&
         (!ActiveController.IsRunning ||
          MessageBox.Show("Do you want to disconnect from the current server and connect to this one?",
                          "Reconnect", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes))
     {
         return;
     }
     if (ActiveController.IsRunning)
     {
         ActiveController.SoftKill(true);
     }
     ActiveController.Run(config, InternalData.SettingsGrid.Username, InternalData.SettingsGrid.Password);
 }
Beispiel #3
0
 private void functionButton_Click(object sender, EventArgs e)
 {
     if (ActiveController.IsRunning)
     {
         ActiveController.SoftKill();
     }
     else
     {
         if (serverView.SelectedItems.Count > 0)
         {
             ConnectToSelected();
         }
         else
         {
             AutoConnect();
         }
     }
 }
Beispiel #4
0
 private void disconnectToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ActiveController.SoftKill();
 }