Esempio n. 1
0
 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");
     }
 }
Esempio n. 2
0
 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);
         }
     }
 }
Esempio n. 3
0
 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");
     }
 }