This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ValidateNumberIsGreaterThan( | |
| ComparisonProperty = "Account.MinimumBalance", | |
| FailureMessage = "You can not withdraw anymore, you must maintain a minimum balance.", | |
| ValidationMessageType = typeof(ValidationWarningMessage), | |
| ValidateIfMemberValueIsValid = "Account.IsOpen")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public sealed partial class FirstRunPage : VisualStateAwarePage | |
| { | |
| public FirstRunPage() | |
| { | |
| this.InitializeComponent(); | |
| } | |
| protected override void OnNavigatedTo(NavigationEventArgs e) | |
| { | |
| //base.OnNavigatedTo(e); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //----------------------------------------------------------------------- | |
| // <copyright file="ParseRestHelper.cs" company="Sully Studios"> | |
| // Copyright (c) Johnathon Sullinger. All rights reserved. | |
| // </copyright> | |
| //----------------------------------------------------------------------- | |
| namespace Lifestream.Data.Repository.ParseCloud | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class UserRepository : IUserRepository | |
| { | |
| /// <summary> | |
| /// Asks the data store to create a new user with the given data.. | |
| /// </summary> | |
| /// <param name="data">The data that represents a user.</param> | |
| /// <param name="password">The password.</param> | |
| /// <returns> | |
| /// Returns a session token that can be used to preserve a user session. | |
| /// </returns> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class UserService : IUserService | |
| { | |
| /// <summary> | |
| /// The cached user for re-use once fetched. | |
| /// </summary> | |
| private static User _cachedUser; | |
| /// <summary> | |
| /// The filename used when saving the users session token. | |
| /// </summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private async Task ExecuteSignin() | |
| { | |
| this.IsSigningIn = true; | |
| bool signinFailed = false; | |
| string failureMesage = string.Empty; | |
| try | |
| { | |
| User user = await this.userService.RetrieveUser(this.Username, this.Password); | |
| this.navigationService.Navigate("Main", user); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected async override Task OnLaunchApplicationAsync(LaunchActivatedEventArgs args) | |
| { | |
| try | |
| { | |
| // Try to restore the user. | |
| IUserService userService = this.container.Resolve<IUserService>(); | |
| User user = await userService.RetrieveUser(); | |
| // If the user was restored, we can navigate to the main page. | |
| NavigationService.Navigate("Main", user); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected override void OnHardwareButtonsBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) | |
| { | |
| var page = (Page)((Frame)Windows.UI.Xaml.Window.Current.Content).Content; | |
| if (page.GetType() == typeof(FirstRunPage)) | |
| { | |
| var firstRunPage = (FirstRunPage)page; | |
| if (firstRunPage.CanGoBack()) | |
| { | |
| e.Handled = false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public override bool CanGoBack() | |
| { | |
| return this.ViewModel.IsNewUser ? false : base.CanGoBack(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected override void OnHardwareButtonsBackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e) | |
| { | |
| var page = (Page)((Frame)Windows.UI.Xaml.Window.Current.Content).Content; | |
| if (page is INavigateBackwards) | |
| { | |
| var firstRunPage = (INavigateBackwards)page; | |
| if (!firstRunPage.CanNavigateBack()) | |
| { | |
| e.Handled = true; | |
| return; |
OlderNewer