コード例 #1
0
ファイル: Form1.cs プロジェクト: SNTDev/NetworkStudy
 private void CloseAll(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (Client[0].Connected)
         {
             Client[0].Close();
         }
         if (InputClient.Connected)
         {
             InputClient.Close();
         }
         if (ImageClient.Connected)
         {
             ImageClient.Close();
         }
         ServerOpenThread.Abort();
         ReceiveImageThread.Abort();
     }
     catch (Exception E)
     {
     }
 }
コード例 #2
0
 private void CloseAll(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (Client.Connected)
         {
             Client.Close();
         }
         if (ImageClient.Connected)
         {
             ImageClient.Close();
         }
         if (InputClient.Connected)
         {
             InputClient.Close();
         }
         GetData_From_Client.Abort();
         SendImage_To_Server_Thread.Abort();
         GetInput_Thread.Abort();
     }
     catch (Exception E)
     {
     }
 }