private void SendMesaj_Click(object sender, EventArgs e) { if (MessageBoxTxt.Text.Length != 0) { PackagePrinter py = new PackagePrinter(); py.Write((ushort)Commad.Message); py.Write(MessageBoxTxt.Text); byte[] data = py.ByteBring(); trm.Send(data, data.Length); } else { MessageBox.Show("Boş Data'ları Gönderemessin"); } }
private void SendImages_Click(object sender, EventArgs e) { using (OpenFileDialog o = new OpenFileDialog()) { if (o.ShowDialog() == DialogResult.OK) { PackagePrinter py = new PackagePrinter(); py.Write((ushort)Commad.Image); py.SummerImage(File.ReadAllBytes(o.FileName)); byte[] data = py.ByteBring(); trm.Send(data, data.Length); } } }
private void SendObje_Click(object sender, EventArgs e) { if (Namebox.Text.Length != 0 && SurnameBox.Text.Length != 0 && JobsBox.Text.Length != 0 && DateBox.Text.Length != 0) { Person v = new Person(Namebox.Text, SurnameBox.Text, JobsBox.Text, int.Parse(DateBox.Text)); PackagePrinter py = new PackagePrinter(); py.Write((ushort)Commad.Obje); py.SummerObje(v); byte[] data = py.ByteBring(); trm.Send(data, data.Length); } else { MessageBox.Show("Boş Data'ları Gönderemessin"); } }