Exemplo n.º 1
0
 public void ekranabas(string s)
 {
     if (this.InvokeRequired)
     {
         ricdegis degis = new ricdegis(ekranabas);
         this.Invoke(degis, s);
     }
     else
     {
         s = "Server: " + s;
         TxtDialog.AppendText(s + "\n");
     }
 }
Exemplo n.º 2
0
 private void BtnGonder_Click(object sender, EventArgs e)
 {
     if (TxtMessage.Text == "")//Burda bos alan göndermeyi önlüyoruz…
     {
         return;
     }
     else
     {
         yaz = new StreamWriter(ag);
         yaz.WriteLine(TxtMessage.Text);
         yaz.Flush();
         TxtDialog.AppendText(TxtMessage.Text + "\n");
         TxtMessage.Text = "";
     }
 }
Exemplo n.º 3
0
 public void baglanti_kur()
 {
     try
     {
         //Ben Lochalhos üzerinde deneme yapacagim icin 127.0.0.1 verdim
         baglantikur = new TcpClient("127.0.0.1", 80);
         t           = new Thread(new ThreadStart(okumayabasla));
         t.Start();
         TxtDialog.AppendText(DateTime.Now.ToString() + " Baglanti kuruldu…\n");
     }
     catch (Exception)
     {
         MessageBox.Show("Server ile baglanti kurulurken hata olustu !");
     }
 }