Added placeholder for file locked enter key textbox

This commit is contained in:
Alexander 2019-10-13 15:08:51 +03:00
parent f7ec7824d8
commit b1cc915d83
2 changed files with 23 additions and 2 deletions

View file

@ -1,4 +1,4 @@
namespace Crypto_Notepad
namespace Crypto_Notepad
{
partial class MainForm
{
@ -123,6 +123,7 @@ public void InitializeComponent()
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.richTextBox = new Crypto_Notepad.ExRichTextBox();
this.lineNumbers = new LineNumbers.LineNumbers();
this.encryptionKeyPlaceholder = new System.Windows.Forms.Label();
this.mainMenu.SuspendLayout();
this.contextMenu.SuspendLayout();
this.searchPanel.SuspendLayout();
@ -1045,6 +1046,7 @@ public void InitializeComponent()
this.fileLockedPanel.Anchor = System.Windows.Forms.AnchorStyles.None;
this.fileLockedPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(55)))), ((int)(((byte)(55)))), ((int)(((byte)(55)))));
this.fileLockedPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.fileLockedPanel.Controls.Add(this.encryptionKeyPlaceholder);
this.fileLockedPanel.Controls.Add(this.fileLockedCloseButton);
this.fileLockedPanel.Controls.Add(this.fileLockedOkButton);
this.fileLockedPanel.Controls.Add(this.fileLockedKeyTextBox);
@ -1119,7 +1121,7 @@ public void InitializeComponent()
this.fileLockedLabel.AutoEllipsis = true;
this.fileLockedLabel.AutoSize = true;
this.fileLockedLabel.Font = new System.Drawing.Font("Segoe UI Semibold", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
this.fileLockedLabel.Location = new System.Drawing.Point(2, 2);
this.fileLockedLabel.Location = new System.Drawing.Point(88, 3);
this.fileLockedLabel.Name = "fileLockedLabel";
this.fileLockedLabel.Size = new System.Drawing.Size(71, 17);
this.fileLockedLabel.TabIndex = 7;
@ -1187,6 +1189,18 @@ public void InitializeComponent()
this.lineNumbers.Size = new System.Drawing.Size(22, 163);
this.lineNumbers.TabIndex = 19;
//
// encryptionKeyPlaceholder
//
this.encryptionKeyPlaceholder.AutoSize = true;
this.encryptionKeyPlaceholder.BackColor = System.Drawing.SystemColors.Window;
this.encryptionKeyPlaceholder.Cursor = System.Windows.Forms.Cursors.IBeam;
this.encryptionKeyPlaceholder.ForeColor = System.Drawing.Color.DarkGray;
this.encryptionKeyPlaceholder.Location = new System.Drawing.Point(10, 37);
this.encryptionKeyPlaceholder.Name = "encryptionKeyPlaceholder";
this.encryptionKeyPlaceholder.Size = new System.Drawing.Size(82, 13);
this.encryptionKeyPlaceholder.TabIndex = 12;
this.encryptionKeyPlaceholder.Text = "Encryption key";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1339,5 +1353,6 @@ public void InitializeComponent()
private System.Windows.Forms.ContextMenuStrip trayMenu;
private System.Windows.Forms.ToolStripMenuItem trayMenuShow;
private System.Windows.Forms.ToolStripMenuItem trayMenuExit;
private System.Windows.Forms.Label encryptionKeyPlaceholder;
}
}

View file

@ -1638,9 +1638,15 @@ private void SearchFindNextButton_Click(object sender, EventArgs e)
private void FileLockedKeyTextBox_TextChanged(object sender, EventArgs e)
{
if (fileLockedKeyTextBox.Text.Length > 0)
{
fileLockedOkButton.Enabled = true;
encryptionKeyPlaceholder.Visible = false;
}
else
{
encryptionKeyPlaceholder.Visible = true;
fileLockedOkButton.Enabled = false;
}
}
private void FileLockedPanel_VisibleChanged(object sender, EventArgs e)