Beispiel #1
0
 /// <summary>
 /// Shows a message to the user
 /// </summary>
 public void showMessage(String message)
 {
     MonoTouch.UIKit.UIAlertView AV = new MonoTouch.UIKit.UIAlertView("Nachricht", message, null, "OK",null);
     AV.Show ();
 }
Beispiel #2
0
        public void AskForReview()
        {
#if IPHONE
            if (game.reviewAsked)
            {
                return;
            }

            var settings = game.SettingsFile;

            if (!settings.AskForReiew)
            {
                return;
            }

            if ((settings.LaunchNumber - 2) % 4 != 0)
            {
                return;
            }

            game.reviewAsked = true;

            MonoTouch.UIKit.UIAlertView x = null;

            if (this.IsFreeVersion)
            {
                x = new MonoTouch.UIKit.UIAlertView("", "Please rate our game", null, null, "Shure!", "Later");
            }
            else
            {
                x = new MonoTouch.UIKit.UIAlertView("", "Please rate our game", null, null, "Shure!", "Later", "Don't ask anymore");
            }

            // hold a global reference to the dialog object, go it doesn't get picked up by the GC
            game.iOSDialogWindow = x;
            x.Show();

            x.Clicked += (sender, buttonArgs) => {
                // "never"
                if (buttonArgs.ButtonIndex == 2)
                {
                    game.SettingsFile.AskForReiew = false;
                    game.SaveSettings();
                    return;
                }
                // "later"
                else if (buttonArgs.ButtonIndex == 1)
                {
                    return;
                }
                // "Sure!"
                else
                {
                    if (this.IsFreeVersion)
                    {
                        this.OpenUrl(@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=584313299&pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8");
                    }
                    else
                    {
                        this.OpenUrl(@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=580010503&pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8");
                    }

                    game.SettingsFile.AskForReiew = false;
                    game.SaveSettings();
                }
            };
#endif
        }
Beispiel #3
0
		public void AskForReview()
        {
#if IPHONE
            if (game.reviewAsked)
                return;

            var settings = game.SettingsFile;

            if (!settings.AskForReiew)
                return;

            if ((settings.LaunchNumber - 2) % 4 != 0)
                return;

            game.reviewAsked = true;

            MonoTouch.UIKit.UIAlertView x = null;

            if (this.IsFreeVersion)
                x = new MonoTouch.UIKit.UIAlertView("", "Please rate our game", null, null, "Shure!", "Later");
            else
                x = new MonoTouch.UIKit.UIAlertView("", "Please rate our game", null, null, "Shure!", "Later", "Don't ask anymore");

            // hold a global reference to the dialog object, go it doesn't get picked up by the GC
            game.iOSDialogWindow = x;
            x.Show();

            x.Clicked += (sender, buttonArgs) => {

                // "never"
                if (buttonArgs.ButtonIndex == 2)
                {
                    game.SettingsFile.AskForReiew = false;
                    game.SaveSettings();
                    return;
                }
                // "later"
                else if (buttonArgs.ButtonIndex == 1)
                {
                    return;
                }
                // "Sure!"
                else
                {

                    if (this.IsFreeVersion)
                        this.OpenUrl(@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=584313299&pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8");
                    else
                        this.OpenUrl(@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=580010503&pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8");

                    game.SettingsFile.AskForReiew = false;
                    game.SaveSettings();
                }
            };    
#endif
		}
Beispiel #4
0
		protected override void CreateHandle ()
		{
			m_helper = new MonoTouch.UIKit.UIAlertView();
			m_view = m_helper;
		}