public RefreshPopup()
        {
            InitializeComponent();
            Current = this;

            MainWindow.Current.Closed += (sender, args) => this.Close();
        }
Exemple #2
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();
            }
        }