예제 #1
0
        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();
            }
        }
예제 #2
0
        protected override void CloseCanceledCallbackCore()
        {
            var dialog = new DialogViewModel {
                Title = "終了確認",
            };

            this.Dialog(dialog, typeof(ExitDialog));

            if (dialog.DialogResult)
            {
                this.CanClose = true;
                this.InvokeOnUIDispatcher(this.Close);
            }
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
        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);
        }
		protected override void CloseCanceledCallbackCore()
		{
			var dialog = new DialogViewModel { Title = "終了確認", };

			this.Dialog(dialog, typeof(ExitDialog));

			if (dialog.DialogResult)
			{
				this.CanClose = true;
				this.InvokeOnUIDispatcher(this.Close);
			}
		}