Beispiel #1
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();
            }
        }
Beispiel #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();
            }
        }