Esempio n. 1
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 { }
     }
 }
Esempio n. 2
0
        private void Login_Click(object sender, EventArgs e)
        {
            var res = UnknownAPI.UVPN_Login(uBox.Text, pBox.Text);

            if (res.ToString().Contains("Successfully"))
            {
                UnknownVPN.ClientUI client = new UnknownVPN.ClientUI();
                client.Show();
                Hide();
            }
            else
            {
                UnknownAPI.Alert(res.ToString(), NotifyUI.enmType.Error);
            }
        }
Esempio n. 3
0
        private void LoginUI_Load(object sender, EventArgs e)
        {
            uBox.Text = Properties.Settings.Default.Username;
            pBox.Text = Properties.Settings.Default.password;

            if (Properties.Settings.Default.remember)
            {
                RememberMe.Toggled = true;
            }
            else
            {
                RememberMe.Toggled = false;
            }


            try { if (UnknownAPI.DriverCheck() == false)
                  {
                      Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"\drivers\softether.exe");
                  }
            } catch (Exception IO) { Console.WriteLine("Error: " + IO.Message); }
            var result = UnknownAPI.UpdateCheck();

            if (result.Item1)
            {
                using (var client = new WebClient())
                {
                    var downloadpath  = Path.GetTempFileName();
                    var executingpath = Assembly.GetExecutingAssembly().Location;
                    client.DownloadFile(result.Item2, downloadpath);
                    File.Move(executingpath, Path.GetTempFileName());
                    ZipFile.ExtractToDirectory(downloadpath, Path.GetDirectoryName(executingpath));
                    Process.Start(executingpath);
                    Application.Exit();
                }
            }
        }
Esempio n. 4
0
        private void updatServerList_Click(object sender, EventArgs e)
        {
            Alert("Updating server list..", NotifyUI.enmType.Info);

            Servers.Text = UnknownAPI.UpdateServers();
        }
Esempio n. 5
0
 public VoidOutput(UnknownAPI api)
 {
     this.Api = api;
 }
 private void ResetBTN_Click(object sender, EventArgs e)
 {
     UnknownAPI.UVPN_PwReset(uBox.Text, opBox.Text, npBox.Text);
 }
 private void lgbtn_Click(object sender, EventArgs e)
 {
     UnknownAPI.UVPN_Register(uBox.Text, pBox.Text, eBox.Text, UnknownAPI.RandomString(8), tBox.Text);
 }