コード例 #1
0
        private void AddEdit()
        {
            this.timerUpdateTotp.Enabled = false;
            this.groupboxTotp.Text       = "TOTP";
            this.labelOtp.Text           = "000000";
            this.totp = null;

            var addEditForm = new OtpInformation(this.data, this.entry, this.host);

            var result = addEditForm.ShowDialog();

            if (result == System.Windows.Forms.DialogResult.OK)
            {
                this.data = OtpAuthUtils.loadData(this.entry);

                if (this.data != null)
                {
                    this.ShowCode();
                }
                else
                {
                    this.Close();
                }
            }
            else if (this.data == null)
            {
                this.Close();
            }
            else
            {
                this.ShowCode();
            }
        }
コード例 #2
0
        private void AddEdit()
        {
            this.timerUpdateOtp.Enabled = false;
            this.groupboxTotp.Text      = KeeOtp2Statics.TOTP;
            this.labelOtp.Text          = insertSpaceInMiddle("000000");
            this.otp = null;

            OtpInformation addEditForm = new OtpInformation(this.data, this.entry, this.host);

            var result = addEditForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                this.data = OtpAuthUtils.loadData(this.entry);
                this.otp  = OtpAuthUtils.getOtp(this.data);

                if (this.data != null)
                {
                    this.ShowCode();
                }
                else
                {
                    this.Close();
                }
            }
            else if (this.data == null)
            {
                this.Close();
            }
            else
            {
                this.ShowCode();
            }
        }
コード例 #3
0
ファイル: KeeOtp2Ext.cs プロジェクト: tiuub/KeeOtp2
        private void otpConfigureToolStripItem_Click(object sender, EventArgs e)
        {
            PwEntry entry;

            if (GetSelectedSingleEntry(out entry))
            {
                OtpAuthData    data        = OtpAuthUtils.loadData(entry);
                OtpInformation addEditForm = new OtpInformation(data, entry, host);
                addEditForm.ShowDialog();
            }
        }