Пример #1
0
        void signUpDialog_mOnSignUpComplete(object sender, OnSignUpEventArgs e)
        {
            mProgressBar.Visibility = ViewStates.Visible;
            Thread thread = new Thread(ActLikeRequest);

            thread.Start();
        }
Пример #2
0
        void signUpDialog_mOnSignUpComplete(object sender, OnSignUpEventArgs e)
        {
            try
            {
                string dpPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "user1.db3");
                var    db2    = new SQLiteConnection(dpPath);
                db2.CreateTable <Person>();
                Person tbl = new Person
                {
                    FirstName = e.FirstName,

                    LastName = e.LastName,
                    Age      = e.Age,
                    Gender   = e.Gender,
                    Login    = e.Login,
                    Password = e.Password
                };

                db2.Insert(tbl);
                Toast.MakeText(this, "Record Added Successfully...,", ToastLength.Short).Show();
                db2.Close();
            }
            catch (Exception ex)
            {
                Toast.MakeText(this, ex.ToString(), ToastLength.Short).Show();
            }


            mProgressBar.Visibility = ViewStates.Visible;

            Thread thread = new Thread(ActLikeARequest);

            thread.Start();
        }
        //Simulate Server Request
        private void SignInDialog_eventOnSignUp(object sender, OnSignUpEventArgs e)
        {
            progressBar.Visibility = ViewStates.Visible; //progress bar set to visible
            string title   = "Created";
            string message = "User successfuly created";

            AlertDialogShow(title, message);
            Thread thread = new Thread(ActLikeARequest); //start the thread that takes 3 sec

            thread.Start();
        }
Пример #4
0
 /// <summary>
 /// Handles the Click event of the SubscriptionPlan control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
 private void SubscriptionPlan_Click(object sender, RoutedEventArgs e)
 {
     if (OnSubcriptionPlanClicked != null)
     {
         bool getSubscriptionPlan          = GetEmailCheckBox.IsChecked ?? false;
         OnSignUpEventArgs signUpEventArgs = new OnSignUpEventArgs
         {
             FirstName           = FirstNameTextBox.Text,
             LastName            = LastNameTextBox.Text,
             Email               = EmailTextBox.Text,
             ZipCode             = ZipCodeTextBox.Text,
             Password            = PasswordBox.Password,
             ConfirmPassword     = ConfirmPasswordBox.Password,
             GetSubscriptionPlan = getSubscriptionPlan
         };
         OnSubcriptionPlanClicked.Invoke(sender, signUpEventArgs);
     }
 }
Пример #5
0
        /// <summary>
        /// Raises the on enter button clicked.
        /// </summary>
        private void RaiseOnDoneButtonClickedEvent()
        {
            EventHandler <OnSignUpEventArgs> handler = OnDoneButtonClicked;

            if (handler != null)
            {
                bool getSubscriptionPlan          = GetEmailCheckBox.IsChecked ?? false;
                OnSignUpEventArgs signUpEventArgs = new OnSignUpEventArgs
                {
                    FirstName           = FirstNameTextBox.Text,
                    LastName            = LastNameTextBox.Text,
                    Email               = EmailTextBox.Text,
                    ZipCode             = ZipCodeTextBox.Text,
                    Password            = PasswordBox.Password,
                    ConfirmPassword     = ConfirmPasswordBox.Password,
                    GetSubscriptionPlan = getSubscriptionPlan
                };

                Application.Current.Dispatcher.BeginInvoke(new Action(() => { handler(this, signUpEventArgs); }));
            }
        }
Пример #6
0
 private void BtnSignUp_Click(object sender, EventArgs e)
 {
     OnSignUpEventArgs.Invoke(this, new SignUpEventArgs(name.Text, email.Text, password.Text));
     this.Dismiss();
 }