Ejemplo n.º 1
0
 private void CloseApplication()
 {
     Hide();
     notify.Visible = false;
     ActiveController.SoftKill(true);
     Environment.Exit(0);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 private void functionButton_Click(object sender, EventArgs e)
 {
     if (ActiveController.IsRunning)
     {
         ActiveController.SoftKill();
     }
     else
     {
         if (serverView.SelectedItems.Count > 0)
         {
             ConnectToSelected();
         }
         else
         {
             AutoConnect();
         }
     }
 }
Ejemplo n.º 4
0
 private void disconnectToolStripMenuItem_Click(object sender, EventArgs e)
 {
     ActiveController.SoftKill();
 }