Exemple #1
0
        private void selectAccount(Account acc)
        {
            this.selectedAccount = acc;
            selectAlert(null);

            this.listModules.Items.Clear();

            if (acc == null)
            {
                this.textCharname.Text = "";
                this.checkEnabled.Checked = false;
                return;
            }

            textCharname.Text = acc.Charname;
            this.checkEnabled.Checked = acc.Enabled;
            foreach(AlertInterface alert in acc.alertModules)
            {
                ListViewItem newItem = new ListViewItem(alert.GetName());
                newItem.SubItems.Add(alert.Enabled.ToString());
                newItem.SubItems.Add(alert.GetDescription());
                newItem.Tag = alert;
                listModules.Items.Add(newItem);
            }

            refreshGui();
        }
Exemple #2
0
 private void buttonAddAccount_Click(object sender, EventArgs e)
 {
     Account newAccount = new Account();
     newAccount.Charname = "New Account";
     settings.Accounts.Add(newAccount);
     //this.selectAccount(newAccount);
     refreshAccounts();
     refreshGui();
 }