private async void OkButton_Click(object sender, RoutedEventArgs e) { Classes.Request.Auth.Register register = new Classes.Request.Auth.Register(); if (passOneEntry.Password != passTwoEntry.Password) { setError("password"); return; } if (firstnameEntry.Text == string.Empty) { setError("FistName"); return; } if (mailEntry.Text == string.Empty || !mailEntry.Text.Contains("@")) { setError("Mail"); return; } register.SetParam(mailEntry.Text, passOneEntry.Password, firstnameEntry.Text); try { var obj = await register.GetJsonAsync(); Popup p = this.Parent as Popup; HideAnnim.Begin(); p.IsOpen = false; } catch (System.Net.Http.HttpRequestException ex) { setError("Error Network"); Debug.WriteLine(ex); } catch (Newtonsoft.Json.JsonException jEx) { setError("Error Json"); Debug.WriteLine(jEx); } }
private async void OkButton_Click(object sender, RoutedEventArgs e) { Classes.Request.Auth.Register register = new Classes.Request.Auth.Register(); if (passOneEntry.Password != passTwoEntry.Password) { setError("password"); return; } if (firstnameEntry.Text == string.Empty) { setError("FistName"); return; } if (mailEntry.Text == string.Empty || !mailEntry.Text.Contains("@")) { setError("Mail"); return; } register.SetParam(mailEntry.Text, passOneEntry.Password, firstnameEntry.Text); try { var obj = await register.GetJsonAsync(); Popup p = this.Parent as Popup; HideAnnim.Begin(); p.IsOpen = false; } catch (System.Net.Http.HttpRequestException ex) { setError("Error Network"); Debug.WriteLine(ex); } catch (Newtonsoft.Json.JsonException jEx) { setError("Error Json"); Debug.WriteLine(jEx); } }