Exemplo n.º 1
0
        public EnrollmentsListReply GetEnrollments()
        {
            Channel channel = new Channel("localhost:" + "50051", ChannelCredentials.Insecure);
            var     client  = new Statistics.StatisticsClient(channel);
            var     reply   = client.GetEnrollments(new EnrollmentsRequest {
                Name = "EnrollmentsClient"
            });

            return(reply);
        }
Exemplo n.º 2
0
        public void Show()
        {
            Header.Text = String.Format("{0} ({1})", Strings.HighScore, Strings.Loading);

            Statistics.StatisticsClient statistics = new Statistics.StatisticsClient();
            statistics.GetScoresCompleted += new EventHandler<Statistics.GetScoresCompletedEventArgs>(GetScoresCompleted);
            statistics.GetScoresAsync(Game.HighScore);

            Values.Visibility = Visibility.Collapsed;
            Visibility = Visibility.Visible;
        }
Exemplo n.º 3
0
        public void Show(int score)
        {
            m_Score = score;
            Header.Text = Strings.GameWinTitle;
            Message.Text = Strings.GameWinText + "\n\n" + Strings.GameWinChecking;

            Statistics.StatisticsClient statistics = new Statistics.StatisticsClient();
            statistics.IsHighScoreCompleted += new EventHandler<Statistics.IsHighScoreCompletedEventArgs>(IsHighScoreCompleted);
            statistics.IsHighScoreAsync(m_Score, Game.HighScore);

            Player.Visibility = Visibility.Collapsed;
            Visibility = Visibility.Visible;
        }
Exemplo n.º 4
0
 internal static void SaveScore(string name, int score)
 {
     Statistics.StatisticsClient statistics = new Statistics.StatisticsClient();
     statistics.SaveScoreAsync(name, score);
 }
Exemplo n.º 5
0
 private static void IncreaseValue(string name, int value)
 {
     Statistics.StatisticsClient statistics = new Statistics.StatisticsClient();
     statistics.IncreaseValueAsync(name, value);
 }