Commits

Devin Martin committed 35c463e

Add icons to toolstrip. Allow hyphens in key. Cosmetic changes to the box that shows codes. Prep 1.3.0

  • Participants
  • Parent commits fe6461f

Comments (0)

Files changed (5)

File KeeOtp/KeeOtpExt.cs

             this.otpSeperatorToolStripItem = new ToolStripSeparator();
             host.MainWindow.EntryContextMenu.Items.Add(this.otpSeperatorToolStripItem);
 
-            this.otpDialogToolStripItem = host.MainWindow.EntryContextMenu.Items.Add("Timed One Time Password");
-            this.otpDialogToolStripItem.Click += new EventHandler(otpDialogToolStripItem_Click);
+            this.otpDialogToolStripItem = host.MainWindow.EntryContextMenu.Items.Add("Timed One Time Password",
+                Resources.clock,
+                otpDialogToolStripItem_Click);
 
             this.otpCopyToolStripItem = host.MainWindow.EntryContextMenu.Items.Add("Copy TOTP to Clipboard");
             this.otpCopyToolStripItem.Click += otpCopyToolStripItem_Click;
             this.otpTopSeperatorToolStripItem = new ToolStripSeparator();
             host.MainWindow.ToolsMenu.DropDownItems.Add(this.otpTopSeperatorToolStripItem);
             this.otpTopDialogToolStripItem = host.MainWindow.ToolsMenu.DropDownItems.Add("Timed One Time Password",
-                null,
+                Resources.clock,
                 otpDialogToolStripItem_Click);
 
             return true; // Initialization successful

File KeeOtp/OtpInformation.Designer.cs

             // 
             // textBoxStep
             // 
-            this.textBoxStep.Location = new System.Drawing.Point(140, 224);
+            this.textBoxStep.Location = new System.Drawing.Point(140, 138);
             this.textBoxStep.Name = "textBoxStep";
             this.textBoxStep.Size = new System.Drawing.Size(23, 20);
             this.textBoxStep.TabIndex = 1;
             // radioButtonSix
             // 
             this.radioButtonSix.AutoSize = true;
-            this.radioButtonSix.Location = new System.Drawing.Point(140, 260);
+            this.radioButtonSix.Location = new System.Drawing.Point(140, 174);
             this.radioButtonSix.Name = "radioButtonSix";
             this.radioButtonSix.Size = new System.Drawing.Size(60, 17);
             this.radioButtonSix.TabIndex = 2;
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(28, 227);
+            this.label2.Location = new System.Drawing.Point(28, 141);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(106, 13);
             this.label2.TabIndex = 4;
             // labelSize
             // 
             this.labelSize.AutoSize = true;
-            this.labelSize.Location = new System.Drawing.Point(79, 260);
+            this.labelSize.Location = new System.Drawing.Point(79, 174);
             this.labelSize.Name = "labelSize";
             this.labelSize.Size = new System.Drawing.Size(55, 13);
             this.labelSize.TabIndex = 5;
             // radioButtonEight
             // 
             this.radioButtonEight.AutoSize = true;
-            this.radioButtonEight.Location = new System.Drawing.Point(140, 283);
+            this.radioButtonEight.Location = new System.Drawing.Point(140, 197);
             this.radioButtonEight.Name = "radioButtonEight";
             this.radioButtonEight.Size = new System.Drawing.Size(60, 17);
             this.radioButtonEight.TabIndex = 6;
             // 
             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(215, 310);
+            this.buttonOk.Location = new System.Drawing.Point(215, 241);
             this.buttonOk.Name = "buttonOk";
             this.buttonOk.Size = new System.Drawing.Size(75, 23);
             this.buttonOk.TabIndex = 7;
             // 
             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(296, 310);
+            this.buttonCancel.Location = new System.Drawing.Point(296, 241);
             this.buttonCancel.Name = "buttonCancel";
             this.buttonCancel.Size = new System.Drawing.Size(75, 23);
             this.buttonCancel.TabIndex = 8;
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(383, 345);
+            this.ClientSize = new System.Drawing.Size(383, 276);
             this.Controls.Add(this.checkBoxCustomSettings);
             this.Controls.Add(this.pictureBoxBanner);
             this.Controls.Add(this.radioButtonHex);

File KeeOtp/OtpInformation.cs

                         return;
                     }
                     // need to do encoding here
-                    key = ProtectedKey.CreateProtectedKeyAndDestroyPlaintextKey(Base32.Decode(this.textBoxKey.Text.Replace(" ", string.Empty)));
+                    key = ProtectedKey.CreateProtectedKeyAndDestroyPlaintextKey(Base32.Decode(this.textBoxKey.Text.Replace(" ", string.Empty).Replace("-", string.Empty)));
                 }
                 else
-                    key = ProtectedKey.CreateProtectedKeyAndDestroyPlaintextKey(Base32.Decode(this.textBoxKey.Text.Replace(" ", string.Empty)));
+                    key = ProtectedKey.CreateProtectedKeyAndDestroyPlaintextKey(Base32.Decode(this.textBoxKey.Text.Replace(" ", string.Empty).Replace("-", string.Empty)));
 
                 this.Data = new OtpAuthData()
                 {

File KeeOtp/Properties/AssemblyInfo.cs

 [assembly: Guid("9CCC719B-32BA-4936-A6D7-DBF0659C16EF")]
 
 // Assembly version information
-[assembly: AssemblyVersion("1.2.0")]
-[assembly: AssemblyFileVersion("1.2.0")]
+[assembly: AssemblyVersion("1.3.0")]
+[assembly: AssemblyFileVersion("1.3.0")]

File KeeOtp/ShowOneTimePasswords.Designer.cs

             // 
             // labelOtp
             // 
-            this.labelOtp.AutoSize = true;
+            this.labelOtp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.labelOtp.Font = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-            this.labelOtp.Location = new System.Drawing.Point(24, 73);
+            this.labelOtp.Location = new System.Drawing.Point(-2, 73);
             this.labelOtp.Name = "labelOtp";
-            this.labelOtp.Size = new System.Drawing.Size(224, 73);
+            this.labelOtp.Size = new System.Drawing.Size(349, 73);
             this.labelOtp.TabIndex = 0;
             this.labelOtp.Text = "xxxxxx";
+            this.labelOtp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
             // 
             // labelRemaining
             // 
             // 
             this.buttonClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.buttonClose.Location = new System.Drawing.Point(241, 181);
+            this.buttonClose.Location = new System.Drawing.Point(258, 181);
             this.buttonClose.Name = "buttonClose";
             this.buttonClose.Size = new System.Drawing.Size(75, 23);
             this.buttonClose.TabIndex = 4;
             // buttonEdit
             // 
             this.buttonEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-            this.buttonEdit.Location = new System.Drawing.Point(160, 181);
+            this.buttonEdit.Location = new System.Drawing.Point(177, 181);
             this.buttonEdit.Name = "buttonEdit";
             this.buttonEdit.Size = new System.Drawing.Size(75, 23);
             this.buttonEdit.TabIndex = 5;
             | System.Windows.Forms.AnchorStyles.Right)));
             this.pictureBoxBanner.Location = new System.Drawing.Point(-2, 0);
             this.pictureBoxBanner.Name = "pictureBoxBanner";
-            this.pictureBoxBanner.Size = new System.Drawing.Size(332, 58);
+            this.pictureBoxBanner.Size = new System.Drawing.Size(349, 58);
             this.pictureBoxBanner.TabIndex = 7;
             this.pictureBoxBanner.TabStop = false;
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(328, 219);
+            this.ClientSize = new System.Drawing.Size(345, 219);
             this.Controls.Add(this.pictureBoxBanner);
             this.Controls.Add(this.buttonIncorrect);
             this.Controls.Add(this.buttonEdit);