Example #1
0
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="sender">
 /// The source of the event; typically <see cref="NavigationHelper"/>
 /// </param>
 /// <param name="e">Event data that provides both the navigation parameter passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
 /// a dictionary of state preserved by this page during an earlier
 /// session.  The state will be null the first time a page is visited.</param>
 private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     var guid = (Guid)e.NavigationParameter;
 }
Example #2
0
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="sender">
 /// The source of the event; typically <see cref="NavigationHelper"/>
 /// </param>
 /// <param name="e">Event data that provides both the navigation parameter passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
 /// a dictionary of state preserved by this page during an earlier
 /// session.  The state will be null the first time a page is visited.</param>
 private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
     // TODO: Create an appropriate data model for your problem domain to replace the sample data.
     var group = await SampleDataSource.GetGroupAsync((string)e.NavigationParameter);
     this.DefaultViewModel["Group"] = group;
 }
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="sender">
 /// The source of the event; typically <see cref="NavigationHelper"/>
 /// </param>
 /// <param name="e">Event data that provides both the navigation parameter passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
 /// a dictionary of state preserved by this page during an earlier
 /// session.  The state will be null the first time a page is visited.</param>
 private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
 }
Example #4
0
        /// <summary>
        /// Populates the page with content passed during navigation.  Any saved state is also
        /// provided when recreating a page from a prior session.
        /// </summary>
        /// <param name="sender">
        /// The source of the event; typically <see cref="NavigationHelper"/>
        /// </param>
        /// <param name="e">Event data that provides both the navigation parameter passed to
        /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
        /// a dictionary of state preserved by this page during an earlier
        /// session.  The state will be null the first time a page is visited.</param>
        private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            // TODO: Create an appropriate data model for your problem domain to replace the sample data
            var sampleDataGroups = await SampleDataSource.GetGroupsAsync();
            this.DefaultViewModel["Groups"] = sampleDataGroups;

            //var insurances = await new GetInsurancesDAO().Execute(new GetInsurancesRequest());
            //this.DefaultViewModel["Insurances"] = insurances.Status == ExecutionStatus.Success ?
            //                                      insurances.Insurances :
            //                                      null;

            this.DefaultViewModel["Insurances"] = new List<GetInsurancesDTO>()
            {
                new GetInsurancesDTO() { Title = "Um", Policy = "XXXXX-X", Claims =  1, Background = new BitmapImage(new Uri(this.BaseUri,"/Images/carrinho.jpg")) },
                new GetInsurancesDTO() { Title = "2", Policy = "FFFFFF-FFF", Claims =  2, Background = new BitmapImage(new Uri(this.BaseUri,"/Images/casinha.jpg")) },
                new GetInsurancesDTO() { Title = "44324", Policy = "SSSSS-SSS", Claims =  3, Background = new BitmapImage(new Uri(this.BaseUri,"/Images/motinha.jpg")) },
                new GetInsurancesDTO() { Title = "ewf", Policy = "PPPPPPPPPP", Claims =  345, Background = new BitmapImage(new Uri(this.BaseUri,"/Images/verde.png")) },
            };

            //var claims = await new GetClaimsDAO().Execute(new GetClaimsRequest());
            //this.DefaultViewModel["Claims"] = claims.Status == ExecutionStatus.Success ?
            //                                  claims.Claims :
            //                                  null;

            this.DefaultViewModel["Claims"] = new List<GetClaimsDTO>()
            {
                new GetClaimsDTO() {
                                     Id = Guid.NewGuid(),
                                     Title = "Titulo 1",
                                     Date = "July 17, 2015",
                                     Status = "In Progress",
                                     Time = "10:00 am"
                                   },
                new GetClaimsDTO() {
                                     Id = Guid.NewGuid(),
                                     Title = "Titulo 2",
                                     Date = "May 2, 2014",
                                     Status = "Complete",
                                     Time = "01:00 pm"
                                   }
            };

            //var challenges = await new GetChallengesDAO().Execute(new GetChallengesRequest());
            //this.DefaultViewModel["Challenges"] = challenges.Status == ExecutionStatus.Success ?
            //                                      challenges.Challenges :
            //                                      null;

            this.DefaultViewModel["Challenges"] = new List<GetChallengesDTO>()
            {
                new GetChallengesDTO() { Slogan = "I'm Feeling Lucky Today", Title = "Este é um teste, somente um teste =D", Background = new BitmapImage(new Uri(this.BaseUri,"/Images/azul.png")) },
                new GetChallengesDTO() { Slogan = "I'm Feeling Lucky Today 1", Title = "Este é um teste, somente um teste =D", Background = new BitmapImage(new Uri(this.BaseUri,"/Images/azul.png")) },
                new GetChallengesDTO() { Slogan = "I'm Feeling Lucky Today 2", Title = "Este é um teste, somente um teste =D", Background = new BitmapImage(new Uri(this.BaseUri,"/Images/azul.png")) },
            };

            //var rewards = await new GetRewardsDAO().Execute(new GetRewardsRequest());
            //this.DefaultViewModel["Rewards"] = rewards.Status == ExecutionStatus.Success ?
            //                                   rewards.Rewards :
            //                                   null;

            this.DefaultViewModel["Rewards"] = new List<GetRewardsDTO>()
            {
                new GetRewardsDTO() { Expiration = "July 25, 2015", Title = "Titulo 1", Icon = new BitmapImage(new Uri(this.BaseUri,"/Images/verde.png")) },
                new GetRewardsDTO() { Expiration = "July 25, 2015", Title = "Titulo 2", Icon = new BitmapImage(new Uri(this.BaseUri,"/Images/verde.png")) },
                new GetRewardsDTO() { Expiration = "August 25, 2015", Title = "Teste Teste Teste Teste Teste Teste", Icon = new BitmapImage(new Uri(this.BaseUri,"/Images/verde.png")) },
                new GetRewardsDTO() { Expiration = "September 25, 2015", Title = "Testao", Icon = new BitmapImage(new Uri(this.BaseUri,"/Images/verde.png")) }
            };
        }