Merge remote-tracking branch 'remotes/michelverhagen/windows' into windows
This commit is contained in:
commit
78f0dcd16c
@ -19,7 +19,7 @@
|
||||
-->
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Product Id="*" Name="$(var.MasterPassword.ProjectName)" Language="1033" Version="!(bind.FileVersion.ProjectOutput)" Manufacturer="GuruCE" UpgradeCode="40c052f9-f8e1-422c-b78c-83f980f3355b">
|
||||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perUser" />
|
||||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" />
|
||||
|
||||
<MajorUpgrade Schedule="afterInstallValidate" DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
|
||||
|
||||
@ -91,5 +91,7 @@
|
||||
<WixVariable Id='WixUIDialogBmp' Value='SplashScreen.bmp' />
|
||||
|
||||
<Icon Id='masterpassword.ico' SourceFile='$(var.MasterPassword.ProjectDir)\masterpassword.ico' />
|
||||
|
||||
<Property Id="ARPPRODUCTICON" Value="masterpassword.ico" />
|
||||
</Product>
|
||||
</Wix>
|
@ -1,6 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="MasterPassword.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<MasterPassword.Properties.Settings>
|
||||
<setting name="c2c" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</MasterPassword.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
@ -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.4.0.0")]
|
||||
|
@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="MasterPassword.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="c2c" Roaming="true" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
@ -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,31 @@ 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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
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.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);
|
||||
@ -264,7 +276,7 @@ namespace MasterPassword
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(800, 220);
|
||||
this.MinimumSize = new System.Drawing.Size(260, 220);
|
||||
this.MinimumSize = new System.Drawing.Size(320, 220);
|
||||
this.Name = "frmMain";
|
||||
this.Text = "MasterPassword";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing);
|
||||
@ -291,6 +303,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
@ -97,6 +99,7 @@ namespace MasterPassword
|
||||
string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName, fileName);
|
||||
if (File.Exists(appDataPath))
|
||||
{
|
||||
mruData.Clear();
|
||||
string json = "";
|
||||
using (BinaryReader br = new BinaryReader(File.Open(appDataPath, FileMode.Open)))
|
||||
{
|
||||
@ -139,6 +142,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 +169,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)
|
||||
@ -197,8 +205,10 @@ namespace MasterPassword
|
||||
{
|
||||
txtUsername.Text = "";
|
||||
txtPassword.Text = "";
|
||||
cmbSite.Text = "";
|
||||
cmbType.SelectedIndex = -1;
|
||||
cmbSite.Items.Clear();
|
||||
mruData.Clear();
|
||||
nudCounter.Value = 1;
|
||||
}
|
||||
}
|
||||
|
@ -120,10 +120,10 @@
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnDelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsAAAA7AAWrWiQkAAACFSURBVDhPhZABCsAwCAN9en++1dFI1NgdBKZN0jJTLLOn
|
||||
6hzdgXm7m36LpmCVLElhh2exbyVRwGAn9u5fa+1PDkOMmo/iFa3ApSieeIUscDHi/F6gKJ65gFHzURSk
|
||||
/8BgJ/YI9wKYeRb7dDtIJRe125nvkMwsnI1h8Bk4UILXMMOBOWj2ArMw0u96HiIGAAAAAElFTkSuQmCC
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vwAADr8BOAVTJAAAAIVJREFUOE+FkAEKwDAIA316f77V0UjU2B0Epk3SMlMss6fqHN2BebubfoumYJUs
|
||||
SWGHZ7FvJVHAYCf27l9r7U8OQ4yaj+IVrcClKJ54hSxwMeL8XqAonrmAUfNRFKT/wGAn9gj3Aph5Fvt0
|
||||
O0glF7Xbme+QzCycjWHwGThQgtcww4E5aPYCszDS73oeIgYAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
|
Loading…
Reference in New Issue
Block a user