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) { } }
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) { } }