Example #1
0
 private void ButtonStartStopServer_Click(object sender, RoutedEventArgs e)
 {
     if (_server == null || !_server.IsRunning)
     {
         _server = new CommunicationServer(
             int.Parse(TextBoxPortNumber.Text.Trim()),
             ShowMessage,
             AddClient,
             RemoveClient,
             UpdatePosition,
             IndicateCurrentMode);
         _server.StartServer();
         ButtonStartStopServer.Content = "Stop Services";
     }
     else
     {
         _server.StopServer();
         ButtonStartStopServer.Content = "Start Services";
     }
 }
 public void StartServerWrongIP()
 {
     server.StartServer(System.Net.IPAddress.Parse("1000.2.3.4"), 100, 100);
 }
Example #3
0
 public void StartServerWrongPort()
 {
     server.StartServer(-100, 100);
 }