Exemple #1
0
        private void button_addAccount_Click(object sender, EventArgs e)
        {
            Logging.OnLogMessage(this, "SelectCharacter.Add(): Launching an edit form for a new account.");
            EditCharacter f_EC = new EditCharacter();

            f_EC.CharacterEdited += new EventHandler(f_EC_CharacterEdited);
            f_EC.Show();
        }
Exemple #2
0
 /* Edit an existing account */
 private void button_editAccount_Click(object sender, EventArgs e)
 {
     if (listBox_accounts.SelectedItem != null)
     {
         using (FileStream fs = new FileStream(listBox_accounts.SelectedItem.ToString(), FileMode.Open))
         {
             XmlSerializer       xs   = new XmlSerializer(typeof(Settings));
             Forms.EditCharacter f_EC = new EditCharacter((Settings)xs.Deserialize(fs));
             f_EC.CharacterEdited += new EventHandler(f_EC_CharacterEdited);
             Logging.OnLogMessage(this, "SelectCharacter.Add(): Launching an edit form for selected account.");
             f_EC.Show();
         }
     }
 }