예제 #1
0
파일: MainForm.cs 프로젝트: keutmann/SPM
        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();
            }
        }
예제 #2
0
파일: MainForm.cs 프로젝트: lucaslra/SPM
        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();
            }
        }