예제 #1
0
 public void Hide(bool animated = true)
 {
     if (IsDisplayed)
     {
         WillHide?.Invoke(this, EventArgs.Empty);
         DismissViewController(animated, Dialog_DidHide);
         IsDisplayed = false;
     }
 }
예제 #2
0
        private void btnViewStatistics_Click(object sender, RoutedEventArgs e)
        {
            if (_statisticsMatch == null)
            {
                MessageBox.Show("没有统计数据,请先创建比赛!");
                return;
            }

            if (_statisticsWindow == null)
            {
                //App.Current.MainWindow = this;
                App.Current.ShutdownMode        = ShutdownMode.OnMainWindowClose;
                _statisticsWindow               = new StatisticsWindow(_statisticsMatch);
                this.willHide                   = new WillHide(this.HideWin2);
                this._statisticsWindow.Closing += new CancelEventHandler(win2_Closing);
            }
            if (!hasShow)
            {
                _statisticsWindow.Init(_statisticsMatch);
            }
            hasShow = true;
            _statisticsWindow.Show();
        }