Exemple #1
0
 private void showLogToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (showLogToolStripMenuItem.Checked = !showLogToolStripMenuItem.Checked)
     {// need log
         if (formLog == null)
         {
             formLog = CreateShowFormLog();
         }
         else
         {
             if (formLog.IsDisposed)
             {
                 formLog = CreateShowFormLog();
             }
         }
     }
     else
     {
         if (formLog == null)
         {
             return;
         }
         if (formLog.IsDisposed)
         {
             return;
         }
         formLog.Close();
     }
 }
Exemple #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            if (Settings.Default.ShowLog)
            {
                formLog = CreateShowFormLog();
            }

            connectToolStripMenuItem_Click(sender, e);
        }
Exemple #3
0
        private FormLog CreateShowFormLog()
        {
            FormLog formLog = new FormLog();

            formLog.FormClosing += new FormClosingEventHandler(formLog_FormClosing);
            formLog.Show();
            formLog.BringToFront();
            return(formLog);
        }