Esempio 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");
     }
 }
Esempio n. 2
0
 private void TxtDialog_Validating(object sender, CancelEventArgs e)
 {
     if (_labelname == "Quantity:")
     {
         decimal dialogval = 1;
         decimal.TryParse(TxtDialog.Text, out dialogval);
         if (dialogval <= 0)
         {
             MessageBox.Show("Value must be greater then Zero ...!", "Mr Solution", MessageBoxButtons.OK, MessageBoxIcon.Information);
             TxtDialog.Focus();
             return;
         }
     }
 }
Esempio n. 3
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 = "";
     }
 }
Esempio n. 4
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 !");
     }
 }
Esempio n. 5
0
        private void FrmDialogBox_Load(object sender, EventArgs e)
        {
            this.Text      = _formname.ToString();
            LblDialog.Text = _labelname.ToString();
            TxtDialog.Text = _textDialog.ToString();
            if (_labelname == "Note:" || _labelname == "Product:")
            {
                TxtDialog.Multiline = true;
                TxtDialog.Font      = new Font("Microsoft Sans Serif", 8.5f);
                TxtDialog.Height    = 50;
                //TxtDialog.Text = "";
            }

            TxtDialog.Focus();
            TxtDialog.SelectAll();
        }