示例#1
0
 private void OnNew(object sender, MouseButtonEventArgs e)
 {
     if (this.selectCategory != null)
     {
         AccountEditor aEditor = new AccountEditor();
         aEditor.Organ = this.selectCategory;
         aEditor.Show();
         aEditor.Closed += new EventHandler(aEditor_Closed);
     }
 }
示例#2
0
 private void OnProperty(object sender, MouseButtonEventArgs e)
 {
     if (this.dataAccounts.SelectedItems.Count > 0)
     {
         this.selectAccount = this.dataAccounts.SelectedItems[0] as Account;
         AccountEditor ad = new AccountEditor();
         ad.DataEntity = this.selectAccount;
         ad.Show();
         ad.Closed +=
             (s, e2) =>
         {
             if (ad.DialogResult ?? false)
             {
                 this.selectAccount.Name        = ad.Account.Name;
                 this.selectAccount.Description = ad.Account.Description;
             }
         };
     }
 }