Esempio n. 1
0
        public static GroupPropertiesDialog NewPropertiesDialog(Group group, Form parentForm)
        {
            GroupPropertiesDialog groupPropertiesDialog = new GroupPropertiesDialog(group, group.Text + " Group Properties", "OK", parentForm);

            groupPropertiesDialog.CreateControls(group);
            groupPropertiesDialog.PropertiesPage.PopulateParentDropDown(group, group.Parent as GroupBase);
            return(groupPropertiesDialog);
        }
Esempio n. 2
0
        public static GroupPropertiesDialog NewAddDialog(GroupBase parent)
        {
            Group group = Group.CreateForAddDialog();
            GroupPropertiesDialog groupPropertiesDialog = new GroupPropertiesDialog(group, "Add Group", "Add", null);

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