Example #1
0
 public ClientViewModel()
 {
     _netClient = new NetClient(_IP, _Port);
     _CommandControler = new Commands();
     _backgroundHelper = new BackgroundConnectionHelper(new DoWorkEventHandler(OnCallBack), new RunWorkerCompletedEventHandler(UpdateGUI));
     _ConnectClick = new CommandAction(StartClientClick);
 }
Example #2
0
 public void StartClientClick()
 {
     _netClient.Dispose();
     _netClient = new NetClient(_IP, _Port);
     _netClient.Connect();
     _backgroundHelper.Start();
     RaisePropertyChanged("Connection");
 }