Exemple #1
0
 public void StopScreenInteract()
 {
     if (_screenInteract == null)
     {
         return;
     }
     _screenInteract.stopScreenInteract();
 }
Exemple #2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         if (this.ScreenBroadcastToolStripMenuItem.Text == "关闭广播")
         {
             DialogResult r = MessageBox.Show("屏幕广播尚未关闭,确定要退出程序?", "操作提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
             if (r != DialogResult.OK)
             {
                 e.Cancel = true;
             }
             else
             {
                 if (rtspAddress != null)
                 {
                     si.stopScreenInteract();
                 }
                 if (clientConnect != null)
                 {
                     clientConnect.ServiceClose();//用户退出程序时,释放连接
                     clientConnect = null;
                 }
                 System.Environment.Exit(0);
             }
         }
         else
         {
             DialogResult r = MessageBox.Show("确定要退出程序?", "操作提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
             if (r != DialogResult.OK)
             {
                 e.Cancel = true;
             }
             else
             {
                 if (clientConnect != null)
                 {
                     clientConnect.ServiceClose();//用户退出程序时,释放连接
                     clientConnect = null;
                 }
                 System.Environment.Exit(0);
             }
         }
     }
 }