private void AddEditForm_Load(object sender, EventArgs e) { getRes = new GetResolution(); lstAccounts.SelectedIndex = 0; lstCharacter.SelectedIndex = 0; drpResolution.DataSource = getRes.list; drpRealm.DataSource = Options.GetRealms(); if (account != null) { try { txtName.Text = account.Name; txtEmail.Text = account.Email; txtPassword.Text = account.Password; chkMultiple.Checked = account.Multiple; if (account.Multiple) { if (account.AccountNames == null) { for (int i = 2; i < account.NumberAccounts; ++i) { numAccounts.Value += 1; } } else { numAccounts.Value = account.NumberAccounts; lstAccounts.Items.Clear(); lstAccounts.Items.AddRange(account.AccountNames); } lstAccounts.SelectedIndex = account.SelectedAccount; } chkWindowed.Checked = account.Windowed; drpResolution.SelectedItem = account.Resolution; chkLowDetail.Checked = account.LowDetail; chkRealm.Checked = account.SetRealm; drpRealm.SelectedItem = account.Realm; chkCharacter.Checked = account.SetCharacter; lstCharacter.SelectedIndex = account.CharacterSlot; chkEnterWorld.Checked = account.EnterWorld; } catch (Exception) { } } }