Exemplo n.º 1
0
        private void AddAccountButton_Click(object sender, EventArgs e)
        {
            AddAccountForm form = new AddAccountForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                AccountList.Add(form.AccountName + ";" + form.Password);
                statusLabel.Text = "Un compte a été ajouté au domaine \"" + ((Domain)DomainListbox.SelectedValue).Name + "\"";
                EnableAccountButtons();
                UnsavedModifications = true;
            }
        }
Exemplo n.º 2
0
        private void ModAccountButton_Click(object sender, EventArgs e)
        {
            string item = (string)AccountListbox.SelectedValue;

            string[] values = item.Split(';');

            AddAccountForm form = new AddAccountForm(values[0], values[1], true);

            if (form.ShowDialog() == DialogResult.OK)
            {
                var listItem = AccountList.IndexOf(item);
                AccountList[listItem] = form.AccountName + ";" + form.Password;
                statusLabel.Text      = "Un compte du domaine \"" + ((Domain)DomainListbox.SelectedValue).Name + "\" a été modifié";
                UnsavedModifications  = true;
            }
        }