Пример #1
0
        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();
            }
        }
Пример #2
0
        public async void Login(string email, string password, bool isPasswordHashed = false)
        {
            var methods = new UserMethod(ConnectionApi.HttpClient);

            try
            {
                await methods.Login(email, password, isPasswordHashed);

                MultiNotesMainWindow mainWindow = new MultiNotesMainWindow();
                mainWindow.Show();
                _closeAction.Invoke();
            }
            catch (Exception e)
            {
                //todo: tak nie moze zostac, tu musi byc sensowna obsluga wyjatkow roznych typow
                MessageBox.Show("Dupas");
            }
        }