Beispiel #1
0
        public override void loadData()
        {
            this.Show();
            this.Enabled = false;
            this.Cursor = Cursors.WaitCursor;

            if (!WorkingDefinition.IsClientObjectModel)
            {
                List<string> domains = AD.GetDomainList();

                foreach (string domain in domains)
                {
                    ComboboxItem item = new ComboboxItem();
                    item.Text = domain;
                    item.Value = domain;
                    cboDomains.Items.Add(item);
                }
                cboDomains.Text = domains[0];

                List<string> subdomains = AD.GetDomainList2();

                foreach (string domain in subdomains)
                {
                    ComboboxItem item = new ComboboxItem();
                    item.Text = domain;
                    item.Value = domain;
                    cboDomains.Items.Add(item);
                }
            }
            else
            {
                label2.Visible = false;
                cboOrganizationalUnit.Visible = false;
                label1.Visible = false;
                cboDomains.Enabled = false;
                cboDomains.Visible = false;
            }

            chkGenerateUsers.Checked = WorkingDefinition.GenerateUsersAndSecurityGroupsInDirectory;
            trackNumberOfUsers.Value = WorkingDefinition.NumberOfUsersToCreate;
            trackNumberOfSecGroups.Value = WorkingDefinition.NumberOfSecurityGroupsToCreate;
            trackMaxNumberOfUsersInSecurityGroups.Value = WorkingDefinition.MaxNumberOfUsersInCreatedSecurityGroups;
            var serverDefinition = WorkingDefinition as ServerGeneratorDefinition;
            if (serverDefinition != null)
            {
                if (!string.IsNullOrEmpty(serverDefinition.ADDomainName))
                {
                    cboDomains.Text = serverDefinition.ADDomainName;
                }
                cboOrganizationalUnit.Text = serverDefinition.ADOrganizationalUnit;
            }
            else
            {
                cboOrganizationalUnit.Enabled = false;
            }

            this.Show();
            this.Enabled = true;
            this.Cursor = Cursors.Default;
        }
Beispiel #2
0
        private void initTemplates()
        {
            string t = "Team Site;Blank Site;Global template;Document Workspace;Basic Meeting Workspace;Blank Meeting Workspace;Decision Meeting Workspace;Social Meeting Workspace;Multipage Meeting Workspace;Central Admin Site;Wiki Site;Blog;Group Work Site;Tenant Admin Site;App Template;App Catalog Site;Access Services Site;Access Services Site Internal;Access Services Site;Document Center;Developer Site;Academic Library;eDiscovery Center;eDiscovery Case;(obsolete) Records Center;Records Center;Shared Services Administration Site;PerformancePoint;Business Intelligence Center;SharePoint Portal Server Site;SharePoint Portal Server Personal Space;Storage And Social SharePoint Portal Server Personal Space;Storage Only SharePoint Portal Server Personal Space;Social Only SharePoint Portal Server Personal Space;Empty SharePoint Portal Server Personal Space;Personalization Site;Contents area Template;Topic area template;News Site;Publishing Site;Publishing Site;Press Releases Site;Publishing Site with Workflow;News Site;Site Directory;Community area template;Report Center;Collaboration Portal;Enterprise Search Center;Profiles;Publishing Portal;My Site Host;Enterprise Wiki;Project Site;Product Catalog;Community Site;Community Portal;Basic Search Center;Basic Search Center;Visio Process Repository";
            string[] templates = t.Split(';');

            foreach (string template in templates)
            {
                ComboboxItem item = new ComboboxItem();
                item.Text = template;
                item.Value = template;
                cboSiteTemplates.Items.Add(item);
            }
        }
        private void loadWebApplications()
        {
            try
            {
                var helper = SPDGDataHelper.Create(WorkingDefinition);

                foreach (var webApplication in helper.GetWebApplications())
                {
                    ComboboxItem item = new ComboboxItem();
                    item.Text = webApplication.Name;
                    item.Value = webApplication.Id;
                    cboUseExistingWebApp.Items.Add(item);
                }
            }
            catch(Exception ex )
            {
                Errors.Log(ex);
            }
        }
Beispiel #4
0
        private void fillOUs()
        {
            this.Enabled = false;
            this.Cursor = Cursors.WaitCursor;

            List<string> ous = AD.ListOU(cboDomains.Text);
            cboOrganizationalUnit.Items.Clear();
            foreach (string ou in ous)
            {
                ComboboxItem item = new ComboboxItem();
                item.Text = ou;
                item.Value = ou;
                cboOrganizationalUnit.Items.Add(item);
            }

            this.Enabled = true;
            this.Cursor = Cursors.Default;
        }
Beispiel #5
0
        private void loadSiteCollections()
        {
            var helper = SPDGDataHelper.Create(WorkingDefinition);

            ServerGeneratorDefinition serverDefinition = WorkingDefinition as ServerGeneratorDefinition;
            IEnumerable<string> siteCollections;
            if (serverDefinition == null)
            {
                siteCollections = helper.GetAllSiteCollections(Guid.Empty);
            }
            else if (serverDefinition.UseExistingWebApplication != string.Empty)
            {
                siteCollections = helper.GetAllSiteCollections(new Guid(serverDefinition.UseExistingWebApplication));
            }
            else
            {
                return;
            }
            foreach (var siteColl in siteCollections)
            {
                ComboboxItem item = new ComboboxItem();
                item.Text = siteColl;
                item.Value = siteColl;
                cboSiteCollection.Items.Add(item);
            }
        }