private async void TwoFactorLoginBtn_Click(object sender, EventArgs e) { instaApi = User.SessionApiBuilder(); var twoFactorLogin = await instaApi.TwoFactorLoginAsync(TwoFactorCodeTxt.Text); if (twoFactorLogin.Succeeded) { var panelForm = new PanelForm(); panelForm.ShowDialog(); this.Hide(); } }
private void LoginForm_Load(object sender, EventArgs e) { newUser = new User(); if (Properties.Settings.Default.username != null && Properties.Settings.Default.password != null) { usernameTxt.Text = Properties.Settings.Default.username; passwordTxt.Text = Properties.Settings.Default.password; //Attempt to automatically load previous saved session if (File.Exists("state.bin")) { LoadSavedSession(); var panelForm = new PanelForm(); panelForm.ShowDialog(); this.Hide(); } } }