Exemplo n.º 1
0
        void sendButton_Click(object sender, EventArgs e)
        {
            if (Game.Instance == null || Game.Instance.FeedbackInfo == null)
            {
                throw new Exception("Something is null that hopefully shouldn't be.");
            }

            if (difficultyRow.Score == 0 && lengthRow.Score == 0 && entertainmentRow.Score == 0 && commentBox.Text.Length == 0)
            {
                return;
            }

            FeedbackCommon.MapFeedback mf = new FeedbackCommon.MapFeedback
            {
                GameInstance        = Game.Instance.FeedbackInfo,
                DifficultyRating    = difficultyRow.Score,
                LengthRating        = lengthRow.Score,
                EntertainmentRating = entertainmentRow.Score,
                Comments            = commentBox.Text
            };
            mf.HttpPost(Settings.StatisticsURI);

            resetButton.Click -= new EventHandler(resetButton_Click);
            sendButton.Click  -= new EventHandler(sendButton_Click);
            Close();
        }
Exemplo n.º 2
0
        void sendButton_Click(object sender, EventArgs e)
        {
            if (Game.Instance == null || Game.Instance.FeedbackInfo == null)
                throw new Exception("Something is null that hopefully shouldn't be.");

            if (difficultyRow.Score == 0 && lengthRow.Score == 0 && entertainmentRow.Score == 0 && commentBox.Text.Length == 0)
                return;

            FeedbackCommon.MapFeedback mf = new FeedbackCommon.MapFeedback
            {
                GameInstance = Game.Instance.FeedbackInfo,
                DifficultyRating = difficultyRow.Score,
                LengthRating = lengthRow.Score,
                EntertainmentRating = entertainmentRow.Score,
                Comments = commentBox.Text
            };
            mf.HttpPost(Settings.StatisticsURI);

            resetButton.Click -= new EventHandler(resetButton_Click);
            sendButton.Click -= new EventHandler(sendButton_Click);
            Close();
        }