コード例 #1
0
ファイル: AccountList.xaml.cs プロジェクト: publicwmh/eas
 private void miAdd_Click(object sender, RoutedEventArgs e)
 {
     if (this.Tree.SelectedItem != null)
     {
         TreeItem          item    = this.Tree.SelectedItem as TreeItem;
         AccountTypeEditor tEditor = new AccountTypeEditor();
         tEditor.ParentOrgan = item.Tag as Organization;
         tEditor.Show();
         tEditor.Closed += new EventHandler(tEditor_Closed);
     }
 }
コード例 #2
0
ファイル: AccountList.xaml.cs プロジェクト: publicwmh/eas
 private void miProp_Click(object sender, RoutedEventArgs e)
 {
     if (this.Tree.SelectedItem != null)
     {
         TreeItem          item    = this.Tree.SelectedItem as TreeItem;
         AccountTypeEditor tEditor = new AccountTypeEditor();
         tEditor.Organization = item.Tag as Organization;
         tEditor.Show();
         tEditor.Closed += (s, e2) =>
         {
             item.Name = tEditor.Organization.Name;
         };
     }
 }
コード例 #3
0
ファイル: AccountList.xaml.cs プロジェクト: publicwmh/eas
        void tEditor_Closed(object sender, EventArgs e)
        {
            AccountTypeEditor ate = sender as AccountTypeEditor;
            bool?dr = ate.DialogResult;

            if (dr.HasValue && (dr == true))
            {
                int count = this.categoryList.Where(p => p.Name == ate.Organization.Name).Count();
                if (count < 1)
                {
                    this.categoryList.Add(ate.Organization);
                }
            }
        }