public ServerViewModel()
 {
     _TCPServer = new TCPServer(_Ip, _Port);
     _TryToStartServer = new CommandAction(GetConnection);
     _BackgroundHelper = new BackgroundConnectionHelper(
         new DoWorkEventHandler(AsyncOperations),
         new RunWorkerCompletedEventHandler(UpdateGUI));
     _Commands = new Commands();
 }
 public void GetConnection()
 {
     if (_TCPServer != null)
     {
         _TCPServer.Dispose();
         _TCPServer = new TCPServer(_Ip, _Port);
         _TCPServer.StartServer();
         _BackgroundHelper.Start();
     }
     RaisePropertyChanged("IsConnectedProperty");
 }