public async void Login() { try { await MegaClient.LoginAsync(usernameInput.Text, passwordInput.Text); statusLabel.Text = "Logged in!"; MGFuseUI.ShowPanel <MgmtPanel>(); return; } catch (ApiException ex) { MessageBox.Show("API Error: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception) { MessageBox.Show("Failed logging in! Please try again later.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } statusLabel.Text = "Login failed!"; loginBtn.Enabled = true; }