예제 #1
0
        public static void AddSmartGroupDialog(TreeNode suggestedParentNode)
        {
            if (!ServerTree.Instance.AnyOpenedEditableFiles())
            {
                NotifyUserFileNeeded();
                return;
            }
            GroupBase parentGroupForGroupAdd = GetParentGroupForGroupAdd(suggestedParentNode);
            SmartGroupPropertiesDialog smartGroupPropertiesDialog = SmartGroupPropertiesDialog.NewAddDialog(parentGroupForGroupAdd);

            if (smartGroupPropertiesDialog == null)
            {
                FormTools.InformationDialog(info1);
            }
            else
            {
                using (smartGroupPropertiesDialog)
                {
                    if (smartGroupPropertiesDialog.ShowDialog() == DialogResult.OK)
                    {
                        ServerTree.Instance.SelectedNode = SmartGroup.Create(smartGroupPropertiesDialog);
                    }
                }
            }
        }
예제 #2
0
 public sealed override void DoPropertiesDialog(Form parentForm, string activeTabName)
 {
     using (SmartGroupPropertiesDialog smartGroupPropertiesDialog = SmartGroupPropertiesDialog.NewPropertiesDialog(this, parentForm))
     {
         smartGroupPropertiesDialog.SetActiveTab(activeTabName);
         if (smartGroupPropertiesDialog.ShowDialog() == DialogResult.OK)
         {
             UpdateSettings(smartGroupPropertiesDialog);
             Refresh();
         }
     }
 }