Пример #1
0
        void submitScore()
        {
            nameElement.FetchValue();
            scoreElement.FetchValue();
            var gameScore = new GameScore()
            {
                Player    = nameElement.Value,
                Score     = int.Parse(scoreElement.Value),
                Dificulty = (GameDificulty)dificultyGroup.Selected,
            };
            var pfobj = gameScore.ToPfObject();

            Console.WriteLine(pfobj);

            pfobj.SaveAsync((success, error) => {
                UIAlertView alert = new UIAlertView(pfobj.ClassName, string.Format("Success: {0}", success), null, "Ok");
                alert.Show();
            });
        }
Пример #2
0
        void submitScore()
        {
            try {
                nameElement.FetchValue();
                scoreElement.FetchValue();
                var gameScore = new GameScore()
                {
                    Player    = nameElement.Value,
                    Score     = int.Parse(scoreElement.Value),
                    Dificulty = (GameDificulty)difficultyGroup.Selected,
                };

                var pfobj = gameScore.ToPfObject();
                Console.WriteLine(pfobj);

                pfobj.SaveAsync((success, error) => {
                    UIAlertView alert = new UIAlertView(pfobj.ClassName, string.Format("Success: {0}", success), null, "Ok");
                    alert.Show();
                });
            } catch (Exception ex) {
                (new UIAlertView("Error", "Please make sure all inputs are valid", null, "Ok")).Show();
            }
        }
Пример #3
0
        void submitScore()
        {
            try {
                nameElement.FetchValue ();
                scoreElement.FetchValue ();
                var gameScore = new GameScore ()
                {
                    Player = nameElement.Value,
                    Score = int.Parse(scoreElement.Value),
                    Dificulty = (GameDificulty)difficultyGroup.Selected,
                };

                var pfobj = gameScore.ToPfObject ();
                Console.WriteLine (pfobj);

                pfobj.SaveAsync ((success,error) => {
                    UIAlertView alert = new UIAlertView (pfobj.ClassName, string.Format ("Success: {0}", success), null, "Ok");
                    alert.Show ();
                });
            } catch (Exception ex) {
                (new UIAlertView ("Error", "Please make sure all inputs are valid", null, "Ok")).Show ();
            }
        }
Пример #4
0
        void submitScore()
        {
            nameElement.FetchValue();
            scoreElement.FetchValue();
            var gameScore = new GameScore()
            {
                Player = nameElement.Value,
                Score = int.Parse(scoreElement.Value),
                Dificulty = (GameDificulty)dificultyGroup.Selected,
            };
            var pfobj = gameScore.ToPfObject();
            Console.WriteLine(pfobj);

            pfobj.SaveAsync((success,error)=>{
                UIAlertView alert = new UIAlertView(pfobj.ClassName,string.Format("Success: {0}",success),null,"Ok");
                alert.Show();
            });
        }