private async void LoginButton_Click(object sender, RoutedEventArgs e) { bool authenticationResult = await OAuth.Authenticate(); if (authenticationResult == true) { Frame.Navigate(typeof(PostView)); } }
private async void BTN_LOGIN_Click(object sender, EventArgs e) { PBAR_TIMEOUT.Value = 0; UPDATE_PROGRESSBAR_FLAG = true; await OAuth.Authenticate(); PBAR_TIMEOUT.Value = 0; UPDATE_PROGRESSBAR_FLAG = false; if (!OAuth.isAuthenticated()) { MessageBox.Show(OAuth.LastErrorMessage, OAuth.LastErrorMessage, MessageBoxButtons.OK); return; } Hide(); var mainForm = new MainForm(); mainForm.Show(); mainForm.Focus(); }
public void Session_Start(object sender, EventArgs e) { Session["Token"] = OAuth.Authenticate("apitest", "12345678"); }