private void StatsClick(object sender, RoutedEventArgs e) { Sound.Play(Sounds.Click); var statistics = new StatisticsClient(); statistics.GetStatisticsCompleted += GetStatisticsCompleted; statistics.GetStatisticsAsync(); _dialog = new Dialog {DialogContents = {Content = new StackPanel()}, Header = {Text = Strings.Statistics}}; _dialog.Loading(LayoutRoot); }
private void HighScoreClick(object sender, RoutedEventArgs e) { Sound.Play(Sounds.Click); var grid = new Grid(); grid.RowDefinitions.Add(new RowDefinition()); grid.ColumnDefinitions.Add(new ColumnDefinition {Width = new GridLength(300, GridUnitType.Pixel)}); grid.ColumnDefinitions.Add(new ColumnDefinition {Width = new GridLength(250, GridUnitType.Pixel)}); _dialog = new Dialog {DialogContents = {Content = grid}, Header = {Text = Strings.HighScore}}; _dialog.Loading(LayoutRoot); var statistics = new StatisticsClient(); statistics.GetHighscoresCompleted += GetAllTimeHighCompleted; statistics.GetHighscoresAsync(Game.HighScore, null, null); }