public Login(MainForm mf) { this.mf = mf; if (Settings.Default.lastusers == null) { Settings.Default.lastusers = new MCLauncherLibrary.SerializableStringDictionary(); Settings.Default.Save(); } InitializeComponent(); rememberBox.Checked = Settings.Default.remember; this.AcceptButton = loginButton; foreach (String key in Settings.Default.lastusers.Keys) { userNameBox.AutoCompleteCustomSource.Add(key); userNameBox.Items.Add(key); } if (userNameBox.Items.Contains(Settings.Default.username)) { userNameBox.SelectedItem = Settings.Default.username; } try{ //Fix for Mono ServicePointManager.CertificatePolicy = new CertValidator(); }catch(Exception){} }
public DownloadManager(MainForm mf) { InitializeComponent(); this.mf = mf; Dictionary<string, string> list = new Dictionary<string, string>(); String result = Util.excutePost("http://minecraft.digiex.org/jars.php", "net=true"); if (result == null) { Console.WriteLine("Can't get the jar list"); //loginForm.setNoNetwork(); //return; } else { String[] lines = result.Split(new Char[] { '\n' }); foreach (String line in lines) { String[] values = line.Split(new Char[] { '|' }); list.Add(values[0], values[1]); } } listBox1.DataSource = new BindingSource(list, null); listBox1.DisplayMember = "Value"; listBox1.ValueMember = "Key"; }
public Login(MainForm mf) { this.mf = mf; InitializeComponent(); userNameBox.Text = Properties.Settings.Default.username; rememberBox.Checked = Properties.Settings.Default.remember; this.AcceptButton = loginButton; String cryptedPass = Properties.Settings.Default.password; if (cryptedPass.Length > 0) { try { this.passwordBox.Text = Crypto.DecryptStringAES(cryptedPass, Environment.UserName + "isashark"); } catch (Exception ex) { Console.WriteLine("Could not decrypt the password: " + ex.Message); } } }
public Login(MainForm mf) { this.mf = mf; if (Settings.Default.lastusers == null) { Settings.Default.lastusers = new MCLauncherLibrary.SerializableStringDictionary(); Settings.Default.Save(); } InitializeComponent(); rememberBox.Checked = Settings.Default.remember; this.AcceptButton = loginButton; foreach (String key in Settings.Default.lastusers.Keys) { userNameBox.AutoCompleteCustomSource.Add(key); userNameBox.Items.Add(key); } if (userNameBox.Items.Contains(Settings.Default.username)) { userNameBox.SelectedItem = Settings.Default.username; } }