Ejemplo n.º 1
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);
 }