Ejemplo n.º 1
0
 private void connectBtn_Click(object sender, EventArgs e)
 {
     _nickname = nickname.Text;
     if (_nickname == "" || _speed == null || _portName == null || _stopBits == null)
     {
         MessageBox.Show("Wrong parameters");
     }
     else
     {
         MessageBox.Show("Установление физического соединения");
         Data.makePhysicalLayer(_portName, int.Parse(_speed), _parity, 8, double.Parse(_stopBits));
         Data.makeDLL();
         Data.makeAppLayer(_nickname);
         Dialog dialog = new Dialog(this);
         Data.physicalLayer.makeActive();
         while (!Data.physicalLayer.receiverReady());
         this.info_text.Text = "Соединение установлено";
         this.Hide();
         dialog.Show();
         Data.appLayer.SendManageMessage(Msg.ManageType.REQUEST_CONNECT);
     }
 }
Ejemplo n.º 2
0
 public void setForm(Dialog dialog)
 {
     this.dialogForm = dialog;
 }