mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Removed status panel
This commit is contained in:
parent
a0e784dbba
commit
a087694d0d
2 changed files with 8 additions and 110 deletions
61
Crypto Notepad/Form1.Designer.cs
generated
61
Crypto Notepad/Form1.Designer.cs
generated
|
|
@ -80,11 +80,6 @@ public void InitializeComponent()
|
|||
this.SaveFile = new System.Windows.Forms.SaveFileDialog();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.whiteSpaceLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.lineStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.columnStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.pictureBox12 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox5 = new System.Windows.Forms.PictureBox();
|
||||
|
|
@ -107,7 +102,6 @@ public void InitializeComponent()
|
|||
this.customRTB = new Crypto_Notepad.CustomRichTextBox();
|
||||
this.MainMenu.SuspendLayout();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
|
|
@ -531,53 +525,6 @@ public void InitializeComponent()
|
|||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Visible = false;
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(35)))));
|
||||
this.statusStrip1.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolStripStatusLabel1,
|
||||
this.whiteSpaceLabel,
|
||||
this.lineStripStatusLabel,
|
||||
this.columnStripStatusLabel});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 268);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.ShowItemToolTips = true;
|
||||
this.statusStrip1.Size = new System.Drawing.Size(535, 22);
|
||||
this.statusStrip1.SizingGrip = false;
|
||||
this.statusStrip1.TabIndex = 5;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
//
|
||||
this.toolStripStatusLabel1.ForeColor = System.Drawing.Color.LightGray;
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(42, 17);
|
||||
this.toolStripStatusLabel1.Text = "Ready";
|
||||
this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// whiteSpaceLabel
|
||||
//
|
||||
this.whiteSpaceLabel.Name = "whiteSpaceLabel";
|
||||
this.whiteSpaceLabel.Size = new System.Drawing.Size(380, 17);
|
||||
this.whiteSpaceLabel.Spring = true;
|
||||
//
|
||||
// lineStripStatusLabel
|
||||
//
|
||||
this.lineStripStatusLabel.ForeColor = System.Drawing.Color.LightGray;
|
||||
this.lineStripStatusLabel.Name = "lineStripStatusLabel";
|
||||
this.lineStripStatusLabel.Overflow = System.Windows.Forms.ToolStripItemOverflow.Always;
|
||||
this.lineStripStatusLabel.Size = new System.Drawing.Size(42, 17);
|
||||
this.lineStripStatusLabel.Text = "Line:";
|
||||
//
|
||||
// columnStripStatusLabel
|
||||
//
|
||||
this.columnStripStatusLabel.ForeColor = System.Drawing.Color.LightGray;
|
||||
this.columnStripStatusLabel.Name = "columnStripStatusLabel";
|
||||
this.columnStripStatusLabel.Overflow = System.Windows.Forms.ToolStripItemOverflow.Always;
|
||||
this.columnStripStatusLabel.Size = new System.Drawing.Size(56, 17);
|
||||
this.columnStripStatusLabel.Text = "Column:";
|
||||
//
|
||||
// pictureBox12
|
||||
//
|
||||
this.pictureBox12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
|
|
@ -854,7 +801,6 @@ public void InitializeComponent()
|
|||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.customRTB);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.MainMenu);
|
||||
|
|
@ -871,8 +817,6 @@ public void InitializeComponent()
|
|||
this.MainMenu.ResumeLayout(false);
|
||||
this.MainMenu.PerformLayout();
|
||||
this.contextMenuStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
|
|
@ -909,8 +853,6 @@ public void InitializeComponent()
|
|||
private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem;
|
||||
private System.Windows.Forms.Button button1;
|
||||
public System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem сервисToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
|
||||
|
|
@ -945,8 +887,6 @@ public void InitializeComponent()
|
|||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator11;
|
||||
private System.Windows.Forms.ToolStripMenuItem changeKeyToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem сheckForUpdatesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripStatusLabel lineStripStatusLabel;
|
||||
private System.Windows.Forms.ToolStripStatusLabel columnStripStatusLabel;
|
||||
private System.Windows.Forms.ToolStripMenuItem documentationToolStripMenuItem;
|
||||
private System.Windows.Forms.TextBox searchTextBox;
|
||||
private System.Windows.Forms.CheckBox chkMatchCase;
|
||||
|
|
@ -971,7 +911,6 @@ public void InitializeComponent()
|
|||
private System.Windows.Forms.PictureBox pictureBox12;
|
||||
private System.Windows.Forms.PictureBox pictureBox13;
|
||||
private System.Windows.Forms.ToolStripMenuItem lockToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripStatusLabel whiteSpaceLabel;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Crypto_Notepad
|
||||
|
|
@ -27,6 +26,7 @@ public partial class MainWindow : Form
|
|||
string[] args = Environment.GetCommandLineArgs();
|
||||
Properties.Settings ps = Properties.Settings.Default;
|
||||
int caretPos = 0;
|
||||
string appName = Assembly.GetExecutingAssembly().GetName().Name;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
|
|
@ -89,8 +89,6 @@ void DecryptAES()
|
|||
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
||||
customRTB.Text = de;
|
||||
|
||||
toolStripStatusLabel1.Text = NameWithotPath;
|
||||
toolStripStatusLabel1.ToolTipText = (OpenFile.FileName);
|
||||
filename = OpenFile.FileName;
|
||||
|
||||
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
|
|
@ -118,8 +116,6 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
string opnfile = File.ReadAllText(OpenFile.FileName);
|
||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||
customRTB.Text = opnfile;
|
||||
toolStripStatusLabel1.Text = NameWithotPath;
|
||||
toolStripStatusLabel1.ToolTipText = (OpenFile.FileName);
|
||||
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
customRTB.Select(Convert.ToInt32(cc2), 0);
|
||||
return;
|
||||
|
|
@ -150,8 +146,6 @@ private void openAsotiations()
|
|||
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
||||
customRTB.Text = de;
|
||||
|
||||
toolStripStatusLabel1.Text = NameWithotPath;
|
||||
toolStripStatusLabel1.ToolTipText = (args[1]);
|
||||
|
||||
filename = args[1];
|
||||
string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
|
|
@ -189,14 +183,12 @@ private void newToolStripMenuItem_Click_1(object sender, EventArgs e)
|
|||
customRTB.Clear();
|
||||
StreamWriter sw = new StreamWriter(SaveFile.FileName);
|
||||
string NameWithotPath = Path.GetFileName(SaveFile.FileName);
|
||||
toolStripStatusLabel1.Text = NameWithotPath;
|
||||
toolStripStatusLabel1.ToolTipText = (SaveFile.FileName);
|
||||
filename = SaveFile.FileName;
|
||||
sw.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private async void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||
|
||||
|
|
@ -232,12 +224,8 @@ private async void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
}
|
||||
sw.Close();
|
||||
customRTB.Text = noenc;
|
||||
toolStripStatusLabel1.Text = "Saved in: " + filename;
|
||||
string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
customRTB.Select(Convert.ToInt32(cc), 0);
|
||||
await Task.Delay(4000);
|
||||
toolStripStatusLabel1.Text = "Ready";
|
||||
|
||||
}
|
||||
|
||||
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||
|
|
@ -307,17 +295,6 @@ private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
void LineAndColumn()
|
||||
{
|
||||
int line = customRTB.GetLineFromCharIndex(customRTB.SelectionStart);
|
||||
int column = customRTB.SelectionStart - customRTB.GetFirstCharIndexFromLine(line);
|
||||
line += 1;
|
||||
column += 1;
|
||||
|
||||
lineStripStatusLabel.Text = "Line: " + line.ToString() + ",";
|
||||
columnStripStatusLabel.Text = "Column: " + column.ToString();
|
||||
}
|
||||
|
||||
private void MainWindow_Load(object sender, EventArgs e)
|
||||
{
|
||||
string pos = ps.WindowLocation.ToString();
|
||||
|
|
@ -353,8 +330,6 @@ private void MainWindow_Load(object sender, EventArgs e)
|
|||
up.Start();
|
||||
}
|
||||
|
||||
LineAndColumn();
|
||||
|
||||
DeleteUpdateFiles();
|
||||
|
||||
if (args.Length > 1)
|
||||
|
|
@ -399,7 +374,7 @@ private void clearToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
customRTB.Clear();
|
||||
}
|
||||
|
||||
private async void saveToolStripMenuItem1_Click_1(object sender, EventArgs e)
|
||||
private void saveToolStripMenuItem1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
string f = "Unnamed.cnp";
|
||||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||
|
|
@ -435,9 +410,6 @@ private async void saveToolStripMenuItem1_Click_1(object sender, EventArgs e)
|
|||
customRTB.Text = noenc;
|
||||
string cc = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
customRTB.Select(Convert.ToInt32(cc), 0);
|
||||
toolStripStatusLabel1.Text = "Saved in: " + filename;
|
||||
await Task.Delay(4000);
|
||||
toolStripStatusLabel1.Text = "Ready";
|
||||
}
|
||||
|
||||
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
@ -493,7 +465,7 @@ private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
private async void deleteFileToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
private void deleteFileToolStripMenuItem_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
if (filename != "Unnamed.cnp")
|
||||
{
|
||||
|
|
@ -502,13 +474,10 @@ private async void deleteFileToolStripMenuItem_Click_1(object sender, EventArgs
|
|||
if (MessageBox.Show("Delete file: " + filename + " ?", "Crypto Notepad", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
File.Delete(filename);
|
||||
toolStripStatusLabel1.Text = filename + " deleted";
|
||||
customRTB.Clear();
|
||||
key = "";
|
||||
pictureBox11.Enabled = false;
|
||||
filename = "Unnamed.cnp";
|
||||
await Task.Delay(4000);
|
||||
toolStripStatusLabel1.Text = "Ready";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -662,7 +631,6 @@ private void searchTextBox_KeyDown(object sender, KeyEventArgs e)
|
|||
|
||||
private void customRTB_SelectionChanged_1(object sender, EventArgs e)
|
||||
{
|
||||
LineAndColumn();
|
||||
if (customRTB.SelectionLength != 0)
|
||||
{
|
||||
pictureBox8.Enabled = true;
|
||||
|
|
@ -675,18 +643,13 @@ private void customRTB_SelectionChanged_1(object sender, EventArgs e)
|
|||
}
|
||||
}
|
||||
|
||||
private void customRTB_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
LineAndColumn();
|
||||
}
|
||||
|
||||
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SettingsForm sf = new SettingsForm();
|
||||
sf.ShowDialog();
|
||||
}
|
||||
|
||||
private async void MainWindow_Activated(object sender, EventArgs e)
|
||||
private void MainWindow_Activated(object sender, EventArgs e)
|
||||
{
|
||||
if (settingsChanged == true)
|
||||
{
|
||||
|
|
@ -715,9 +678,9 @@ private async void MainWindow_Activated(object sender, EventArgs e)
|
|||
|
||||
if (keyChanged == true)
|
||||
{
|
||||
toolStripStatusLabel1.Text = "Key was changed";
|
||||
await Task.Delay(4000);
|
||||
toolStripStatusLabel1.Text = "Ready";
|
||||
//toolStripStatusLabel1.Text = "Key was changed";
|
||||
//await Task.Delay(4000);
|
||||
//toolStripStatusLabel1.Text = "Ready";
|
||||
}
|
||||
|
||||
if (key == "")
|
||||
|
|
@ -959,7 +922,6 @@ void AutoLock(bool minimize)
|
|||
{
|
||||
key = "";
|
||||
customRTB.Clear();
|
||||
toolStripStatusLabel1.Text = "Ready";
|
||||
OpenFile.FileName = "";
|
||||
this.Show();
|
||||
return;
|
||||
|
|
@ -973,8 +935,6 @@ void AutoLock(bool minimize)
|
|||
string NameWithotPath = Path.GetFileName(OpenFile.FileName);
|
||||
string de = AES.Decrypt(opnfile, key, ps.TheSalt, ps.HashAlgorithm, ps.PasswordIterations, "16CHARSLONG12345", ps.KeySize);
|
||||
|
||||
toolStripStatusLabel1.Text = NameWithotPath;
|
||||
toolStripStatusLabel1.ToolTipText = (OpenFile.FileName);
|
||||
filename = OpenFile.FileName;
|
||||
|
||||
string cc2 = customRTB.Text.Length.ToString(CultureInfo.InvariantCulture);
|
||||
|
|
@ -992,7 +952,6 @@ void AutoLock(bool minimize)
|
|||
{
|
||||
key = "";
|
||||
customRTB.Clear();
|
||||
toolStripStatusLabel1.Text = "Ready";
|
||||
OpenFile.FileName = "";
|
||||
this.Show();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue