public UserOptionsViewModel(Options opts, Action execute) { Opts = opts; execute += PerformClosing; SaveCmd = new RelayCommand(execute); Title = "User Options"; }
private void LoadConfig() { try { Options opts = null; ConfigSerializer.Deserialize(ref opts, _userConfig); if (opts != null) _options = opts; } catch (Exception e) { Trace.WriteLine(e); } _options.PropertyChanged += (sender, args) => ConnectCmd.RaiseCanExecuteChanged(); }