Example #1
0
 private void frmConsoleFTP_FormClosing(object sender, FormClosingEventArgs e)
 {
     ConsoleFTP.Dispose();
     ConsoleFTP                = null;
     showConsoleFTP.Image      = imageList1.Images[6]; //blue plus sign
     showConsoleFTP.CheckState = CheckState.Unchecked; //Control
 }
Example #2
0
        private void showConsoleFTP_Click(object sender, EventArgs e)
        {
            ToolStripButton toolButton = (ToolStripButton)sender;

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

                Form form = GetConsoleForm("End of Ftp Sessions");
                form.Controls.Add(ConsoleFTP);
                form.FormClosing += new FormClosingEventHandler(frmConsoleFTP_FormClosing);
                form.Show();

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