示例#1
0
 private void frmConsoleConnections_FormClosing(object sender, FormClosingEventArgs e)
 {
     ConsoleConnections.Dispose();
     ConsoleConnections                = null;
     showConsoleConnections.Image      = imageList1.Images[6]; //blue plus sign
     showConsoleConnections.CheckState = CheckState.Unchecked; //Control
 }
示例#2
0
        private void showConsoleConnections_Click(object sender, EventArgs e)
        {
            ToolStripButton toolButton = (ToolStripButton)sender;

            if (ConsoleConnections != null)//Show Console
            {
                ConsoleConnections.ParentForm.Activate();
            }
            else
            {//Create Console
                ConsoleConnections            = new TcpIpTerminationConsole();
                ConsoleConnections.Archive    = SqlManager.DatabaseName;
                ConsoleConnections.Dispatcher = new ConsoleDispatcher();//this is never even used...
                ConsoleConnections.Dock       = DockStyle.Fill;

                Form form = GetConsoleForm("End of Connection Records");
                form.Controls.Add(ConsoleConnections);
                form.FormClosing += new FormClosingEventHandler(frmConsoleConnections_FormClosing);
                form.Show();

                toolButton.Image      = imageList1.Images[7]; //monitor icon
                toolButton.CheckState = CheckState.Checked;   //Orange
            }
        }