Example #1
0
        /// <summary>
        /// The function that will be called when this frame is navigated to.
        ///
        /// Checks to see if Microsoft Passport is available and checks to see if an
        /// account was passed in.
        ///
        /// If an account was passed, check if it uses Microsoft Passport.
        /// and set the "adding user" flag so we don't add a new account
        /// to the list of users.
        /// </summary>
        /// <param name="e"></param>
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            rootPage = MainPage.Current;

            if (e.Parameter != null)
            {
                m_account                  = (Account)e.Parameter;
                textbox_Username.Text      = m_account.Email;
                textbox_Username.IsEnabled = false;
                if (this.m_account.UsesPassport)
                {
                    LoginHelp loginHelp = new LoginHelp(this.m_account);
                    bool      rev       = await loginHelp.SignInPassport();

                    if (rev)
                    {
                        this.Frame.Navigate(typeof(AccountDetails), this.m_account);
                    }
                }
            }
            var accountList = await AccountsHelper.LoadAccountList();

            if (accountList.Count > 1)
            {
                this.btnSelectUser.Visibility = Visibility.Visible;
            }
            else
            {
                this.btnSelectUser.Visibility = Visibility.Collapsed;
            }
        }
        /// <summary>
        /// The function that will be called when this frame is navigated to.
        ///
        /// Checks to see if Microsoft Passport is available and checks to see if an 
        /// account was passed in.
        ///
        /// If an account was passed, check if it uses Microsoft Passport.
        /// and set the "adding user" flag so we don't add a new account
        /// to the list of users.
        /// </summary>
        /// <param name="e"></param>
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            rootPage = MainPage.Current;

            if (e.Parameter != null)
            {
                m_account = (Account)e.Parameter;
                textbox_Username.Text = m_account.Email;
                textbox_Username.IsEnabled = false;
                if (this.m_account.UsesPassport)
                {
                    LoginHelp loginHelp = new LoginHelp(this.m_account);
                    bool rev = await loginHelp.SignInPassport();
                    if (rev)
                    {
                        this.Frame.Navigate(typeof(AccountDetails), this.m_account);
                    }
                }
            }
            var accountList = await AccountsHelper.LoadAccountList();
            if (accountList.Count > 1)
            {
                this.btnSelectUser.Visibility = Visibility.Visible;
            }
            else
            {
                this.btnSelectUser.Visibility = Visibility.Collapsed;
            }
        }
 private async void btnQueue_Click(object sender, RoutedEventArgs e)
 {
     LoginHelp loginHelp = new LoginHelp(this.activeAccount);
     if (this.activeAccount.UsesPassport)
     {
         bool rev = await loginHelp.SignInPassport();
         if (rev)
         {
             this.listBill.Visibility = Visibility.Visible;
         }
     }
     else
     {
         bool rev = await loginHelp.CreatePassportKey(this.activeAccount.Name);
         if (rev)
         {
             this.listBill.Visibility = Visibility.Visible;
         }
     }
 }
Example #4
0
        private async void btnQueue_Click(object sender, RoutedEventArgs e)
        {
            LoginHelp loginHelp = new LoginHelp(this.activeAccount);

            if (this.activeAccount.UsesPassport)
            {
                bool rev = await loginHelp.SignInPassport();

                if (rev)
                {
                    this.listBill.Visibility = Visibility.Visible;
                }
            }
            else
            {
                bool rev = await loginHelp.CreatePassportKey(this.activeAccount.Name);

                if (rev)
                {
                    this.listBill.Visibility = Visibility.Visible;
                }
            }
        }
Example #5
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            if (this.textTonameInfo.Text == "" || this.textToaccountInfo.Text == "" || this.textMoneyInfo.Text == "")
            {
                rootPage.ShowMessage("Please fill out the information");
                return;
            }
            TransferInfoData data = new TransferInfoData();

            data.payAccount         = this.activeAccount.accountNO;
            data.receiveAccount     = this.textToaccountInfo.Text;
            data.receiveAccountName = this.textTonameInfo.Text;
            data.payMoney           = this.textMoneyInfo.Text;
            LoginHelp loginHelp = new LoginHelp(this.activeAccount);

            if (this.activeAccount.UsesPassport)
            {
                bool rev = await loginHelp.SignInPassport();

                if (rev)
                {
                    this.Frame.Navigate(typeof(TransferInfo), data);
                    this.clearInfo();
                }
            }
            else
            {
                bool rev = await loginHelp.CreatePassportKey(this.activeAccount.Name);

                if (rev)
                {
                    this.Frame.Navigate(typeof(TransferInfo), data);
                    this.clearInfo();
                }
            }
        }
 private async void Button_Click(object sender, RoutedEventArgs e)
 {
     if (this.textTonameInfo.Text == "" || this.textToaccountInfo.Text == "" || this.textMoneyInfo.Text == "")
     {
         rootPage.ShowMessage("Please fill out the information");
         return;
     }
     TransferInfoData data = new TransferInfoData();
     data.payAccount = this.activeAccount.accountNO;
     data.receiveAccount = this.textToaccountInfo.Text;
     data.receiveAccountName = this.textTonameInfo.Text;
     data.payMoney = this.textMoneyInfo.Text;
     LoginHelp loginHelp = new LoginHelp(this.activeAccount);
     if (this.activeAccount.UsesPassport)
     {
        
         bool rev = await loginHelp.SignInPassport();
         if (rev)
         {
             this.Frame.Navigate(typeof(TransferInfo),data);
             this.clearInfo();
         }
     }
     else
     {
         bool rev = await loginHelp.CreatePassportKey(this.activeAccount.Name);
         if (rev)
         {
             this.Frame.Navigate(typeof(TransferInfo), data);
             this.clearInfo();
         }
     }
 }