Пример #1
0
        public static void AddGroupDialog(TreeNode suggestedParentNode)
        {
            if (!ServerTree.Instance.AnyOpenedEditableFiles())
            {
                NotifyUserFileNeeded();
                return;
            }
            GroupBase             parentGroupForGroupAdd = GetParentGroupForGroupAdd(suggestedParentNode);
            GroupPropertiesDialog groupPropertiesDialog  = GroupPropertiesDialog.NewAddDialog(parentGroupForGroupAdd);

            if (groupPropertiesDialog == null)
            {
                FormTools.InformationDialog(info1);
            }
            else
            {
                using (groupPropertiesDialog)
                {
                    if (groupPropertiesDialog.ShowDialog() == DialogResult.OK)
                    {
                        ServerTree.Instance.SelectedNode = Group.Create(groupPropertiesDialog);
                    }
                }
            }
        }
Пример #2
0
 public override void DoPropertiesDialog(Form parentForm, string activeTabName)
 {
     using (GroupPropertiesDialog groupPropertiesDialog = GroupPropertiesDialog.NewPropertiesDialog(this, parentForm))
     {
         groupPropertiesDialog.SetActiveTab(activeTabName);
         if (groupPropertiesDialog.ShowDialog() == DialogResult.OK)
         {
             UpdateSettings(groupPropertiesDialog);
             ServerTree.Instance.OnNodeChanged(this, ChangeType.PropertyChanged);
         }
     }
 }