mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Renamed EnterKeyForm to EnterPasswordForm
This commit is contained in:
parent
7d0133ee9f
commit
69f93b57a5
5 changed files with 26 additions and 26 deletions
|
|
@ -127,11 +127,11 @@
|
||||||
<Compile Include="Forms\MainForm.Designer.cs">
|
<Compile Include="Forms\MainForm.Designer.cs">
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Forms\EnterKeyForm.cs">
|
<Compile Include="Forms\EnterPasswordForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Forms\EnterKeyForm.Designer.cs">
|
<Compile Include="Forms\EnterPasswordForm.Designer.cs">
|
||||||
<DependentUpon>EnterKeyForm.cs</DependentUpon>
|
<DependentUpon>EnterPasswordForm.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="External Libraries\MsgBoxCenterParent.cs" />
|
<Compile Include="External Libraries\MsgBoxCenterParent.cs" />
|
||||||
<Compile Include="External Libraries\ExRichTextBox.cs">
|
<Compile Include="External Libraries\ExRichTextBox.cs">
|
||||||
|
|
@ -171,8 +171,8 @@
|
||||||
<EmbeddedResource Include="Forms\MainForm.resx">
|
<EmbeddedResource Include="Forms\MainForm.resx">
|
||||||
<DependentUpon>MainForm.cs</DependentUpon>
|
<DependentUpon>MainForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\EnterKeyForm.resx">
|
<EmbeddedResource Include="Forms\EnterPasswordForm.resx">
|
||||||
<DependentUpon>EnterKeyForm.cs</DependentUpon>
|
<DependentUpon>EnterPasswordForm.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\PasswordGeneratorFrom.resx">
|
<EmbeddedResource Include="Forms\PasswordGeneratorFrom.resx">
|
||||||
<DependentUpon>PasswordGeneratorFrom.cs</DependentUpon>
|
<DependentUpon>PasswordGeneratorFrom.cs</DependentUpon>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
namespace Crypto_Notepad
|
namespace Crypto_Notepad
|
||||||
{
|
{
|
||||||
partial class EnterKeyForm
|
partial class EnterPasswordForm
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
|
|
@ -29,7 +29,7 @@ protected override void Dispose(bool disposing)
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EnterKeyForm));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EnterPasswordForm));
|
||||||
this.okButton = new System.Windows.Forms.Button();
|
this.okButton = new System.Windows.Forms.Button();
|
||||||
this.mainPanel = new System.Windows.Forms.Panel();
|
this.mainPanel = new System.Windows.Forms.Panel();
|
||||||
this.lockPictureBox = new System.Windows.Forms.PictureBox();
|
this.lockPictureBox = new System.Windows.Forms.PictureBox();
|
||||||
|
|
@ -128,7 +128,7 @@ private void InitializeComponent()
|
||||||
this.passwordGeneratorButton.UseVisualStyleBackColor = true;
|
this.passwordGeneratorButton.UseVisualStyleBackColor = true;
|
||||||
this.passwordGeneratorButton.Click += new System.EventHandler(this.PasswordGeneratorButton_Click);
|
this.passwordGeneratorButton.Click += new System.EventHandler(this.PasswordGeneratorButton_Click);
|
||||||
//
|
//
|
||||||
// EnterKeyForm
|
// EnterPasswordForm
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
|
@ -141,11 +141,11 @@ private void InitializeComponent()
|
||||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
this.MaximizeBox = false;
|
this.MaximizeBox = false;
|
||||||
this.MinimizeBox = false;
|
this.MinimizeBox = false;
|
||||||
this.Name = "EnterKeyForm";
|
this.Name = "EnterPasswordForm";
|
||||||
this.Text = "Crypto Notepad";
|
this.Text = "Crypto Notepad";
|
||||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.EnterKeyForm_FormClosed);
|
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.EnterPasswordForm_FormClosed);
|
||||||
this.Load += new System.EventHandler(this.EnterKeyForm_Load);
|
this.Load += new System.EventHandler(this.EnterPasswordForm_Load);
|
||||||
this.Shown += new System.EventHandler(this.EnterKeyForm_Shown);
|
this.Shown += new System.EventHandler(this.EnterPasswordForm_Shown);
|
||||||
this.mainPanel.ResumeLayout(false);
|
this.mainPanel.ResumeLayout(false);
|
||||||
this.mainPanel.PerformLayout();
|
this.mainPanel.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.lockPictureBox)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.lockPictureBox)).EndInit();
|
||||||
|
|
@ -3,16 +3,16 @@
|
||||||
|
|
||||||
namespace Crypto_Notepad
|
namespace Crypto_Notepad
|
||||||
{
|
{
|
||||||
public partial class EnterKeyForm : Form
|
public partial class EnterPasswordForm : Form
|
||||||
{
|
{
|
||||||
public EnterKeyForm()
|
public EnterPasswordForm()
|
||||||
{
|
{
|
||||||
PublicVar.okPressed = false;
|
PublicVar.okPressed = false;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Form Events*/
|
/*Form Events*/
|
||||||
private void EnterKeyForm_FormClosed(object sender, FormClosedEventArgs e)
|
private void EnterPasswordForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
{
|
{
|
||||||
MainForm main = Owner as MainForm;
|
MainForm main = Owner as MainForm;
|
||||||
if (main.Visible == false)
|
if (main.Visible == false)
|
||||||
|
|
@ -23,7 +23,7 @@ private void EnterKeyForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||||
keyTextBox.Focus();
|
keyTextBox.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnterKeyForm_Load(object sender, EventArgs e)
|
private void EnterPasswordForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
fileNameLabel.Text = PublicVar.openFileName;
|
fileNameLabel.Text = PublicVar.openFileName;
|
||||||
Properties.Settings settings = Properties.Settings.Default;
|
Properties.Settings settings = Properties.Settings.Default;
|
||||||
|
|
@ -39,7 +39,7 @@ private void EnterKeyForm_Load(object sender, EventArgs e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnterKeyForm_Shown(object sender, EventArgs e)
|
private void EnterPasswordForm_Shown(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
fileNameLabel.Text = PublicVar.openFileName;
|
fileNameLabel.Text = PublicVar.openFileName;
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using Crypto_Notepad.Properties;
|
using Crypto_Notepad.Properties;
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
@ -51,9 +51,9 @@ protected override void WndProc(ref Message m)
|
||||||
#region Methods
|
#region Methods
|
||||||
private async Task DecryptAES()
|
private async Task DecryptAES()
|
||||||
{
|
{
|
||||||
EnterKeyForm enterKeyForm = new EnterKeyForm();
|
EnterPasswordForm enterPasswordForm = new EnterPasswordForm();
|
||||||
enterKeyForm.Owner = this;
|
enterPasswordForm.Owner = this;
|
||||||
enterKeyForm.ShowDialog();
|
enterPasswordForm.ShowDialog();
|
||||||
richTextBox.SuspendDrawing();
|
richTextBox.SuspendDrawing();
|
||||||
UseWaitCursor = true;
|
UseWaitCursor = true;
|
||||||
if (!PublicVar.okPressed)
|
if (!PublicVar.okPressed)
|
||||||
|
|
@ -203,11 +203,11 @@ private async void ContextMenuEncryptReplace()
|
||||||
richTextBox.Text = File.ReadAllText(args[1]);
|
richTextBox.Text = File.ReadAllText(args[1]);
|
||||||
PublicVar.openFileName = Path.GetFileName(args[1]);
|
PublicVar.openFileName = Path.GetFileName(args[1]);
|
||||||
string newFileName = Path.GetDirectoryName(args[1]) + @"\" + Path.GetFileNameWithoutExtension(args[1]) + ".cnp";
|
string newFileName = Path.GetDirectoryName(args[1]) + @"\" + Path.GetFileNameWithoutExtension(args[1]) + ".cnp";
|
||||||
EnterKeyForm enterKeyForm = new EnterKeyForm
|
EnterPasswordForm enterPasswordForm = new EnterPasswordForm
|
||||||
{
|
{
|
||||||
Owner = this
|
Owner = this
|
||||||
};
|
};
|
||||||
enterKeyForm.ShowDialog();
|
enterPasswordForm.ShowDialog();
|
||||||
File.Delete(args[1]);
|
File.Delete(args[1]);
|
||||||
string unencryptedText = richTextBox.Text;
|
string unencryptedText = richTextBox.Text;
|
||||||
string encryptedText = await AES.Encrypt(richTextBox.Text, TypedPassword.Value, null, settings.HashAlgorithm, Convert.ToInt32(settings.PasswordIterations),
|
string encryptedText = await AES.Encrypt(richTextBox.Text, TypedPassword.Value, null, settings.HashAlgorithm, Convert.ToInt32(settings.PasswordIterations),
|
||||||
|
|
@ -767,7 +767,7 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EnterKeyForm enterKeyForm = new EnterKeyForm
|
EnterPasswordForm enterKeyForm = new EnterPasswordForm
|
||||||
{
|
{
|
||||||
Owner = this
|
Owner = this
|
||||||
};
|
};
|
||||||
|
|
@ -1016,7 +1016,7 @@ private void NewMainMenu_Click(object sender, EventArgs e)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PublicVar.openFileName = "Unnamed.cnp";
|
PublicVar.openFileName = "Unnamed.cnp";
|
||||||
EnterKeyForm enterKeyForm = new EnterKeyForm
|
EnterPasswordForm enterKeyForm = new EnterPasswordForm
|
||||||
{
|
{
|
||||||
Owner = this
|
Owner = this
|
||||||
};
|
};
|
||||||
|
|
@ -1134,7 +1134,7 @@ private async void SaveAsMainMenu_Click(object sender, EventArgs e)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PublicVar.openFileName = Path.GetFileName(saveFileDialog.FileName);
|
PublicVar.openFileName = Path.GetFileName(saveFileDialog.FileName);
|
||||||
EnterKeyForm enterKeyForm = new EnterKeyForm
|
EnterPasswordForm enterKeyForm = new EnterPasswordForm
|
||||||
{
|
{
|
||||||
Owner = this
|
Owner = this
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue