Esempio n. 1
0
 public ClientGUI(string ip, int port, SocketLibTester.SocketHelpers.Client.AddLogDelegate addMainConsole)
 {
     InitializeComponent();
     Ip                 = ip;
     Port               = port;
     _client            = new SocketLibTester.SocketHelpers.Client(Ip, Port);
     _client.AddLog     = AddClientLog;
     _client.AddMainLog = addMainConsole;
 }
Esempio n. 2
0
 public ClientGUI(SocketLibTester.SocketHelpers.Client client, SocketLibTester.SocketHelpers.Client.AddLogDelegate addMainConsole)
 {
     InitializeComponent();
     Ip                 = client.Ip;
     Port               = client.Port;
     _client            = client;
     _client.AddMainLog = addMainConsole;
     _client.AddLog     = AddClientLog;
 }
Esempio n. 3
0
 public ClientGUI(SocketLibTester.SocketHelpers.Client client, SocketLibTester.SocketHelpers.Client.AddLogDelegate addMainConsole)
 {
     InitializeComponent();
     Ip                 = client.Ip;
     Port               = client.Port;
     labelIP.Text       = Ip;
     portLabel.Text     = Port.ToString();
     _client            = client;
     _client.AddMainLog = addMainConsole;
     _client.AddLog     = AddClientLog;
 }
Esempio n. 4
0
 private void btnConnect_Click(object sender, EventArgs e)
 {
     if (!_isConnected)
     {
         string ip   = ipCheck(ipTextBox.Text);
         int    port = portCheck(portTextBox.Text);
         _client            = new Client(ip, port);
         _client.AddLog     = AddClientLog;
         _client.AddMainLog = AddClientLog;
         Start();
     }
     else
     {
         _client.Stop();
     }
 }