diff --git a/src/KeePassOTPExt.cs b/src/KeePassOTPExt.cs index 3265b1f..509c7b2 100644 --- a/src/KeePassOTPExt.cs +++ b/src/KeePassOTPExt.cs @@ -661,33 +661,40 @@ internal static void CopyToClipboardAndStartClipboardCountdown(PwEntry pe, KPOTP //No renewal for HOTP to ensure counters remain in sync if (kOTP.Type == KPOTPType.HOTP) return; - int iRemainingSeconds = Program.Config.Security.ClipboardClearAfterSeconds - kOTP.RemainingSeconds; + int iOTPValiditiy = kOTP.RemainingSeconds; + int iRemainingSeconds = Program.Config.Security.ClipboardClearAfterSeconds - iOTPValiditiy; int iAdditionalRenewals = 0; - Config.OTPRenewal = Config.OTPRenewal_Enum.RespectClipboardTimeout; - if (Config.OTPRenewal == Config.OTPRenewal_Enum.PreventShortDuration) + bool bRestartClipboardCountdownOnce = false; + //Renew OTP once if it will expire soon + //This applies for both PreventShortDuration as well as RespectClipboardTimeout + if (iOTPValiditiy < Config.TOTPSoonExpiring) { - //Renew OTP once if it will expire soon - if (kOTP.RemainingSeconds > Config.TOTPSoonExpiring) return; iAdditionalRenewals = 1; + //If clipboard countdown is active but lower then Config.TOTPSoonExpiring + //Restart clipboard countdown as well + bRestartClipboardCountdownOnce = Program.Config.Security.ClipboardClearAfterSeconds > 0 + && Program.Config.Security.ClipboardClearAfterSeconds <= Config.TOTPSoonExpiring; } + else if (iRemainingSeconds < 0) //OTP lifetime is longer than clipboard countdown timer + iAdditionalRenewals = 0; else if (Config.OTPRenewal == Config.OTPRenewal_Enum.RespectClipboardTimeout) { - //Renew OTP once if it will expire soon and clipboard is not cleared at all - if ((Program.Config.Security.ClipboardClearAfterSeconds < 1) && (kOTP.RemainingSeconds < Config.TOTPSoonExpiring)) - iAdditionalRenewals = 1; - else if (iRemainingSeconds < 0) return; //OTP lifetime is longer than clipboard countdown timer - else + iAdditionalRenewals = 1; + while (iRemainingSeconds > kOTP.TOTPTimestep) { - iAdditionalRenewals = 1; - while (iRemainingSeconds > kOTP.TOTPTimestep) - { - iAdditionalRenewals++; - iRemainingSeconds -= kOTP.TOTPTimestep; - } + iAdditionalRenewals++; + iRemainingSeconds -= kOTP.TOTPTimestep; } } - + PluginDebug.AddInfo("OTP renewal", + "Renewals: " + iAdditionalRenewals.ToString(), + "RestartClipboardCountdown: " + bRestartClipboardCountdownOnce, + "RenewalType: " + Config.OTPRenewal.ToString(), + "ClipboardTimeout: " + Program.Config.Security.ClipboardClearAfterSeconds.ToString(), + "OTP validity: " + iOTPValiditiy.ToString()); + + if (iAdditionalRenewals < 1) return; //If current OTP will expire before the clipboard will be cleared, copy new one as soon as neccessary //Do _NOT_ extend the clipboard countdown @@ -712,7 +719,11 @@ internal static void CopyToClipboardAndStartClipboardCountdown(PwEntry pe, KPOTP //Copy new OTP to clipboard //Do NOT minimize again ClipboardUtil.Copy(sOTP, false, false, null, null, Program.MainForm.Handle); - Program.MainForm.SetStatusEx("Update TOTP " + sOTP); + if (bRestartClipboardCountdownOnce) + { + bRestartClipboardCountdownOnce = false; + Program.MainForm.StartClipboardCountdown(); + } }; //m_tClipboardRenewalTimer.Tag = lParams; m_tClipboardRenewalTimer.Interval = kOTP.RemainingSeconds * 1000; diff --git a/src/KeePassOTPSetup.Designer.cs b/src/KeePassOTPSetup.Designer.cs index 2543025..7af4d57 100644 --- a/src/KeePassOTPSetup.Designer.cs +++ b/src/KeePassOTPSetup.Designer.cs @@ -56,472 +56,435 @@ protected override void Dispose(bool disposing) /// Do not change the method contents inside the source code editor. The Forms designer might private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.gSeed = new System.Windows.Forms.GroupBox(); - this.pbSearchScreen = new System.Windows.Forms.PictureBox(); - this.pbQR = new System.Windows.Forms.PictureBox(); - this.pbTOTPLifetime = new System.Windows.Forms.ProgressBar(); - this.otpPreviewNext = new System.Windows.Forms.Label(); - this.otpPreview = new System.Windows.Forms.Label(); - this.tbOTPSeed = new System.Windows.Forms.TextBox(); - this.lSeed = new System.Windows.Forms.Label(); - this.gOTP = new System.Windows.Forms.GroupBox(); - this.cbOTPFormat = new System.Windows.Forms.ComboBox(); - this.lFormat = new System.Windows.Forms.Label(); - this.tbTOTPTimestep = new System.Windows.Forms.TextBox(); - this.lTimestep = new System.Windows.Forms.Label(); - this.tbHOTPCounter = new System.Windows.Forms.TextBox(); - this.lCounter = new System.Windows.Forms.Label(); - this.cbOTPHashFunc = new System.Windows.Forms.ComboBox(); - this.cbOTPLength = new System.Windows.Forms.ComboBox(); - this.cbOTPType = new System.Windows.Forms.ComboBox(); - this.lHash = new System.Windows.Forms.Label(); - this.lLength = new System.Windows.Forms.Label(); - this.lType = new System.Windows.Forms.Label(); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.gTime = new System.Windows.Forms.GroupBox(); - this.totpTimeCorrectionValue = new System.Windows.Forms.Label(); - this.lTime = new System.Windows.Forms.Label(); - this.lTimeType = new System.Windows.Forms.Label(); - this.totpTimeCorrectionType = new System.Windows.Forms.ComboBox(); - this.tbTOTPTimeCorrectionURL = new System.Windows.Forms.TextBox(); - this.lURL = new System.Windows.Forms.Label(); - this.cbAdvanced = new System.Windows.Forms.CheckBox(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.tbYandexPin = new System.Windows.Forms.TextBox(); - this.lYandexPin = new System.Windows.Forms.Label(); - this.gSeed.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbSearchScreen)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbQR)).BeginInit(); - this.gOTP.SuspendLayout(); - this.gTime.SuspendLayout(); - this.SuspendLayout(); - // - // gSeed - // - this.gSeed.Controls.Add(this.pbSearchScreen); - this.gSeed.Controls.Add(this.pbQR); - this.gSeed.Controls.Add(this.pbTOTPLifetime); - this.gSeed.Controls.Add(this.otpPreviewNext); - this.gSeed.Controls.Add(this.otpPreview); - this.gSeed.Controls.Add(this.tbOTPSeed); - this.gSeed.Controls.Add(this.lSeed); - this.gSeed.Dock = System.Windows.Forms.DockStyle.Top; - this.gSeed.Location = new System.Drawing.Point(9, 8); - this.gSeed.Margin = new System.Windows.Forms.Padding(5); - this.gSeed.Name = "gSeed"; - this.gSeed.Padding = new System.Windows.Forms.Padding(5); - this.gSeed.Size = new System.Drawing.Size(938, 226); - this.gSeed.TabIndex = 2; - this.gSeed.TabStop = false; - this.gSeed.Text = "Seed data"; - // - // pbSearchScreen - // - this.pbSearchScreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.pbSearchScreen.InitialImage = null; - this.pbSearchScreen.Location = new System.Drawing.Point(761, 82); - this.pbSearchScreen.Margin = new System.Windows.Forms.Padding(5); - this.pbSearchScreen.Name = "pbSearchScreen"; - this.pbSearchScreen.Size = new System.Drawing.Size(124, 124); - this.pbSearchScreen.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbSearchScreen.TabIndex = 411; - this.pbSearchScreen.TabStop = false; - this.pbSearchScreen.Click += new System.EventHandler(this.bSearchScreen_Click); - this.pbSearchScreen.MouseHover += new System.EventHandler(this.bSearchScreen_MouseHover); - // - // pbQR - // - this.pbQR.ErrorImage = null; - this.pbQR.InitialImage = null; - this.pbQR.Location = new System.Drawing.Point(14, 82); - this.pbQR.Margin = new System.Windows.Forms.Padding(5); - this.pbQR.Name = "pbQR"; - this.pbQR.Size = new System.Drawing.Size(142, 124); - this.pbQR.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbQR.TabIndex = 14; - this.pbQR.TabStop = false; - this.pbQR.DragDrop += new System.Windows.Forms.DragEventHandler(this.pbQR_DragDrop); - this.pbQR.DragEnter += new System.Windows.Forms.DragEventHandler(this.pbQR_DragEnter); - this.pbQR.MouseHover += new System.EventHandler(this.pbQR_MouseHover); - // - // pbTOTPLifetime - // - this.pbTOTPLifetime.Location = new System.Drawing.Point(174, 133); - this.pbTOTPLifetime.Margin = new System.Windows.Forms.Padding(5); - this.pbTOTPLifetime.Name = "pbTOTPLifetime"; - this.pbTOTPLifetime.Size = new System.Drawing.Size(580, 3); - this.pbTOTPLifetime.Step = 1; - this.pbTOTPLifetime.Style = System.Windows.Forms.ProgressBarStyle.Continuous; - this.pbTOTPLifetime.TabIndex = 13; - this.pbTOTPLifetime.Value = 100; - // - // otpPreviewNext - // - this.otpPreviewNext.AutoSize = true; - this.otpPreviewNext.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.otpPreviewNext.Location = new System.Drawing.Point(174, 141); - this.otpPreviewNext.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.otpPreviewNext.Name = "otpPreviewNext"; - this.otpPreviewNext.Size = new System.Drawing.Size(63, 31); - this.otpPreviewNext.TabIndex = 12; - this.otpPreviewNext.Text = "N/A"; - // - // otpPreview - // - this.otpPreview.AutoSize = true; - this.otpPreview.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.otpPreview.ForeColor = System.Drawing.SystemColors.ControlText; - this.otpPreview.Location = new System.Drawing.Point(173, 86); - this.otpPreview.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.otpPreview.Name = "otpPreview"; - this.otpPreview.Size = new System.Drawing.Size(83, 42); - this.otpPreview.TabIndex = 11; - this.otpPreview.Text = "N/A"; - // - // tbOTPSeed - // - this.tbOTPSeed.Location = new System.Drawing.Point(178, 40); - this.tbOTPSeed.Margin = new System.Windows.Forms.Padding(5); - this.tbOTPSeed.Name = "tbOTPSeed"; - this.tbOTPSeed.Size = new System.Drawing.Size(708, 38); - this.tbOTPSeed.TabIndex = 100; - this.tbOTPSeed.Leave += new System.EventHandler(this.OnValueChanged); - // - // lSeed - // - this.lSeed.Location = new System.Drawing.Point(11, 46); - this.lSeed.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lSeed.Name = "lSeed"; - this.lSeed.Size = new System.Drawing.Size(160, 31); - this.lSeed.TabIndex = 4; - this.lSeed.Text = "Seed:"; - // - // gOTP - // - this.gOTP.Controls.Add(this.lYandexPin); - this.gOTP.Controls.Add(this.tbYandexPin); - this.gOTP.Controls.Add(this.cbOTPFormat); - this.gOTP.Controls.Add(this.lFormat); - this.gOTP.Controls.Add(this.tbTOTPTimestep); - this.gOTP.Controls.Add(this.lTimestep); - this.gOTP.Controls.Add(this.tbHOTPCounter); - this.gOTP.Controls.Add(this.lCounter); - this.gOTP.Controls.Add(this.cbOTPHashFunc); - this.gOTP.Controls.Add(this.cbOTPLength); - this.gOTP.Controls.Add(this.cbOTPType); - this.gOTP.Controls.Add(this.lHash); - this.gOTP.Controls.Add(this.lLength); - this.gOTP.Controls.Add(this.lType); - this.gOTP.Dock = System.Windows.Forms.DockStyle.Top; - this.gOTP.Location = new System.Drawing.Point(9, 270); - this.gOTP.Margin = new System.Windows.Forms.Padding(5); - this.gOTP.Name = "gOTP"; - this.gOTP.Padding = new System.Windows.Forms.Padding(5); - this.gOTP.Size = new System.Drawing.Size(938, 273); - this.gOTP.TabIndex = 3; - this.gOTP.TabStop = false; - this.gOTP.Text = "OTP settings"; - // - // cbOTPFormat - // - this.cbOTPFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbOTPFormat.FormattingEnabled = true; - this.cbOTPFormat.Items.AddRange(new object[] { + this.components = new System.ComponentModel.Container(); + this.gSeed = new System.Windows.Forms.GroupBox(); + this.pbSearchScreen = new System.Windows.Forms.PictureBox(); + this.pbQR = new System.Windows.Forms.PictureBox(); + this.pbTOTPLifetime = new System.Windows.Forms.ProgressBar(); + this.otpPreviewNext = new System.Windows.Forms.Label(); + this.otpPreview = new System.Windows.Forms.Label(); + this.tbOTPSeed = new System.Windows.Forms.TextBox(); + this.lSeed = new System.Windows.Forms.Label(); + this.gOTP = new System.Windows.Forms.GroupBox(); + this.lYandexPin = new System.Windows.Forms.Label(); + this.tbYandexPin = new System.Windows.Forms.TextBox(); + this.cbOTPFormat = new System.Windows.Forms.ComboBox(); + this.lFormat = new System.Windows.Forms.Label(); + this.tbTOTPTimestep = new System.Windows.Forms.TextBox(); + this.lTimestep = new System.Windows.Forms.Label(); + this.tbHOTPCounter = new System.Windows.Forms.TextBox(); + this.lCounter = new System.Windows.Forms.Label(); + this.cbOTPHashFunc = new System.Windows.Forms.ComboBox(); + this.cbOTPLength = new System.Windows.Forms.ComboBox(); + this.cbOTPType = new System.Windows.Forms.ComboBox(); + this.lHash = new System.Windows.Forms.Label(); + this.lLength = new System.Windows.Forms.Label(); + this.lType = new System.Windows.Forms.Label(); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.gTime = new System.Windows.Forms.GroupBox(); + this.totpTimeCorrectionValue = new System.Windows.Forms.Label(); + this.lTime = new System.Windows.Forms.Label(); + this.lTimeType = new System.Windows.Forms.Label(); + this.totpTimeCorrectionType = new System.Windows.Forms.ComboBox(); + this.tbTOTPTimeCorrectionURL = new System.Windows.Forms.TextBox(); + this.lURL = new System.Windows.Forms.Label(); + this.cbAdvanced = new System.Windows.Forms.CheckBox(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.gSeed.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbSearchScreen)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbQR)).BeginInit(); + this.gOTP.SuspendLayout(); + this.gTime.SuspendLayout(); + this.SuspendLayout(); + // + // gSeed + // + this.gSeed.Controls.Add(this.pbSearchScreen); + this.gSeed.Controls.Add(this.pbQR); + this.gSeed.Controls.Add(this.pbTOTPLifetime); + this.gSeed.Controls.Add(this.otpPreviewNext); + this.gSeed.Controls.Add(this.otpPreview); + this.gSeed.Controls.Add(this.tbOTPSeed); + this.gSeed.Controls.Add(this.lSeed); + this.gSeed.Dock = System.Windows.Forms.DockStyle.Top; + this.gSeed.Location = new System.Drawing.Point(5, 5); + this.gSeed.Name = "gSeed"; + this.gSeed.Size = new System.Drawing.Size(528, 146); + this.gSeed.TabIndex = 2; + this.gSeed.TabStop = false; + this.gSeed.Text = "Seed data"; + // + // pbSearchScreen + // + this.pbSearchScreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pbSearchScreen.InitialImage = null; + this.pbSearchScreen.Location = new System.Drawing.Point(428, 57); + this.pbSearchScreen.Name = "pbSearchScreen"; + this.pbSearchScreen.Size = new System.Drawing.Size(70, 80); + this.pbSearchScreen.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbSearchScreen.TabIndex = 411; + this.pbSearchScreen.TabStop = false; + this.pbSearchScreen.Click += new System.EventHandler(this.bSearchScreen_Click); + this.pbSearchScreen.MouseHover += new System.EventHandler(this.bSearchScreen_MouseHover); + // + // pbQR + // + this.pbQR.ErrorImage = null; + this.pbQR.InitialImage = null; + this.pbQR.Location = new System.Drawing.Point(8, 57); + this.pbQR.Name = "pbQR"; + this.pbQR.Size = new System.Drawing.Size(80, 80); + this.pbQR.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbQR.TabIndex = 14; + this.pbQR.TabStop = false; + this.pbQR.DragDrop += new System.Windows.Forms.DragEventHandler(this.pbQR_DragDrop); + this.pbQR.DragEnter += new System.Windows.Forms.DragEventHandler(this.pbQR_DragEnter); + this.pbQR.MouseHover += new System.EventHandler(this.pbQR_MouseHover); + // + // pbTOTPLifetime + // + this.pbTOTPLifetime.Location = new System.Drawing.Point(98, 88); + this.pbTOTPLifetime.Name = "pbTOTPLifetime"; + this.pbTOTPLifetime.Size = new System.Drawing.Size(326, 2); + this.pbTOTPLifetime.Step = 1; + this.pbTOTPLifetime.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.pbTOTPLifetime.TabIndex = 13; + this.pbTOTPLifetime.Value = 100; + // + // otpPreviewNext + // + this.otpPreviewNext.AutoSize = true; + this.otpPreviewNext.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.otpPreviewNext.Location = new System.Drawing.Point(98, 93); + this.otpPreviewNext.Name = "otpPreviewNext"; + this.otpPreviewNext.Size = new System.Drawing.Size(38, 20); + this.otpPreviewNext.TabIndex = 12; + this.otpPreviewNext.Text = "N/A"; + // + // otpPreview + // + this.otpPreview.AutoSize = true; + this.otpPreview.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.otpPreview.ForeColor = System.Drawing.SystemColors.ControlText; + this.otpPreview.Location = new System.Drawing.Point(97, 57); + this.otpPreview.Name = "otpPreview"; + this.otpPreview.Size = new System.Drawing.Size(52, 26); + this.otpPreview.TabIndex = 11; + this.otpPreview.Text = "N/A"; + // + // tbOTPSeed + // + this.tbOTPSeed.Location = new System.Drawing.Point(100, 26); + this.tbOTPSeed.Name = "tbOTPSeed"; + this.tbOTPSeed.Size = new System.Drawing.Size(400, 26); + this.tbOTPSeed.TabIndex = 100; + this.tbOTPSeed.Leave += new System.EventHandler(this.OnValueChanged); + // + // lSeed + // + this.lSeed.Location = new System.Drawing.Point(6, 30); + this.lSeed.Name = "lSeed"; + this.lSeed.Size = new System.Drawing.Size(90, 20); + this.lSeed.TabIndex = 4; + this.lSeed.Text = "Seed:"; + // + // gOTP + // + this.gOTP.Controls.Add(this.lYandexPin); + this.gOTP.Controls.Add(this.tbYandexPin); + this.gOTP.Controls.Add(this.cbOTPFormat); + this.gOTP.Controls.Add(this.lFormat); + this.gOTP.Controls.Add(this.tbTOTPTimestep); + this.gOTP.Controls.Add(this.lTimestep); + this.gOTP.Controls.Add(this.tbHOTPCounter); + this.gOTP.Controls.Add(this.lCounter); + this.gOTP.Controls.Add(this.cbOTPHashFunc); + this.gOTP.Controls.Add(this.cbOTPLength); + this.gOTP.Controls.Add(this.cbOTPType); + this.gOTP.Controls.Add(this.lHash); + this.gOTP.Controls.Add(this.lLength); + this.gOTP.Controls.Add(this.lType); + this.gOTP.Dock = System.Windows.Forms.DockStyle.Top; + this.gOTP.Location = new System.Drawing.Point(5, 175); + this.gOTP.Name = "gOTP"; + this.gOTP.Size = new System.Drawing.Size(528, 176); + this.gOTP.TabIndex = 3; + this.gOTP.TabStop = false; + this.gOTP.Text = "OTP settings"; + // + // lYandexPin + // + this.lYandexPin.Location = new System.Drawing.Point(250, 24); + this.lYandexPin.Name = "lYandexPin"; + this.lYandexPin.Size = new System.Drawing.Size(120, 23); + this.lYandexPin.TabIndex = 5222; + this.lYandexPin.Text = "Pin:"; + // + // tbYandexPin + // + this.tbYandexPin.Location = new System.Drawing.Point(380, 20); + this.tbYandexPin.Name = "tbYandexPin"; + this.tbYandexPin.Size = new System.Drawing.Size(100, 26); + this.tbYandexPin.TabIndex = 5221; + // + // cbOTPFormat + // + this.cbOTPFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbOTPFormat.FormattingEnabled = true; + this.cbOTPFormat.Items.AddRange(new object[] { "BASE32", "BASE64", "HEX", "UTF8"}); - this.cbOTPFormat.Location = new System.Drawing.Point(178, 90); - this.cbOTPFormat.Margin = new System.Windows.Forms.Padding(5); - this.cbOTPFormat.Name = "cbOTPFormat"; - this.cbOTPFormat.Size = new System.Drawing.Size(212, 39); - this.cbOTPFormat.TabIndex = 230; - // - // lFormat - // - this.lFormat.Location = new System.Drawing.Point(14, 96); - this.lFormat.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lFormat.Name = "lFormat"; - this.lFormat.Size = new System.Drawing.Size(160, 36); - this.lFormat.TabIndex = 9; - this.lFormat.Text = "Format:"; - // - // tbTOTPTimestep - // - this.tbTOTPTimestep.Location = new System.Drawing.Point(676, 31); - this.tbTOTPTimestep.Margin = new System.Windows.Forms.Padding(5); - this.tbTOTPTimestep.Name = "tbTOTPTimestep"; - this.tbTOTPTimestep.Size = new System.Drawing.Size(175, 38); - this.tbTOTPTimestep.TabIndex = 210; - this.tbTOTPTimestep.Leave += new System.EventHandler(this.OnValueChanged); - // - // lTimestep - // - this.lTimestep.Location = new System.Drawing.Point(444, 37); - this.lTimestep.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lTimestep.Name = "lTimestep"; - this.lTimestep.Size = new System.Drawing.Size(213, 36); - this.lTimestep.TabIndex = 7; - this.lTimestep.Text = "Timestep:"; - // - // tbHOTPCounter - // - this.tbHOTPCounter.Location = new System.Drawing.Point(676, 31); - this.tbHOTPCounter.Margin = new System.Windows.Forms.Padding(5); - this.tbHOTPCounter.Name = "tbHOTPCounter"; - this.tbHOTPCounter.Size = new System.Drawing.Size(175, 38); - this.tbHOTPCounter.TabIndex = 5220; - this.tbHOTPCounter.TextChanged += new System.EventHandler(this.OnValueChanged); - // - // lCounter - // - this.lCounter.Location = new System.Drawing.Point(444, 40); - this.lCounter.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lCounter.Name = "lCounter"; - this.lCounter.Size = new System.Drawing.Size(213, 36); - this.lCounter.TabIndex = 7; - this.lCounter.Text = "counter:"; - // - // cbOTPHashFunc - // - this.cbOTPHashFunc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbOTPHashFunc.FormattingEnabled = true; - this.cbOTPHashFunc.Items.AddRange(new object[] { + this.cbOTPFormat.Location = new System.Drawing.Point(100, 58); + this.cbOTPFormat.Name = "cbOTPFormat"; + this.cbOTPFormat.Size = new System.Drawing.Size(121, 28); + this.cbOTPFormat.TabIndex = 230; + // + // lFormat + // + this.lFormat.Location = new System.Drawing.Point(8, 62); + this.lFormat.Name = "lFormat"; + this.lFormat.Size = new System.Drawing.Size(90, 23); + this.lFormat.TabIndex = 9; + this.lFormat.Text = "Format:"; + // + // tbTOTPTimestep + // + this.tbTOTPTimestep.Location = new System.Drawing.Point(380, 20); + this.tbTOTPTimestep.Name = "tbTOTPTimestep"; + this.tbTOTPTimestep.Size = new System.Drawing.Size(100, 26); + this.tbTOTPTimestep.TabIndex = 210; + this.tbTOTPTimestep.Leave += new System.EventHandler(this.OnValueChanged); + // + // lTimestep + // + this.lTimestep.Location = new System.Drawing.Point(250, 24); + this.lTimestep.Name = "lTimestep"; + this.lTimestep.Size = new System.Drawing.Size(120, 23); + this.lTimestep.TabIndex = 7; + this.lTimestep.Text = "Timestep:"; + // + // tbHOTPCounter + // + this.tbHOTPCounter.Location = new System.Drawing.Point(380, 20); + this.tbHOTPCounter.Name = "tbHOTPCounter"; + this.tbHOTPCounter.Size = new System.Drawing.Size(100, 26); + this.tbHOTPCounter.TabIndex = 5220; + this.tbHOTPCounter.TextChanged += new System.EventHandler(this.OnValueChanged); + // + // lCounter + // + this.lCounter.Location = new System.Drawing.Point(250, 26); + this.lCounter.Name = "lCounter"; + this.lCounter.Size = new System.Drawing.Size(120, 23); + this.lCounter.TabIndex = 7; + this.lCounter.Text = "counter:"; + // + // cbOTPHashFunc + // + this.cbOTPHashFunc.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbOTPHashFunc.FormattingEnabled = true; + this.cbOTPHashFunc.Items.AddRange(new object[] { "SHA1", "SHA256", "SHA512"}); - this.cbOTPHashFunc.Location = new System.Drawing.Point(178, 208); - this.cbOTPHashFunc.Margin = new System.Windows.Forms.Padding(5); - this.cbOTPHashFunc.Name = "cbOTPHashFunc"; - this.cbOTPHashFunc.Size = new System.Drawing.Size(212, 39); - this.cbOTPHashFunc.TabIndex = 250; - this.cbOTPHashFunc.SelectedIndexChanged += new System.EventHandler(this.OnValueChanged); - // - // cbOTPLength - // - this.cbOTPLength.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbOTPLength.FormattingEnabled = true; - this.cbOTPLength.Items.AddRange(new object[] { + this.cbOTPHashFunc.Location = new System.Drawing.Point(100, 134); + this.cbOTPHashFunc.Name = "cbOTPHashFunc"; + this.cbOTPHashFunc.Size = new System.Drawing.Size(121, 28); + this.cbOTPHashFunc.TabIndex = 250; + this.cbOTPHashFunc.SelectedIndexChanged += new System.EventHandler(this.OnValueChanged); + // + // cbOTPLength + // + this.cbOTPLength.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbOTPLength.FormattingEnabled = true; + this.cbOTPLength.Items.AddRange(new object[] { "6", "7", "8", "9", "10"}); - this.cbOTPLength.Location = new System.Drawing.Point(178, 149); - this.cbOTPLength.Margin = new System.Windows.Forms.Padding(5); - this.cbOTPLength.Name = "cbOTPLength"; - this.cbOTPLength.Size = new System.Drawing.Size(212, 39); - this.cbOTPLength.TabIndex = 240; - this.cbOTPLength.SelectedIndexChanged += new System.EventHandler(this.OnValueChanged); - // - // cbOTPType - // - this.cbOTPType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbOTPType.FormattingEnabled = true; - this.cbOTPType.Items.AddRange(new object[] { + this.cbOTPLength.Location = new System.Drawing.Point(100, 96); + this.cbOTPLength.Name = "cbOTPLength"; + this.cbOTPLength.Size = new System.Drawing.Size(121, 28); + this.cbOTPLength.TabIndex = 240; + this.cbOTPLength.SelectedIndexChanged += new System.EventHandler(this.OnValueChanged); + // + // cbOTPType + // + this.cbOTPType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbOTPType.FormattingEnabled = true; + this.cbOTPType.Items.AddRange(new object[] { "HOTP", "TOTP", "Steam", "Yandex"}); - this.cbOTPType.Location = new System.Drawing.Point(178, 31); - this.cbOTPType.Margin = new System.Windows.Forms.Padding(5); - this.cbOTPType.Name = "cbOTPType"; - this.cbOTPType.Size = new System.Drawing.Size(212, 39); - this.cbOTPType.TabIndex = 200; - this.cbOTPType.SelectedIndexChanged += new System.EventHandler(this.OnValueChanged); - // - // lHash - // - this.lHash.Location = new System.Drawing.Point(11, 211); - this.lHash.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lHash.Name = "lHash"; - this.lHash.Size = new System.Drawing.Size(160, 36); - this.lHash.TabIndex = 2; - this.lHash.Text = "OTP hash:"; - // - // lLength - // - this.lLength.Location = new System.Drawing.Point(11, 152); - this.lLength.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lLength.Name = "lLength"; - this.lLength.Size = new System.Drawing.Size(160, 36); - this.lLength.TabIndex = 1; - this.lLength.Text = "OTP length:"; - // - // lType - // - this.lType.Location = new System.Drawing.Point(11, 37); - this.lType.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lType.Name = "lType"; - this.lType.Size = new System.Drawing.Size(160, 36); - this.lType.TabIndex = 0; - this.lType.Text = "OTP type:"; - // - // buttonOK - // - this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.buttonOK.Location = new System.Drawing.Point(562, 753); - this.buttonOK.Margin = new System.Windows.Forms.Padding(5); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(178, 46); - this.buttonOK.TabIndex = 400; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - // - // buttonCancel - // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(770, 753); - this.buttonCancel.Margin = new System.Windows.Forms.Padding(5); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(178, 46); - this.buttonCancel.TabIndex = 410; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - // - // gTime - // - this.gTime.Controls.Add(this.totpTimeCorrectionValue); - this.gTime.Controls.Add(this.lTime); - this.gTime.Controls.Add(this.lTimeType); - this.gTime.Controls.Add(this.totpTimeCorrectionType); - this.gTime.Controls.Add(this.tbTOTPTimeCorrectionURL); - this.gTime.Controls.Add(this.lURL); - this.gTime.Dock = System.Windows.Forms.DockStyle.Top; - this.gTime.Location = new System.Drawing.Point(9, 543); - this.gTime.Margin = new System.Windows.Forms.Padding(5); - this.gTime.Name = "gTime"; - this.gTime.Padding = new System.Windows.Forms.Padding(5); - this.gTime.Size = new System.Drawing.Size(938, 186); - this.gTime.TabIndex = 10; - this.gTime.TabStop = false; - this.gTime.Text = "Time correction - TOTP && Steam only"; - // - // totpTimeCorrectionValue - // - this.totpTimeCorrectionValue.Location = new System.Drawing.Point(174, 144); - this.totpTimeCorrectionValue.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.totpTimeCorrectionValue.Name = "totpTimeCorrectionValue"; - this.totpTimeCorrectionValue.Size = new System.Drawing.Size(160, 31); - this.totpTimeCorrectionValue.TabIndex = 11; - this.totpTimeCorrectionValue.Text = "N/A"; - // - // lTime - // - this.lTime.Location = new System.Drawing.Point(11, 144); - this.lTime.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lTime.Name = "lTime"; - this.lTime.Size = new System.Drawing.Size(160, 31); - this.lTime.TabIndex = 10; - this.lTime.Text = "Time correction:"; - // - // lTimeType - // - this.lTimeType.AutoSize = true; - this.lTimeType.Location = new System.Drawing.Point(11, 53); - this.lTimeType.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lTimeType.Name = "lTimeType"; - this.lTimeType.Size = new System.Drawing.Size(86, 32); - this.lTimeType.TabIndex = 8; - this.lTimeType.Text = "Type:"; - // - // totpTimeCorrectionType - // - this.totpTimeCorrectionType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.totpTimeCorrectionType.FormattingEnabled = true; - this.totpTimeCorrectionType.Location = new System.Drawing.Point(178, 45); - this.totpTimeCorrectionType.Margin = new System.Windows.Forms.Padding(5); - this.totpTimeCorrectionType.Name = "totpTimeCorrectionType"; - this.totpTimeCorrectionType.Size = new System.Drawing.Size(708, 39); - this.totpTimeCorrectionType.TabIndex = 300; - this.totpTimeCorrectionType.SelectedIndexChanged += new System.EventHandler(this.OnValueChanged); - // - // tbTOTPTimeCorrectionURL - // - this.tbTOTPTimeCorrectionURL.Location = new System.Drawing.Point(178, 98); - this.tbTOTPTimeCorrectionURL.Margin = new System.Windows.Forms.Padding(5); - this.tbTOTPTimeCorrectionURL.Name = "tbTOTPTimeCorrectionURL"; - this.tbTOTPTimeCorrectionURL.Size = new System.Drawing.Size(708, 38); - this.tbTOTPTimeCorrectionURL.TabIndex = 310; - // - // lURL - // - this.lURL.Location = new System.Drawing.Point(11, 102); - this.lURL.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lURL.Name = "lURL"; - this.lURL.Size = new System.Drawing.Size(160, 36); - this.lURL.TabIndex = 6; - this.lURL.Text = "URL:"; - // - // cbAdvanced - // - this.cbAdvanced.AutoSize = true; - this.cbAdvanced.Checked = true; - this.cbAdvanced.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbAdvanced.Dock = System.Windows.Forms.DockStyle.Top; - this.cbAdvanced.Location = new System.Drawing.Point(9, 234); - this.cbAdvanced.Margin = new System.Windows.Forms.Padding(5); - this.cbAdvanced.Name = "cbAdvanced"; - this.cbAdvanced.Size = new System.Drawing.Size(938, 36); - this.cbAdvanced.TabIndex = 11; - this.cbAdvanced.Text = "cbAdvanced"; - this.cbAdvanced.UseVisualStyleBackColor = true; - this.cbAdvanced.CheckedChanged += new System.EventHandler(this.cbAdvanced_CheckedChanged); - // - // tbYandexPin - // - this.tbYandexPin.Location = new System.Drawing.Point(676, 31); - this.tbYandexPin.Margin = new System.Windows.Forms.Padding(5); - this.tbYandexPin.Name = "tbYandexPin"; - this.tbYandexPin.Size = new System.Drawing.Size(175, 38); - this.tbYandexPin.TabIndex = 5221; - // - // lYandexPin - // - this.lYandexPin.Location = new System.Drawing.Point(444, 37); - this.lYandexPin.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.lYandexPin.Name = "lYandexPin"; - this.lYandexPin.Size = new System.Drawing.Size(213, 36); - this.lYandexPin.TabIndex = 5222; - this.lYandexPin.Text = "Pin:"; - // - // KeePassOTPSetup - // - this.AcceptButton = this.buttonOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(16F, 31F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(956, 814); - this.Controls.Add(this.gTime); - this.Controls.Add(this.gOTP); - this.Controls.Add(this.cbAdvanced); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.gSeed); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Margin = new System.Windows.Forms.Padding(5); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "KeePassOTPSetup"; - this.Padding = new System.Windows.Forms.Padding(9, 8, 9, 8); - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "KeePassOTPSetup"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing); - this.Shown += new System.EventHandler(this.KeePassOTPSetup_Shown); - this.gSeed.ResumeLayout(false); - this.gSeed.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbSearchScreen)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.pbQR)).EndInit(); - this.gOTP.ResumeLayout(false); - this.gOTP.PerformLayout(); - this.gTime.ResumeLayout(false); - this.gTime.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.cbOTPType.Location = new System.Drawing.Point(100, 20); + this.cbOTPType.Name = "cbOTPType"; + this.cbOTPType.Size = new System.Drawing.Size(121, 28); + this.cbOTPType.TabIndex = 200; + this.cbOTPType.SelectedIndexChanged += new System.EventHandler(this.OnValueChanged); + // + // lHash + // + this.lHash.Location = new System.Drawing.Point(6, 136); + this.lHash.Name = "lHash"; + this.lHash.Size = new System.Drawing.Size(90, 23); + this.lHash.TabIndex = 2; + this.lHash.Text = "OTP hash:"; + // + // lLength + // + this.lLength.Location = new System.Drawing.Point(6, 98); + this.lLength.Name = "lLength"; + this.lLength.Size = new System.Drawing.Size(90, 23); + this.lLength.TabIndex = 1; + this.lLength.Text = "OTP length:"; + // + // lType + // + this.lType.Location = new System.Drawing.Point(6, 24); + this.lType.Name = "lType"; + this.lType.Size = new System.Drawing.Size(90, 23); + this.lType.TabIndex = 0; + this.lType.Text = "OTP type:"; + // + // buttonOK + // + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; + this.buttonOK.Location = new System.Drawing.Point(316, 480); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(100, 30); + this.buttonOK.TabIndex = 400; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + // + // buttonCancel + // + this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonCancel.Location = new System.Drawing.Point(433, 480); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(100, 30); + this.buttonCancel.TabIndex = 410; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + // + // gTime + // + this.gTime.Controls.Add(this.totpTimeCorrectionValue); + this.gTime.Controls.Add(this.lTime); + this.gTime.Controls.Add(this.lTimeType); + this.gTime.Controls.Add(this.totpTimeCorrectionType); + this.gTime.Controls.Add(this.tbTOTPTimeCorrectionURL); + this.gTime.Controls.Add(this.lURL); + this.gTime.Dock = System.Windows.Forms.DockStyle.Top; + this.gTime.Location = new System.Drawing.Point(5, 351); + this.gTime.Name = "gTime"; + this.gTime.Size = new System.Drawing.Size(528, 125); + this.gTime.TabIndex = 10; + this.gTime.TabStop = false; + this.gTime.Text = "Time correction - TOTP && Steam only"; + // + // totpTimeCorrectionValue + // + this.totpTimeCorrectionValue.Location = new System.Drawing.Point(98, 98); + this.totpTimeCorrectionValue.Name = "totpTimeCorrectionValue"; + this.totpTimeCorrectionValue.Size = new System.Drawing.Size(90, 20); + this.totpTimeCorrectionValue.TabIndex = 11; + this.totpTimeCorrectionValue.Text = "N/A"; + // + // lTime + // + this.lTime.Location = new System.Drawing.Point(6, 98); + this.lTime.Name = "lTime"; + this.lTime.Size = new System.Drawing.Size(90, 20); + this.lTime.TabIndex = 10; + this.lTime.Text = "Time correction:"; + // + // lTimeType + // + this.lTimeType.AutoSize = true; + this.lTimeType.Location = new System.Drawing.Point(6, 34); + this.lTimeType.Name = "lTimeType"; + this.lTimeType.Size = new System.Drawing.Size(47, 20); + this.lTimeType.TabIndex = 8; + this.lTimeType.Text = "Type:"; + // + // totpTimeCorrectionType + // + this.totpTimeCorrectionType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.totpTimeCorrectionType.FormattingEnabled = true; + this.totpTimeCorrectionType.Location = new System.Drawing.Point(100, 29); + this.totpTimeCorrectionType.Name = "totpTimeCorrectionType"; + this.totpTimeCorrectionType.Size = new System.Drawing.Size(400, 28); + this.totpTimeCorrectionType.TabIndex = 300; + this.totpTimeCorrectionType.SelectedIndexChanged += new System.EventHandler(this.OnValueChanged); + // + // tbTOTPTimeCorrectionURL + // + this.tbTOTPTimeCorrectionURL.Location = new System.Drawing.Point(100, 63); + this.tbTOTPTimeCorrectionURL.Name = "tbTOTPTimeCorrectionURL"; + this.tbTOTPTimeCorrectionURL.Size = new System.Drawing.Size(400, 26); + this.tbTOTPTimeCorrectionURL.TabIndex = 310; + // + // lURL + // + this.lURL.Location = new System.Drawing.Point(6, 66); + this.lURL.Name = "lURL"; + this.lURL.Size = new System.Drawing.Size(90, 23); + this.lURL.TabIndex = 6; + this.lURL.Text = "URL:"; + // + // cbAdvanced + // + this.cbAdvanced.AutoSize = true; + this.cbAdvanced.Checked = true; + this.cbAdvanced.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbAdvanced.Dock = System.Windows.Forms.DockStyle.Top; + this.cbAdvanced.Location = new System.Drawing.Point(5, 151); + this.cbAdvanced.Name = "cbAdvanced"; + this.cbAdvanced.Size = new System.Drawing.Size(528, 24); + this.cbAdvanced.TabIndex = 11; + this.cbAdvanced.Text = "cbAdvanced"; + this.cbAdvanced.UseVisualStyleBackColor = true; + this.cbAdvanced.CheckedChanged += new System.EventHandler(this.cbAdvanced_CheckedChanged); + // + // KeePassOTPSetup + // + this.AcceptButton = this.buttonOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.buttonCancel; + this.ClientSize = new System.Drawing.Size(538, 518); + this.Controls.Add(this.gTime); + this.Controls.Add(this.gOTP); + this.Controls.Add(this.cbAdvanced); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Controls.Add(this.gSeed); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "KeePassOTPSetup"; + this.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "KeePassOTPSetup"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.OnFormClosing); + this.Shown += new System.EventHandler(this.KeePassOTPSetup_Shown); + this.gSeed.ResumeLayout(false); + this.gSeed.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbSearchScreen)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbQR)).EndInit(); + this.gOTP.ResumeLayout(false); + this.gOTP.PerformLayout(); + this.gTime.ResumeLayout(false); + this.gTime.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); }