public HighScoreViewController(MainWindow mainWindow) : base(mainWindow) { _highScoreView = new HighScoreView(); _highScoreView.Loaded += HighScoreCanvas_Loaded; SetContentOfMain(mainWindow, _highScoreView); SetButtonEvents(_highScoreView.BtnBack, BtnBack_Click); }
private void OpenHighScoreWindow(object sender, RoutedEventArgs e) { var highScoreView = new HighScoreView { Owner = Application.Current.MainWindow, ShowInTaskbar = false }; highScoreView.ShowDialog(); }
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); }
public override void Initialize(GraphicsDevice GraphicsDevice) { ScoreGUI = new HighScoreView(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height); ScoreGUI.DataContext = new HighScoreContext(); }