コード例 #1
0
        private void OnSettingsSaved(object sender, SettingsSavedEventArgs args)
        {
            ViewModel.Settings = args.Settings;

            ((App)Application.Current).Settings = args.Settings;
            ((App)Application.Current)?.InitLocalization();
        }
コード例 #2
0
ファイル: OptionsForm.cs プロジェクト: ircart/asciipumper
        protected virtual void OnSettingsSaved(SettingsSavedEventArgs e)
        {
            EventHandler <SettingsSavedEventArgs> handler = SettingsSaved;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
 private void SettingsViewModel_SettingsSaved(object sender, SettingsSavedEventArgs e)
 {
     this.toastView.InitToast();
     this.toastView.DisplayAction(ToastifyAction.SettingsSaved);
     SettingsSaved?.Invoke(sender, e);
 }
コード例 #6
0
 private void SettingsView_SettingsSaved(object sender, SettingsSavedEventArgs e)
 {
     this.current.PropertyChanged -= this.CurrentSettings_PropertyChanged;
     this.current = e.Settings;
     this.current.PropertyChanged += this.CurrentSettings_PropertyChanged;
 }
コード例 #7
0
 private void SettingsView_SettingsSaved(object sender, SettingsSavedEventArgs e)
 {
     this.PreviewSettings = e.Settings;
     this.PreviewHotkeys  = e.PreviewHotkeys;
 }