Exemple #1
0
 private void connectToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (client.isConnected)
     {
         client.Close();
         return;
     }
     client.Start();
 }
Exemple #2
0
        public Form1()
        {
            InitializeComponent();

            _writer = new TextBoxStreamWriter(txtLogBox);
            Console.SetOut(_writer);

            client               = new ConsoleClient();
            client.OnConnect    += Client_OnConnect;
            client.OnDisconnect += Client_OnDisconnect;

            client.OnDataReceived += Client_OnDataReceived;
            client.Start();
        }