Пример #1
0
 private void Edit()
 {
     if (this.IsFilter)
     {
         Filter filter = this.CurrentFilter;
         if (filter != null)
         {
             FormFilter flt = new FormFilter();
             if (flt.Show(Database, filter))
             {
                 this.treeObjects.SelectedNode.Text = filter.Name;
                 App.DataCollection.UpdateDataList();
             }
         }
     }
     else
     {
         Folder folder = this.CurrentFolder;
         if (folder != null)
         {
             FormFolder form = new FormFolder();
             form.Database = Database;
             if (form.Show(folder, this.CurrentCategory) != null)
             {
                 this.treeObjects.SelectedNode.Text = folder.Name;
                 App.DataCollection.UpdateDataList();
             }
         }
     }
 }
Пример #2
0
 private void ToolAddFolderClick(object sender, EventArgs e)
 {
     if (this.IsFilter)
     {
         FormFilter flt = new FormFilter();
         if (flt.Show(Database, null))
         {
             this.AddFilterNode(flt.Filter);
         }
     }
     else
     {
         FormFolder form = new FormFolder();
         form.Database = Database;
         Folder folder = form.Show(null, this.CurrentCategory);
         if (folder != null)
         {
             TreeNode node = this.CreateNode(folder);
             this.CreateGroupFolders(node, folder);
         }
     }
 }