Пример #1
0
        public override void LoadNodes()
        {
            base.LoadNodes();

            this.AddNode(NodeDisplayLevelType.Medium, new FeatureCollectionDefinitionNode(Farm, Farm.FeatureDefinitions));
            this.AddNode(NodeDisplayLevelType.Advanced, new SolutionCollectionNode(Farm));
            this.AddNode(NodeDisplayLevelType.Advanced, new ServerCollectionNode(Farm));
            this.AddNode(NodeDisplayLevelType.Advanced, new ServiceCollectionNode(Farm));
            this.AddNode(NodeDisplayLevelType.Advanced, new PropertyCollectionNode(Farm, Farm.Properties));

            SPMFarmHelper farmHelper = new SPMFarmHelper(Farm);

            this.AddNode(NodeDisplayLevelType.Simple, new WebServiceNode(SPMLocalization.GetString("ContentService"), farmHelper.ContentWebService, true));
            this.AddNode(NodeDisplayLevelType.Simple, new WebServiceNode(SPMLocalization.GetString("AdministrationService"), farmHelper.AdministrationWebService, false));
        }
Пример #2
0
        private void toolStripDBConnection_Click(object sender, EventArgs e)
        {
            OpenDBConnection connectionForm = new OpenDBConnection();
            SPMFarmHelper farmHelper = new SPMFarmHelper(Explorer.CurrentFarm);

            connectionForm.ConnectionString = "";// farmHelper.GetConnectionString();
            //contentService.Instances[0]
            DialogResult result = connectionForm.ShowDialog();
            if (result == DialogResult.OK)
            {
                SPFarm newFarm = SPFarm.Open(connectionForm.ConnectionString);

                Explorer.DisposeObjectModel();
                Explorer.CurrentFarm = newFarm;
                Explorer.Build();
            }
        }