private void OnSettingsSaved(object sender, SettingsSavedEventArgs args) { ViewModel.Settings = args.Settings; ((App)Application.Current).Settings = args.Settings; ((App)Application.Current)?.InitLocalization(); }
protected virtual void OnSettingsSaved(SettingsSavedEventArgs e) { EventHandler <SettingsSavedEventArgs> handler = SettingsSaved; if (handler != null) { handler(this, e); } }
private void SettingsViewModel_SettingsSaved(object sender, SettingsSavedEventArgs e) { this.toastView.InitToast(); this.toastView.DisplayAction(ToastifyActionEnum.SettingsSaved); this.LstHotKeys.GetBindingExpression(ItemsControl.ItemsSourceProperty)?.UpdateTarget(); this.HotkeyGrid.GetBindingExpression(DataContextProperty)?.UpdateTarget(); SettingsSaved?.Invoke(sender, e); }
private void Form1_SettingsSaved(object sender, SettingsSavedEventArgs e) { // If any settings were not saved, display a list of them. if (e.FailedSettingsList.Count > 0) { String failedSettings = String.Join( Environment.NewLine, e.FailedSettingsList.ToArray()); String message = String.Format("{0}{1}{1}{2}", "The following setting(s) were not saved:", Environment.NewLine, failedSettings); MessageBox.Show(message, "Unable to save settings", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void SettingsViewModel_SettingsSaved(object sender, SettingsSavedEventArgs e) { this.toastView.InitToast(); this.toastView.DisplayAction(ToastifyAction.SettingsSaved); SettingsSaved?.Invoke(sender, e); }
private void SettingsView_SettingsSaved(object sender, SettingsSavedEventArgs e) { this.current.PropertyChanged -= this.CurrentSettings_PropertyChanged; this.current = e.Settings; this.current.PropertyChanged += this.CurrentSettings_PropertyChanged; }
private void SettingsView_SettingsSaved(object sender, SettingsSavedEventArgs e) { this.PreviewSettings = e.Settings; this.PreviewHotkeys = e.PreviewHotkeys; }