From 62492e1ec833ec52e2f3aa065bf2cbb9876e9458 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 25 Dec 2018 17:15:29 +0200 Subject: [PATCH] Fixed #17 --- Crypto Notepad/MainForm.Designer.cs | 4 ++-- Crypto Notepad/MainForm.cs | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Crypto Notepad/MainForm.Designer.cs b/Crypto Notepad/MainForm.Designer.cs index ea87a53..4fa68c8 100644 --- a/Crypto Notepad/MainForm.Designer.cs +++ b/Crypto Notepad/MainForm.Designer.cs @@ -1,4 +1,4 @@ -namespace Crypto_Notepad +namespace Crypto_Notepad { partial class MainForm { @@ -800,7 +800,7 @@ public void InitializeComponent() this.customRTB.ContextMenuStrip = this.contextMenuStrip1; this.customRTB.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); this.customRTB.ForeColor = System.Drawing.SystemColors.WindowText; - this.customRTB.Location = new System.Drawing.Point(6, 47); + this.CustomRTB.Location = new System.Drawing.Point(0, 47); this.customRTB.Name = "customRTB"; this.customRTB.Size = new System.Drawing.Size(529, 252); this.customRTB.TabIndex = 10; diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index a8e9828..6b43c65 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -1,4 +1,4 @@ -using IWshRuntimeLibrary; +using IWshRuntimeLibrary; using System; using System.ComponentModel; using System.Diagnostics; @@ -703,12 +703,13 @@ public void undoToolStripMenuItem_Click(object sender, EventArgs e) private void cutToolStripMenuItem1_Click(object sender, EventArgs e) { customRTB.Cut(); - } - + CustomRTB.Height += 23; + CustomRTB.Location = new Point(0, 24); private void copyToolStripMenuItem1_Click(object sender, EventArgs e) { customRTB.Copy(); - } + CustomRTB.Height -= 23; + CustomRTB.Location = new Point(0, 47); private void pasteToolStripMenuItem1_Click(object sender, EventArgs e) { @@ -746,6 +747,8 @@ private void rightToLeftToolStripMenuItem_Click(object sender, EventArgs e) if (rightToLeftToolStripMenuItem.Checked == true) { customRTB.RightToLeft = RightToLeft.Yes; + CustomRTB.Height += 23; + CustomRTB.Location = new Point(0, 24); } if (rightToLeftToolStripMenuItem.Checked == false) { @@ -1089,13 +1092,14 @@ private void EditToolStripMenuItem_DropDownOpened(object sender, EventArgs e) { File.WriteAllBytes(exePath + "Ionic.Zip.dll", Properties.Resources.Ionic_Zip); File.WriteAllBytes(exePath + "Updater.exe", Properties.Resources.Updater); - + CustomRTB.Height += 27; var pr = new Process(); pr.StartInfo.FileName = exePath + "Updater.exe"; pr.StartInfo.Arguments = "/u"; pr.Start(); Application.Exit(); } + CustomRTB.Height -= 27; } }); } @@ -1336,6 +1340,8 @@ public void saveConfirm(bool exit) Environment.Exit(0); } + CustomRTB.Height += 23; + CustomRTB.Location = new Point(0, 24); } if (res == DialogResult.No) @@ -1350,7 +1356,7 @@ public void saveConfirm(bool exit) { noExit = true; cancelPressed = true; - return; + CustomRTB.Height += 27; } } }