Ejemplo n.º 1
0
 private void closeBTN_Click(object sender, EventArgs e)
 {
     try
     {
         if (eR_Toggle1.Toggled)
         {
             UnknownAPI.Disconnect(ipBox.Text);
         }
         if (!atkbtn.Text.Contains("Connect"))
         {
             UnknownAPI.Disconnect(atkbtn.Tag.ToString());
         }
         //settiing changed
         atkbtn.Text = "       Connect";
         sname.Text  = "• Server name: ";
         status.Text = "Status: Disconnected!";
         Alert("You have been logged out!", NotifyUI.enmType.Info);
         var Login = new UnknownVPN.LoginUI();
         Login.Show();
         Close();
     }
     catch (Exception LOL)
     {
         Console.Write(LOL.Message);
     }
 }
Ejemplo n.º 2
0
 private void vpnCommand(string sList, string vpn_CMD, string conStatus, string btnText, string alertText, Size serList, Point serListz, bool isCustom)
 {
     atkbtn.Text = btnText;
     if (vpn_CMD == "AccountDisconnect")
     {
         UnknownAPI.Disconnect((atkbtn.Tag as ServerObject).SoftetherConnectionName);
     }
     else
     {
         UnknownAPI.Connect(sList);
     }
     status.Text = "Status: " + conStatus;
     Alert(alertText + " please wait...", NotifyUI.enmType.Info);
     pictureBox11.BackgroundImageLayout = ImageLayout.Stretch;
     if (isCustom)
     {
         sname.Text = "• Server name: Custom Server";
         pictureBox11.BackgroundImage = null;
     }
     else
     {
         sname.Text = "• Server name: " + ServerList.Text;
         try
         {
             pictureBox11.BackgroundImage = vpnFlags.Images[(atkbtn.Tag as ServerObject).RegionCode];
         }
         catch { }
     }
 }