示例#1
0
        public MainPage()
        {
            new Connection();
            if (!Connection.HasInternetAccess)
            {
                new MessageDialog("Geen internet verbinding aanwezig").ShowAsync();
            }

            this.InitializeComponent();

            if (Microsoft.Services.Store.Engagement.StoreServicesFeedbackLauncher.IsSupported())
            {
                FeedbackButton.Visibility = Visibility.Visible;
            }

            NavigationCacheMode = NavigationCacheMode.Required;

            Config.Instance = new Config(this)
            {
                Pivot   = searchPivot,
                AppName = "WieBetaaltWat",
            };

#if DEBUG
            Core.Config.Instance.LicenseInformation = CurrentAppSimulator.LicenseInformation;
#else
            Core.Config.Instance.LicenseInformation = CurrentApp.LicenseInformation;
#endif

            Core.License.LicenseInfo.SetLicenseInformation();

            Register.Execute();

            DataContext = PageDataContext = new WieBetaaltWatDataContext();
        }
示例#2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            var context = e.Parameter as WieBetaaltWatDataContext;

            if (context != null)
            {
                DataContext = PageDataContext = context;
            }

            if (Config.Instance.LicenseInformation.ProductLicenses[InAppPurchase.TokenRemoveAdvertisement].IsActive)
            {
                AdHolder.Visibility = Visibility.Collapsed;
            }

            searchPivot.SelectedIndex = 0;
            galleryList.SelectedItem  = null;
        }
示例#3
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataContext = e.Parameter as WieBetaaltWatDataContext;
            DataContext  = _dataContext;

            var storage = new Storage.Storage();
            var param   = new ApiUniversal.Parameter.InvoerItemParameter();

            param.SingleList    = _dataContext.Lijsten.SingleOrDefault(p => p.ProjectId.Equals(_dataContext.ProjectId.ToString()));
            param.LoginName     = storage.LoadFromLocal(StorageKeys.LoggedInName)?.ToString() ?? string.Empty;
            param.LoginPassword = storage.LoadFromLocal(StorageKeys.LoggedInPassword)?.ToString() ?? string.Empty;

            InvoerExecute invoerExecute = new InvoerExecute()
            {
                Parameters = param
            };

            invoerExecute.Execute();

            var result = invoerExecute.Result;

            _dataContext.SetLijstPersons(result.Persons);
        }