diff --git a/MasterPassword/CSharp/MPSetup/Product.wxs b/MasterPassword/CSharp/MPSetup/Product.wxs index 5d9b4548..9ab0e171 100644 --- a/MasterPassword/CSharp/MPSetup/Product.wxs +++ b/MasterPassword/CSharp/MPSetup/Product.wxs @@ -19,7 +19,7 @@ --> - + diff --git a/MasterPassword/CSharp/MasterPassword/App.config b/MasterPassword/CSharp/MasterPassword/App.config index fad249e4..e71d47f4 100644 --- a/MasterPassword/CSharp/MasterPassword/App.config +++ b/MasterPassword/CSharp/MasterPassword/App.config @@ -1,6 +1,18 @@  + + +
+ + + + + + False + + + \ No newline at end of file diff --git a/MasterPassword/CSharp/MasterPassword/Properties/AssemblyInfo.cs b/MasterPassword/CSharp/MasterPassword/Properties/AssemblyInfo.cs index 5d3e4c1a..d13c9d4f 100644 --- a/MasterPassword/CSharp/MasterPassword/Properties/AssemblyInfo.cs +++ b/MasterPassword/CSharp/MasterPassword/Properties/AssemblyInfo.cs @@ -50,4 +50,4 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.3.0.0")] diff --git a/MasterPassword/CSharp/MasterPassword/Properties/Settings.Designer.cs b/MasterPassword/CSharp/MasterPassword/Properties/Settings.Designer.cs index 71dde5ef..2f538a5f 100644 --- a/MasterPassword/CSharp/MasterPassword/Properties/Settings.Designer.cs +++ b/MasterPassword/CSharp/MasterPassword/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18444 +// Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -22,5 +22,18 @@ namespace MasterPassword.Properties { return defaultInstance; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] + public bool c2c { + get { + return ((bool)(this["c2c"])); + } + set { + this["c2c"] = value; + } + } } } diff --git a/MasterPassword/CSharp/MasterPassword/Properties/Settings.settings b/MasterPassword/CSharp/MasterPassword/Properties/Settings.settings index abf36c5d..68de773a 100644 --- a/MasterPassword/CSharp/MasterPassword/Properties/Settings.settings +++ b/MasterPassword/CSharp/MasterPassword/Properties/Settings.settings @@ -1,7 +1,9 @@  - - - - - - + + + + + False + + + \ No newline at end of file diff --git a/MasterPassword/CSharp/MasterPassword/frmMain.Designer.cs b/MasterPassword/CSharp/MasterPassword/frmMain.Designer.cs index 1e39a976..c6943ce9 100644 --- a/MasterPassword/CSharp/MasterPassword/frmMain.Designer.cs +++ b/MasterPassword/CSharp/MasterPassword/frmMain.Designer.cs @@ -62,6 +62,7 @@ namespace MasterPassword this.cmbSite = new System.Windows.Forms.ComboBox(); this.btnDelete = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.chkC2C = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.nudCounter)).BeginInit(); this.SuspendLayout(); // @@ -70,15 +71,14 @@ namespace MasterPassword this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(12, 73); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(58, 13); + this.label1.Size = new System.Drawing.Size(55, 13); this.label1.TabIndex = 0; - this.label1.Text = "Username:"; + this.label1.Text = "Full name:"; // // txtUsername // this.txtUsername.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtUsername.CharacterCasing = System.Windows.Forms.CharacterCasing.Lower; this.txtUsername.Location = new System.Drawing.Point(77, 65); this.txtUsername.Name = "txtUsername"; this.txtUsername.Size = new System.Drawing.Size(235, 20); @@ -150,7 +150,7 @@ namespace MasterPassword 0, 0}); this.nudCounter.Name = "nudCounter"; - this.nudCounter.Size = new System.Drawing.Size(125, 20); + this.nudCounter.Size = new System.Drawing.Size(73, 20); this.nudCounter.TabIndex = 5; this.nudCounter.Value = new decimal(new int[] { 1, @@ -169,7 +169,7 @@ namespace MasterPassword this.txtPassword.Name = "txtPassword"; this.txtPassword.ReadOnly = true; this.txtPassword.Size = new System.Drawing.Size(235, 31); - this.txtPassword.TabIndex = 7; + this.txtPassword.TabIndex = 8; this.txtPassword.TabStop = false; // // label5 @@ -205,10 +205,10 @@ namespace MasterPassword // this.btnGetPassword.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnGetPassword.Enabled = false; - this.btnGetPassword.Location = new System.Drawing.Point(209, 119); + this.btnGetPassword.Location = new System.Drawing.Point(224, 119); this.btnGetPassword.Name = "btnGetPassword"; - this.btnGetPassword.Size = new System.Drawing.Size(103, 23); - this.btnGetPassword.TabIndex = 6; + this.btnGetPassword.Size = new System.Drawing.Size(88, 23); + this.btnGetPassword.TabIndex = 7; this.btnGetPassword.Text = "Get &Password"; this.btnGetPassword.UseVisualStyleBackColor = true; this.btnGetPassword.Click += new System.EventHandler(this.btnGetPassword_Click); @@ -223,7 +223,7 @@ namespace MasterPassword this.cmbSite.Location = new System.Drawing.Point(77, 38); this.cmbSite.Name = "cmbSite"; this.cmbSite.Size = new System.Drawing.Size(235, 21); - this.cmbSite.TabIndex = 1; + this.cmbSite.TabIndex = 2; this.cmbSite.SelectedIndexChanged += new System.EventHandler(this.cmbSite_Check); this.cmbSite.Enter += new System.EventHandler(this.cmbSite_Enter); this.cmbSite.Leave += new System.EventHandler(this.cmbSite_Check); @@ -237,19 +237,30 @@ namespace MasterPassword this.btnDelete.Location = new System.Drawing.Point(51, 40); this.btnDelete.Name = "btnDelete"; this.btnDelete.Size = new System.Drawing.Size(19, 19); - this.btnDelete.TabIndex = 2; + this.btnDelete.TabIndex = 1; this.btnDelete.TabStop = false; this.btnDelete.UseVisualStyleBackColor = true; this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); // + // chkC2C + // + this.chkC2C.AutoSize = true; + this.chkC2C.Location = new System.Drawing.Point(156, 122); + this.chkC2C.Name = "chkC2C"; + this.chkC2C.Size = new System.Drawing.Size(70, 17); + this.chkC2C.TabIndex = 6; + this.chkC2C.Text = "Clipboard"; + this.chkC2C.UseVisualStyleBackColor = true; + // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(324, 182); + this.ClientSize = new System.Drawing.Size(324, 181); + this.Controls.Add(this.btnGetPassword); + this.Controls.Add(this.chkC2C); this.Controls.Add(this.btnDelete); this.Controls.Add(this.cmbSite); - this.Controls.Add(this.btnGetPassword); this.Controls.Add(this.txtMasterPassword); this.Controls.Add(this.label6); this.Controls.Add(this.label5); @@ -291,6 +302,7 @@ namespace MasterPassword private System.Windows.Forms.ComboBox cmbSite; private System.Windows.Forms.Button btnDelete; private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.CheckBox chkC2C; } } diff --git a/MasterPassword/CSharp/MasterPassword/frmMain.cs b/MasterPassword/CSharp/MasterPassword/frmMain.cs index fe429e96..046e8f54 100644 --- a/MasterPassword/CSharp/MasterPassword/frmMain.cs +++ b/MasterPassword/CSharp/MasterPassword/frmMain.cs @@ -39,6 +39,8 @@ namespace MasterPassword timerVisibitlity.Interval = PASSWORD_VISIBILITY_MS; timerVisibitlity.Tick += timerVisibitlity_Tick; + chkC2C.Checked = Properties.Settings.Default.c2c; + #region Test Case // Test case, should produce: // masterKeySalt ID: 8C-45-CA-48-46-73-5F-C7-29-ED-8B-52-E8-74-88-15-5E-18-56-B9-CD-CA-6D-FF-88-10-A6-E8-46-BE-ED-20 @@ -139,6 +141,9 @@ namespace MasterPassword if (cmbType.SelectedIndex == -1) cmbType.SelectedIndex = 0; txtPassword.Text = MasterPassword.Calculate(txtMasterPassword.Text, txtUsername.Text, cmbSite.Text, (int)nudCounter.Value, (MasterPassword.MPType)cmbType.SelectedIndex); + if (chkC2C.Checked) + Clipboard.SetText(txtPassword.Text); + timerVisibitlity.Stop(); timerVisibitlity.Start(); if (mruData.ContainsKey(cmbSite.Text)) { // Update mruData @@ -163,6 +168,8 @@ namespace MasterPassword fileTitle = fileTitle.Replace("-", string.Empty); SaveMRU(fileTitle + ".dat"); } + Properties.Settings.Default.c2c = chkC2C.Checked; + Properties.Settings.Default.Save(); } private void cmbSite_Check(object sender, EventArgs e) diff --git a/MasterPassword/CSharp/MasterPassword/frmMain.resx b/MasterPassword/CSharp/MasterPassword/frmMain.resx index 95c0e81a..db9af7dd 100644 --- a/MasterPassword/CSharp/MasterPassword/frmMain.resx +++ b/MasterPassword/CSharp/MasterPassword/frmMain.resx @@ -120,10 +120,10 @@ - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAACFSURBVDhPhZABCsAwCAN9en++1dFI1NgdBKZN0jJTLLOn - 6hzdgXm7m36LpmCVLElhh2exbyVRwGAn9u5fa+1PDkOMmo/iFa3ApSieeIUscDHi/F6gKJ65gFHzURSk - /8BgJ/YI9wKYeRb7dDtIJRe125nvkMwsnI1h8Bk4UILXMMOBOWj2ArMw0u96HiIGAAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + vwAADr8BOAVTJAAAAIVJREFUOE+FkAEKwDAIA316f77V0UjU2B0Epk3SMlMss6fqHN2BebubfoumYJUs + SWGHZ7FvJVHAYCf27l9r7U8OQ4yaj+IVrcClKJ54hSxwMeL8XqAonrmAUfNRFKT/wGAn9gj3Aph5Fvt0 + O0glF7Xbme+QzCycjWHwGThQgtcww4E5aPYCszDS73oeIgYAAAAASUVORK5CYII=