private void OnSocketOpen(MessageRouter.Service svc) { NotifyPropertyChanged("connected"); NotifyPropertyChanged("connectionString"); NotifyPropertyChanged("connLightRed"); NotifyPropertyChanged("connLightGreen"); }
private void OnSocketError(MessageRouter.Service svc, ErrorEventArgs e) { /*this.Dispatcher.Invoke(() => { * MessageBox.Show("Socket Error. Connection Lost", "Error", * MessageBoxButton.OK); * * Application.Current.Shutdown(); * });*/ NotifyPropertyChanged("connected"); NotifyPropertyChanged("connectionString"); NotifyPropertyChanged("connLightRed"); NotifyPropertyChanged("connLightGreen"); }
private void OnSocketClose(MessageRouter.Service svc, CloseEventArgs c) { /*this.Dispatcher.Invoke(() => { * MessageBox.Show(this, * "Connection to Main service closed by server. " + * $"Reason: {c.Reason}", "Connection Closed", * MessageBoxButton.OK, * MessageBoxImage.Error); * * Application.Current.Shutdown(); * });*/ NotifyPropertyChanged("connected"); NotifyPropertyChanged("connectionString"); NotifyPropertyChanged("connLightRed"); NotifyPropertyChanged("connLightGreen"); }