コード例 #1
0
ファイル: MainForm.cs プロジェクト: tbienvenu/XrmToolBox
        private void ApplyConnectionToTabs()
        {
            var tabs = tabControl1.TabPages.Cast <TabPage>().Where(tab => tab.TabIndex != 0).ToList();

            var tcu = new TabConnectionUpdater(tabs)
            {
                StartPosition = FormStartPosition.CenterParent
            };

            if (tcu.ShowDialog() == DialogResult.OK)
            {
                foreach (TabPage tab in tcu.SelectedTabs)
                {
                    UpdateTabConnection(tab);
                }
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: ChrisKoenig/XrmToolBox
        private void ApplyConnectionToTabs()
        {
            var tabs = tabControl1.TabPages.Cast <TabPage>().Where(tab => tab.TabIndex != 0).ToList();

            var tcu = new TabConnectionUpdater(tabs)
            {
                StartPosition = FormStartPosition.CenterParent
            };

            if (tcu.ShowDialog() == DialogResult.OK)
            {
                foreach (TabPage tab in tcu.SelectedTabs)
                {
                    tab.GetPlugin().UpdateConnection(service, currentConnectionDetail);

                    tab.Text = string.Format("{0} ({1})",
                                             tab.Controls[0].GetType().GetTitle(),
                                             currentConnectionDetail != null
                                            ? currentConnectionDetail.ConnectionName
                                            : "Not connected");
                }
            }
        }