示例#1
0
 public HighScoreViewController(MainWindow mainWindow) : base(mainWindow)
 {
     _highScoreView         = new HighScoreView();
     _highScoreView.Loaded += HighScoreCanvas_Loaded;
     SetContentOfMain(mainWindow, _highScoreView);
     SetButtonEvents(_highScoreView.BtnBack, BtnBack_Click);
 }
示例#2
0
        private void OpenHighScoreWindow(object sender, RoutedEventArgs e)
        {
            var highScoreView = new HighScoreView {
                Owner         = Application.Current.MainWindow,
                ShowInTaskbar = false
            };

            highScoreView.ShowDialog();
        }
示例#3
0
        private void UpdateHighScore()
        {
            HighScoreView.Rows.Clear();
            HighScoreView.ColumnCount = 2;

            string[] HighScoreLists = m_HighScorebyTypeSubKey.GetValueNames();

            for (int i = 0; i < HighScoreLists.Length; i++)
            {
                newRow        = new DataGridViewRow();
                newRow.Height = 25;
                newRow.CreateCells(HighScoreView, new object[] { HighScoreLists[i], m_HighScorebyTypeSubKey.GetValue(HighScoreLists[i]) });
                HighScoreView.Rows.Add(newRow);
            }

            HighScoreView.Sort(HighScoreView.Columns[1], ListSortDirection.Descending);
        }
示例#4
0
 public override void Initialize(GraphicsDevice GraphicsDevice)
 {
     ScoreGUI             = new HighScoreView(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
     ScoreGUI.DataContext = new HighScoreContext();
 }