Esempio n. 1
0
 private void StartButton_Click(object sender, EventArgs e)
 {
     if (m_server == null || !m_server.isRunning())
     {
         m_server = new OverlayServer();
         m_server.subscribeMessageListUpdate(this);
         m_server.start();
         StartButton.Text = "Stop";
         statusLabel.Text = "Server Started";
         statusLabel.ForeColor = Color.Green;
         overlayTimer.Enabled = true;
     }
     else
     {
         if (m_server != null)
         {
             m_server.stop();
             m_server = null;
         }
         StartButton.Text = "Start";
         statusLabel.Text = "Server Stopped";
         statusLabel.ForeColor = Color.Red;
         overlayTimer.Enabled = false;
         setOverlayVisible(false);
         m_messages.Clear();
         m_currentMessage = null;
         CurrentMessages.Items.Clear();
     }
 }
Esempio n. 2
0
 private void cleanup()
 {
     if (m_server != null)
     {
         m_server.stop();
         m_server = null;
     }
     m_overlayForm.Close();
 }