Ejemplo n.º 1
0
 private void BuildPackageTree(Package package)
 {
     Invoke(new Action(() =>
     {
         if (_tree != null)
         {
             ((IDisposable)_tree).Dispose();
         }
         _tree = new TreeViewCommandTree(treeCommands);
         _tree.LoadTree(package.GetBody());
         _tree.ExpandAll();
         _tree.SelectCommandTreeNode += TreeSelectCommandTreeNode;
     }));
     SetCurrentStatus("Пакет загружен");
 }
Ejemplo n.º 2
0
 private void BuildPackageTree(Package package)
 {
     Invoke(new Action(() =>
     {
         if (_tree != null)
         {
             ((IDisposable)_tree).Dispose();
         }
         _tree = new TreeViewCommandTree(treeCommands);
         _tree.LoadTree(package.GetBody());
         _tree.ExpandAll();
         _tree.SelectCommandTreeNode += TreeSelectCommandTreeNode;
     }));
     SetCurrentStatus("Пакет загружен");
 }
Ejemplo n.º 3
0
 private void menuItemNewPackage_Click(object sender, EventArgs e)
 {
     try
     {
         PackageBody body = new PackageBody();
         body.Command = new CommandSequence();
         if (_tree != null)
         {
             ((IDisposable)_tree).Dispose();
         }
         _tree = new TreeViewCommandTree(treeCommands);
         _tree.LoadTree(body);
         _tree.ExpandAll();
         _tree.SelectCommandTreeNode += new SelectCommandTreeNodeDelegate(TreeSelectCommandTreeNode);
         _packageFilePath             = null;
         SetFilePathStatus(_packageFilePath);
     }
     catch (Exception ex)
     {
         Win32Util.ShowError(this, "Не удалось создать новый пакет. Описание ошибки приведено далее. \r\n" + ex.Message + "\r\n" + ex.StackTrace);
     }
 }
Ejemplo n.º 4
0
 private void menuItemNewPackage_Click(object sender, EventArgs e)
 {
     try
     {
         PackageBody body = new PackageBody();
         body.Command = new CommandSequence();
         if (_tree != null)
         {
             ((IDisposable)_tree).Dispose();
         }
         _tree = new TreeViewCommandTree(treeCommands);
         _tree.LoadTree(body);
         _tree.ExpandAll();
         _tree.SelectCommandTreeNode += new SelectCommandTreeNodeDelegate(TreeSelectCommandTreeNode);
         _packageFilePath = null;
         SetFilePathStatus(_packageFilePath);
     }
     catch (Exception ex)
     {
         Win32Util.ShowError(this, "Не удалось создать новый пакет. Описание ошибки приведено далее. \r\n" + ex.Message + "\r\n" + ex.StackTrace);
     }
 }