//debug 
        //private const string XML_NOK = "in-app-purchase_nok.xml";
        //private const string XML_OK = "in-app-purchase_ok.xml";
        

        public PlayerDetailPage()
        {
            this.InitializeComponent();

            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;

            // 
            licenseInformation = CurrentApp.LicenseInformation;
            //licenseInformation = CurrentAppSimulator.LicenseInformation;


            gamesPlayedTextBlocks.Add(mmxvGamesPlayed);
            gamesPlayedTextBlocks.Add(cxGamesPlayed);
            gamesPlayedTextBlocks.Add(AboGamesPlayed);
            gamesPlayedTextBlocks.Add(JYLYGamesPlayed);

            bestScoreTextBlocks.Add(mmxvBestScore);
            bestScoreTextBlocks.Add(cxBestScore);
            bestScoreTextBlocks.Add(AboBestScore);
            bestScoreTextBlocks.Add(JYLYBestScore);

            avgScoreTextBlocks.Add(mmxvAvgScore);
            avgScoreTextBlocks.Add(cxAvgScore);
            avgScoreTextBlocks.Add(AboAvgScore);
            avgScoreTextBlocks.Add(JYLYAvgScore);

            skillLevelTextBlocks.Add(mmxvSkillLevel);
            skillLevelTextBlocks.Add(cxSkillLevel);
            skillLevelTextBlocks.Add(AboSkillLevel);
            skillLevelTextBlocks.Add(JYLYSkillLevel);
        }
        public AboGamePage()
        {
            this.InitializeComponent();
            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;

            // new back button handling
            SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;
        }
        //debug
        //private const string XML_NOK = "in-app-purchase_nok.xml";
        //private const string XML_OK = "in-app-purchase_ok.xml";

        public BuyProPackPage()
        {
            this.InitializeComponent();

            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;
            
            //licenseInformation = CurrentAppSimulator.LicenseInformation;
            //
            licenseInformation = CurrentApp.LicenseInformation;
        }
        public HighScoresPage()
        {
            this.InitializeComponent();

            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;
            this.Loaded += HighScoresPage_Loaded;

            gameModes.Add("0", "1025");
            gameModes.Add("1", "100*10");
            gameModes.Add("2", "ÅBO");
            gameModes.Add("3", "JYLY");
        }
        public PlayersPage()
        {
            this.InitializeComponent();

            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;
            this.playersListView.SelectionChanged += playersListView_SelectionChanged;

            this.Loaded += PlayersPage_Loaded;

            gameModes_.Add("1025");
            gameModes_.Add("100*10");
            gameModes_.Add("Åbo");
            gameModes_.Add("JYLY");
        }
        public AboutPage()
        {
            this.InitializeComponent();

            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;
            
            string appVersion = string.Format("{0}.{1}.{2}.{3}",
                                        Windows.ApplicationModel.Package.Current.Id.Version.Major,
                                        Windows.ApplicationModel.Package.Current.Id.Version.Minor,
                                        Windows.ApplicationModel.Package.Current.Id.Version.Build,
                                        Windows.ApplicationModel.Package.Current.Id.Version.Revision);
            
            versionLbl.Text = "Version: " + appVersion;
            message_body = "\n\nFeedback on Putt Games version " + appVersion;
        }
        //debug 
        //private const string XML_NOK = "in-app-purchase_nok.xml";
        //private const string XML_OK = "in-app-purchase_ok.xml";

        public MainPage()
        {
            this.InitializeComponent();

            this.NavigationCacheMode = NavigationCacheMode.Required;

            this.navigationHelper = new NavigationHelper(this);
            this.navigationHelper.LoadState += this.NavigationHelper_LoadState;
            this.navigationHelper.SaveState += this.NavigationHelper_SaveState;
            pivot.SelectionChanged += pivot_SelectionChanged;

            //licenseInformation = CurrentAppSimulator.LicenseInformation;

            licenseInformation = CurrentApp.LicenseInformation;

            pivot.PivotItemLoading += pivot_PivotItemLoading;
        }