Beispiel #1
0
        public static SmartGroupPropertiesDialog NewPropertiesDialog(SmartGroup group, Form parentForm)
        {
            SmartGroupPropertiesDialog smartGroupPropertiesDialog = new SmartGroupPropertiesDialog(group, group.Text + " Smart Group Properties", "OK", parentForm);

            smartGroupPropertiesDialog.CreateControls(group);
            smartGroupPropertiesDialog.PropertiesPage.PopulateParentDropDown(group, group.Parent as GroupBase);
            return(smartGroupPropertiesDialog);
        }
Beispiel #2
0
        public static SmartGroupPropertiesDialog NewAddDialog(GroupBase parent)
        {
            SmartGroup smartGroup = SmartGroup.CreateForAdd();
            SmartGroupPropertiesDialog smartGroupPropertiesDialog = new SmartGroupPropertiesDialog(smartGroup, "Add Smart Group", "Add", null);

            if (parent != null && !parent.CanAddGroups())
            {
                parent = null;
            }
            smartGroupPropertiesDialog.CreateControls(smartGroup);
            if (!smartGroupPropertiesDialog.PropertiesPage.PopulateParentDropDown(null, parent))
            {
                smartGroupPropertiesDialog.Dispose();
                return(null);
            }
            return(smartGroupPropertiesDialog);
        }