private async void next_Click(object sender, RoutedEventArgs e) { next.Visibility = Visibility.Collapsed; logring.IsActive = true; logring.Visibility = Visibility.Visible; data.UID = username.Text; #region nono zone string privkey = Constants.PRIV; string pubkey = Constants.PUBL; #endregion data.Password = HashKarenge.CreateHash(privkey, pubkey, passbox.Password); try { var resultant = await LoginCall.LogInsideAsync(data); if (!(resultant.Equals("Failed :("))) { Frame.Navigate(typeof(Profile), data); } } catch (Exception ex) { Debug.WriteLine(ex.Message); } finally { logring.IsActive = false; logring.Visibility = Visibility.Visible; next.Visibility = Visibility.Visible; } }
private async void regbox_Click(object sender, RoutedEventArgs e) { regbox.Visibility = Visibility.Collapsed; theRing.IsActive = true; theRing.Visibility = Visibility.Visible; regData.UID = uidbox.Text; regData.Name = DataSecurity.EncryptThisData(namebox.Text, Constants.PRIV); regData.Email = DataSecurity.EncryptThisData(emailbox.Text, Constants.PRIV); regData.Sex = DataSecurity.EncryptThisData(sexinfo, Constants.PRIV); #region ni dikhana jb const string priv = Constants.PRIV; const string publ = Constants.PUBL; #endregion regData.Password = HashKarenge.CreateHash(priv, publ, passbox.Password); try { var resultingResult = await CommonCall.RegisterUpdateAsync(regData, insert_update); Frame.Navigate(typeof(MainPage)); } catch (Exception) { } finally { theRing.Visibility = Visibility.Collapsed; theRing.IsActive = false; regbox.Visibility = Visibility.Visible; } }