public async void Register(string email, string password) { ConnectionApi.Configure(); var methods = new UserMethod(ConnectionApi.HttpClient); try { await methods.Register(email, password); } catch (Exception ex) { MessageBox.Show(ex.Message); } var loginWindow = new MultiNotesLoginWindow(); loginWindow.Show(); _closeAction.Invoke(); }
public async void MakeLoginTask() { try { UserMethod methods = new UserMethod(ConnectionApi.HttpClient); methods.PreparedAuthenticationRecord(); await methods.Login(methods.Record.Email, methods.Record.PasswordHash, true); MultiNotesMainWindow mainWindow = new MultiNotesMainWindow(); mainWindow.Show(); } catch (Exception e) { MultiNotesLoginWindow loginWindow = new MultiNotesLoginWindow(); loginWindow.Show(); } }