private void TxtAccountAddOn_Click(object sender, RoutedEventArgs e) { Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; Windows.Storage.ApplicationDataCompositeValue composite = (Windows.Storage.ApplicationDataCompositeValue)localSettings.Values["user_data"]; localSettings.Values["user_data"] = null; txtAccountAddOn.Content = ""; CloureManager.ShowDialog("Sus datos de accesos han sido olvidados."); }
private async void CloureClient_OnLoginError(string error, string errorType) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { btnLogin.IsEnabled = true; btnRegister.IsEnabled = true; loginProgress.IsActive = false; CloureManager.ShowDialog(error); }); }
private async void BtnSubscribe_Click(object sender, RoutedEventArgs e) { JsonObject priceObject = (JsonObject)((Button)sender).Tag; bool res = await CloureManager.RequestPurchase(priceObject); if (res) { btnSubscribePremium.Visibility = Visibility.Collapsed; grdPayment.Visibility = Visibility.Collapsed; CloureManager.ShowDialog("Tu suscripción ha sido realizada!"); } }
public async void attemptLogin() { loginProgress.IsActive = true; btnLogin.IsEnabled = false; btnRegister.IsEnabled = false; string user = txtUser.Text; string pass = txtPass.Password; //bool loginResult = await CloureManager.login(user, pass, chKeepConnected.IsChecked.Value); List <CloureParam> cloureParams = new List <CloureParam>(); cloureParams.Add(new CloureParam("module", "cloure_user")); cloureParams.Add(new CloureParam("topic", "login")); cloureParams.Add(new CloureParam("user", user)); cloureParams.Add(new CloureParam("pass", pass)); string res = await CloureManager.ExecuteAsync(cloureParams); JsonObject api_result = JsonObject.Parse(res); string error = api_result.GetNamedString("error"); if (error == "") { } else { btnLogin.IsEnabled = true; btnRegister.IsEnabled = true; loginProgress.IsActive = false; CloureManager.ShowDialog(error); } /* * if (loginResult) * { * Frame.Navigate(typeof(MainPage)); * } * else * { * btnLogin.IsEnabled = true; * btnRegister.IsEnabled = true; * loginProgress.IsActive = false; * } */ }