コード例 #1
0
 private void checkBoxShowStatusMessages_Click(object sender, EventArgs e)
 {
     while (true)
     {
         if (checkBoxShowStatusMessages.Checked)
         {
             if (MessageForm.IsDisposed)
             {
                 MessageForm = new StatusMessagesForm();
                 MessageForm.Show();
             }
             else
             {
                 MessageForm.Close();
                 continue;
             }
         }
         else
         {
             if (!MessageForm.IsDisposed)
             {
                 MessageForm.Close();
             }
         }
         break;
     }
 }
コード例 #2
0
        private void KSPSerialIO_Load(object sender, EventArgs e)
        {
            //These are initialized here so that the main form is loaded and ready
            MessageForm = new StatusMessagesForm();
            MessageForm.Show();

            SettingsNStuff = new SettingsNStuff();
            KSPSerialPort  = new KSPSerialPort();

            //Are we ready now ?
            Awake();
        }