private async void BtnDelete_OnClick(object sender, RoutedEventArgs e)
        {
            Reply accept;

            try
            {
                accept = await Client.DeleteAccount();

                if (!accept.Sucsses)
                {
                    MessageBox.Show(accept.ErrorMessage, "Warning");
                }
                else
                {
                    MessageBox.Show("Account has been deleted", "Success");
                    UserControlLogin login = new UserControlLogin();
                    this.Content = login;
                }
            }
            catch (HttpRequestException exception)
            {
                MessageBox.Show(exception.Message, "Warning");
            }
        }
Beispiel #2
0
        private void Button_Click_Back(object sender, RoutedEventArgs e)
        {
            UserControlLogin login = new UserControlLogin();

            this.Content = login;
        }