コード例 #1
0
        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();
            }
        }
コード例 #2
0
ファイル: LoginForm.cs プロジェクト: cheezeburger/InstaCheeze
        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();
                }
            }
        }