public void Refresh() { if (GeneralSettings.RefreshConfirmationType == ExitConfirmationType.None) { //바로 새로고침 RefreshNavigator.Execute(null); return; } else if (GeneralSettings.RefreshConfirmationType == ExitConfirmationType.InSortieOnly) { if (!KanColleClient.Current.IsInSortie) { //바로 새로고침 RefreshNavigator.Execute(null); return; } } var vmodel = new DialogViewModel(); var window = new RefreshPopup { DataContext = vmodel, Owner = Application.Current.MainWindow, }; window.ShowDialog(); if (vmodel.DialogResult) { WindowService.Current.RefreshWindow(); } }
protected override void CloseCanceledCallbackCore() { var dialog = new DialogViewModel { Title = "終了確認", }; this.Dialog(dialog, typeof(ExitDialog)); if (dialog.DialogResult) { this.CanClose = true; this.InvokeOnUIDispatcher(this.Close); } }
public override void CloseCanceledCallback() { var dialog = new DialogViewModel { Title = "終了確認", }; this.Transition(dialog, typeof(ExitDialog), TransitionMode.Modal); if (dialog.DialogResult) { this.CanClose = true; this.InvokeOnUIDispatcher(this.Close); } }
protected override void OnSessionEnding(SessionEndingCancelEventArgs e) { var confirmation = GeneralSettings.ExitConfirmationType == ExitConfirmationType.Always || (GeneralSettings.ExitConfirmationType == ExitConfirmationType.InSortieOnly && KanColleClient.Current.IsInSortie); if (confirmation) { var vmodel = new DialogViewModel(); var window = new ExitDialog { DataContext = vmodel, Owner = this.MainWindow, }; window.ShowDialog(); e.Cancel = !vmodel.DialogResult; } base.OnSessionEnding(e); }