Example #1
0
        private void ChangeServer(int serverId, bool isFirstStart = false)
        {
            using (ServerChangeDialog sConnectDialog = new ServerChangeDialog(serverId))
            {
                if (isFirstStart)
                {
                    sConnectDialog.StartPosition = FormStartPosition.CenterScreen;
                }
                DialogResult sConnectResult = sConnectDialog.ShowDialog();

                if (sConnectResult == DialogResult.OK)
                {
                    foreach (ToolStripMenuItem item in selectServerToolStripMenuItem.DropDownItems)
                    {
                        item.Checked = false;
                    }
                    ((ToolStripMenuItem)selectServerToolStripMenuItem.DropDownItems[serverId]).Checked = true;
                    BuildGroupList();
                    BuildReportList();
                    CheckButtons();
                }
                sConnectDialog.Dispose();
            }
        }
Example #2
0
        private void ChangeServer(int serverId, bool isFirstStart = false)
        {
            using (ServerChangeDialog sConnectDialog = new ServerChangeDialog(serverId))
            {
                if (isFirstStart)
                {
                    sConnectDialog.StartPosition = FormStartPosition.CenterScreen;
                }
                DialogResult sConnectResult = sConnectDialog.ShowDialog();

                if (sConnectResult == DialogResult.OK)
                {
                    foreach (ToolStripMenuItem item in selectServerToolStripMenuItem.DropDownItems)
                    {
                        item.Checked = false;
                    }
                    ((ToolStripMenuItem)selectServerToolStripMenuItem.DropDownItems[serverId]).Checked = true;
                    BuildGroupList();
                    BuildReportList();
                    CheckButtons();
                }
                sConnectDialog.Dispose();
            }
        }