diff --git a/Crypto Notepad/App.config b/Crypto Notepad/App.config index 35a9003..fea6a93 100644 --- a/Crypto Notepad/App.config +++ b/Crypto Notepad/App.config @@ -177,6 +177,9 @@ True + + True + diff --git a/Crypto Notepad/Forms/MainForm.Designer.cs b/Crypto Notepad/Forms/MainForm.Designer.cs index bd94eb8..47e1e7e 100644 --- a/Crypto Notepad/Forms/MainForm.Designer.cs +++ b/Crypto Notepad/Forms/MainForm.Designer.cs @@ -113,6 +113,7 @@ public void InitializeComponent() this.statusPanelLinesLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.statusPanelModifiedLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.statusPanelSizeLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.statusPanelReadonlyLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components); this.trayMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.showTrayMenu = new System.Windows.Forms.ToolStripMenuItem(); @@ -120,14 +121,15 @@ public void InitializeComponent() this.fileLockedPanel = new System.Windows.Forms.Panel(); this.fileLockedCloseButton = new System.Windows.Forms.Button(); this.fileLockedOkButton = new System.Windows.Forms.Button(); - this.fileLockedKeyTextBox = new System.Windows.Forms.PlaceholderTextBox(); this.fileLockedShowKey = new System.Windows.Forms.PictureBox(); this.fileLockedLabel = new System.Windows.Forms.Label(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.richTextBoxPanel = new System.Windows.Forms.Panel(); - this.richTextBox = new Crypto_Notepad.ExRichTextBox(); this.statusPanelTimer = new System.Windows.Forms.Timer(this.components); this.lockTimer = new System.Windows.Forms.Timer(this.components); + this.statusPanelWordwrapLabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.fileLockedKeyTextBox = new System.Windows.Forms.PlaceholderTextBox(); + this.richTextBox = new Crypto_Notepad.ExRichTextBox(); this.mainMenu.SuspendLayout(); this.contextMenu.SuspendLayout(); this.searchPanel.SuspendLayout(); @@ -192,7 +194,7 @@ public void InitializeComponent() // this.newMainMenu.Name = "newMainMenu"; this.newMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); - this.newMainMenu.Size = new System.Drawing.Size(232, 22); + this.newMainMenu.Size = new System.Drawing.Size(248, 22); this.newMainMenu.Text = "New"; this.newMainMenu.Click += new System.EventHandler(this.NewMainMenu_Click); // @@ -200,20 +202,20 @@ public void InitializeComponent() // this.openMainMenu.Name = "openMainMenu"; this.openMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.openMainMenu.Size = new System.Drawing.Size(232, 22); + this.openMainMenu.Size = new System.Drawing.Size(248, 22); this.openMainMenu.Text = "Open..."; this.openMainMenu.Click += new System.EventHandler(this.OpenMainMenu_Click); // // mainMenuSeparator1 // this.mainMenuSeparator1.Name = "mainMenuSeparator1"; - this.mainMenuSeparator1.Size = new System.Drawing.Size(229, 6); + this.mainMenuSeparator1.Size = new System.Drawing.Size(245, 6); // // saveMainMenu // this.saveMainMenu.Name = "saveMainMenu"; this.saveMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.saveMainMenu.Size = new System.Drawing.Size(232, 22); + this.saveMainMenu.Size = new System.Drawing.Size(248, 22); this.saveMainMenu.Text = "Save"; this.saveMainMenu.Click += new System.EventHandler(this.SaveMainMenu_Click); // @@ -222,7 +224,7 @@ public void InitializeComponent() this.saveAsMainMenu.Name = "saveAsMainMenu"; this.saveAsMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.S))); - this.saveAsMainMenu.Size = new System.Drawing.Size(232, 22); + this.saveAsMainMenu.Size = new System.Drawing.Size(248, 22); this.saveAsMainMenu.Text = "Save As..."; this.saveAsMainMenu.Click += new System.EventHandler(this.SaveAsMainMenu_Click); // @@ -231,39 +233,43 @@ public void InitializeComponent() this.saveCloseFileMainMenu.Name = "saveCloseFileMainMenu"; this.saveCloseFileMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.Shift) | System.Windows.Forms.Keys.S))); - this.saveCloseFileMainMenu.Size = new System.Drawing.Size(232, 22); + this.saveCloseFileMainMenu.Size = new System.Drawing.Size(248, 22); this.saveCloseFileMainMenu.Text = "Save && Close File"; this.saveCloseFileMainMenu.Click += new System.EventHandler(this.SaveCloseFileMainMenu_Click); // // mainMenuSeparator2 // this.mainMenuSeparator2.Name = "mainMenuSeparator2"; - this.mainMenuSeparator2.Size = new System.Drawing.Size(229, 6); + this.mainMenuSeparator2.Size = new System.Drawing.Size(245, 6); // // openFileLocationMainMenu // this.openFileLocationMainMenu.Name = "openFileLocationMainMenu"; - this.openFileLocationMainMenu.Size = new System.Drawing.Size(232, 22); + this.openFileLocationMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) + | System.Windows.Forms.Keys.O))); + this.openFileLocationMainMenu.Size = new System.Drawing.Size(248, 22); this.openFileLocationMainMenu.Text = "Open File Location"; this.openFileLocationMainMenu.Click += new System.EventHandler(this.OpenFileLocationMainMenu_Click); // // deleteFileMainMenu // this.deleteFileMainMenu.Name = "deleteFileMainMenu"; - this.deleteFileMainMenu.Size = new System.Drawing.Size(232, 22); + this.deleteFileMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) + | System.Windows.Forms.Keys.D))); + this.deleteFileMainMenu.Size = new System.Drawing.Size(248, 22); this.deleteFileMainMenu.Text = "Delete File"; this.deleteFileMainMenu.Click += new System.EventHandler(this.DeleteFileToolStripMenuItem_Click); // // mainMenuSeparator3 // this.mainMenuSeparator3.Name = "mainMenuSeparator3"; - this.mainMenuSeparator3.Size = new System.Drawing.Size(229, 6); + this.mainMenuSeparator3.Size = new System.Drawing.Size(245, 6); // // exitMainMenu // this.exitMainMenu.Name = "exitMainMenu"; this.exitMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q))); - this.exitMainMenu.Size = new System.Drawing.Size(232, 22); + this.exitMainMenu.Size = new System.Drawing.Size(248, 22); this.exitMainMenu.Text = "Exit"; this.exitMainMenu.Click += new System.EventHandler(this.ExitMainMenu_Click); // @@ -295,7 +301,7 @@ public void InitializeComponent() // this.undoMainMenu.Name = "undoMainMenu"; this.undoMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z))); - this.undoMainMenu.Size = new System.Drawing.Size(164, 22); + this.undoMainMenu.Size = new System.Drawing.Size(180, 22); this.undoMainMenu.Text = "Undo"; this.undoMainMenu.Click += new System.EventHandler(this.UndoMainMenu_Click); // @@ -303,21 +309,21 @@ public void InitializeComponent() // this.redoMainMenu.Name = "redoMainMenu"; this.redoMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y))); - this.redoMainMenu.Size = new System.Drawing.Size(164, 22); + this.redoMainMenu.Size = new System.Drawing.Size(180, 22); this.redoMainMenu.Text = "Redo"; this.redoMainMenu.Click += new System.EventHandler(this.RedoMainMenu_Click); // // mainMenuSeparator4 // this.mainMenuSeparator4.Name = "mainMenuSeparator4"; - this.mainMenuSeparator4.Size = new System.Drawing.Size(161, 6); + this.mainMenuSeparator4.Size = new System.Drawing.Size(177, 6); // // cutMainMenu // this.cutMainMenu.Enabled = false; this.cutMainMenu.Name = "cutMainMenu"; this.cutMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X))); - this.cutMainMenu.Size = new System.Drawing.Size(164, 22); + this.cutMainMenu.Size = new System.Drawing.Size(180, 22); this.cutMainMenu.Text = "Cut"; this.cutMainMenu.Click += new System.EventHandler(this.CutMainMenu_Click); // @@ -326,7 +332,7 @@ public void InitializeComponent() this.copyMainMenu.Enabled = false; this.copyMainMenu.Name = "copyMainMenu"; this.copyMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); - this.copyMainMenu.Size = new System.Drawing.Size(164, 22); + this.copyMainMenu.Size = new System.Drawing.Size(180, 22); this.copyMainMenu.Text = "Copy"; this.copyMainMenu.Click += new System.EventHandler(this.CopyMainMenu_Click); // @@ -334,7 +340,7 @@ public void InitializeComponent() // this.pasteMainMenu.Name = "pasteMainMenu"; this.pasteMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V))); - this.pasteMainMenu.Size = new System.Drawing.Size(164, 22); + this.pasteMainMenu.Size = new System.Drawing.Size(180, 22); this.pasteMainMenu.Text = "Paste"; this.pasteMainMenu.Click += new System.EventHandler(this.PasteMainMenu_Click); // @@ -343,34 +349,34 @@ public void InitializeComponent() this.deleteMainMenu.Enabled = false; this.deleteMainMenu.Name = "deleteMainMenu"; this.deleteMainMenu.ShortcutKeys = System.Windows.Forms.Keys.Delete; - this.deleteMainMenu.Size = new System.Drawing.Size(164, 22); + this.deleteMainMenu.Size = new System.Drawing.Size(180, 22); this.deleteMainMenu.Text = "Delete"; this.deleteMainMenu.Click += new System.EventHandler(this.DeleteMainMenu_Click); // // mainMenuSeparator5 // this.mainMenuSeparator5.Name = "mainMenuSeparator5"; - this.mainMenuSeparator5.Size = new System.Drawing.Size(161, 6); + this.mainMenuSeparator5.Size = new System.Drawing.Size(177, 6); // // findMainMenu // this.findMainMenu.Name = "findMainMenu"; this.findMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F))); - this.findMainMenu.Size = new System.Drawing.Size(164, 22); + this.findMainMenu.Size = new System.Drawing.Size(180, 22); this.findMainMenu.Text = "Find"; this.findMainMenu.Click += new System.EventHandler(this.FindMainMenu_Click); // // mainMenuSeparator6 // this.mainMenuSeparator6.Name = "mainMenuSeparator6"; - this.mainMenuSeparator6.Size = new System.Drawing.Size(161, 6); + this.mainMenuSeparator6.Size = new System.Drawing.Size(177, 6); // // selectAllMainMenu // this.selectAllMainMenu.Name = "selectAllMainMenu"; this.selectAllMainMenu.ShortcutKeyDisplayString = ""; this.selectAllMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A))); - this.selectAllMainMenu.Size = new System.Drawing.Size(164, 22); + this.selectAllMainMenu.Size = new System.Drawing.Size(180, 22); this.selectAllMainMenu.Text = "Select All"; this.selectAllMainMenu.Click += new System.EventHandler(this.SelectAllMainMenu_Click); // @@ -380,7 +386,8 @@ public void InitializeComponent() this.wordWrapMainMenu.CheckOnClick = true; this.wordWrapMainMenu.CheckState = System.Windows.Forms.CheckState.Checked; this.wordWrapMainMenu.Name = "wordWrapMainMenu"; - this.wordWrapMainMenu.Size = new System.Drawing.Size(164, 22); + this.wordWrapMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); + this.wordWrapMainMenu.Size = new System.Drawing.Size(180, 22); this.wordWrapMainMenu.Text = "Word Wrap"; this.wordWrapMainMenu.Click += new System.EventHandler(this.WordWrapMainMenu_Click); // @@ -396,13 +403,13 @@ public void InitializeComponent() // mainMenuSeparator7 // this.mainMenuSeparator7.Name = "mainMenuSeparator7"; - this.mainMenuSeparator7.Size = new System.Drawing.Size(161, 6); + this.mainMenuSeparator7.Size = new System.Drawing.Size(177, 6); // // clearMainMenu // this.clearMainMenu.Name = "clearMainMenu"; this.clearMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete))); - this.clearMainMenu.Size = new System.Drawing.Size(164, 22); + this.clearMainMenu.Size = new System.Drawing.Size(180, 22); this.clearMainMenu.Text = "Clear"; this.clearMainMenu.Click += new System.EventHandler(this.ClearMainMenu_Click); // @@ -480,7 +487,7 @@ public void InitializeComponent() // this.documentationMainMenu.Name = "documentationMainMenu"; this.documentationMainMenu.ShortcutKeys = System.Windows.Forms.Keys.F1; - this.documentationMainMenu.Size = new System.Drawing.Size(180, 22); + this.documentationMainMenu.Size = new System.Drawing.Size(222, 22); this.documentationMainMenu.Text = "Documentation"; this.documentationMainMenu.Click += new System.EventHandler(this.DocumentationMainMenu_Click); // @@ -488,7 +495,8 @@ public void InitializeComponent() // this.checkForUpdatesMainMenu.Name = "checkForUpdatesMainMenu"; this.checkForUpdatesMainMenu.RightToLeftAutoMirrorImage = true; - this.checkForUpdatesMainMenu.Size = new System.Drawing.Size(180, 22); + this.checkForUpdatesMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.U))); + this.checkForUpdatesMainMenu.Size = new System.Drawing.Size(222, 22); this.checkForUpdatesMainMenu.Text = "Сheck for Updates..."; this.checkForUpdatesMainMenu.Click += new System.EventHandler(this.CheckForUpdatesMainMenu_Click); // @@ -496,14 +504,16 @@ public void InitializeComponent() // this.mainMenuSeparator8.ForeColor = System.Drawing.SystemColors.ControlText; this.mainMenuSeparator8.Name = "mainMenuSeparator8"; - this.mainMenuSeparator8.Size = new System.Drawing.Size(177, 6); + this.mainMenuSeparator8.Size = new System.Drawing.Size(219, 6); // // aboutMainMenu // this.aboutMainMenu.BackColor = System.Drawing.SystemColors.Control; this.aboutMainMenu.Name = "aboutMainMenu"; this.aboutMainMenu.ShortcutKeyDisplayString = ""; - this.aboutMainMenu.Size = new System.Drawing.Size(180, 22); + this.aboutMainMenu.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) + | System.Windows.Forms.Keys.A))); + this.aboutMainMenu.Size = new System.Drawing.Size(222, 22); this.aboutMainMenu.Text = "About"; this.aboutMainMenu.Click += new System.EventHandler(this.AboutMainMenu_Click); // @@ -984,7 +994,9 @@ public void InitializeComponent() this.statusPanelLengthLabel, this.statusPanelLinesLabel, this.statusPanelModifiedLabel, - this.statusPanelSizeLabel}); + this.statusPanelSizeLabel, + this.statusPanelReadonlyLabel, + this.statusPanelWordwrapLabel}); this.statusPanel.Location = new System.Drawing.Point(0, 259); this.statusPanel.Name = "statusPanel"; this.statusPanel.ShowItemToolTips = true; @@ -1054,6 +1066,16 @@ public void InitializeComponent() this.statusPanelSizeLabel.Text = "Size"; this.statusPanelSizeLabel.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; // + // statusPanelReadonlyLabel + // + this.statusPanelReadonlyLabel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; + this.statusPanelReadonlyLabel.BorderStyle = System.Windows.Forms.Border3DStyle.Etched; + this.statusPanelReadonlyLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.statusPanelReadonlyLabel.Name = "statusPanelReadonlyLabel"; + this.statusPanelReadonlyLabel.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); + this.statusPanelReadonlyLabel.Size = new System.Drawing.Size(64, 17); + this.statusPanelReadonlyLabel.Text = "Readonly"; + // // trayIcon // this.trayIcon.ContextMenuStrip = this.trayMenu; @@ -1136,20 +1158,6 @@ public void InitializeComponent() this.fileLockedOkButton.UseVisualStyleBackColor = true; this.fileLockedOkButton.Click += new System.EventHandler(this.FileLockedOkButton_Click); // - // fileLockedKeyTextBox - // - this.fileLockedKeyTextBox.Location = new System.Drawing.Point(6, 34); - this.fileLockedKeyTextBox.Name = "fileLockedKeyTextBox"; - this.fileLockedKeyTextBox.Placeholder = "Password"; - this.fileLockedKeyTextBox.PlaceholderActiveForeColor = System.Drawing.Color.DarkGray; - this.fileLockedKeyTextBox.PlaceholderFont = new System.Drawing.Font("Segoe UI", 8.25F); - this.fileLockedKeyTextBox.PlaceholderForeColor = System.Drawing.Color.DarkGray; - this.fileLockedKeyTextBox.Size = new System.Drawing.Size(231, 22); - this.fileLockedKeyTextBox.TabIndex = 8; - this.fileLockedKeyTextBox.UseSystemPasswordChar = true; - this.fileLockedKeyTextBox.TextChanged += new System.EventHandler(this.FileLockedKeyTextBox_TextChanged); - this.fileLockedKeyTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FileLockedKeyTextBox_KeyDown); - // // fileLockedShowKey // this.fileLockedShowKey.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -1192,8 +1200,39 @@ public void InitializeComponent() this.richTextBoxPanel.Size = new System.Drawing.Size(504, 186); this.richTextBoxPanel.TabIndex = 21; // + // statusPanelTimer + // + this.statusPanelTimer.Interval = 1; + this.statusPanelTimer.Tick += new System.EventHandler(this.StatusPanelTimer_Tick); + // // lockTimer + // this.lockTimer.Tick += new System.EventHandler(this.LockTimer_Tick); + // + // statusPanelWordwrapLabel + // + this.statusPanelWordwrapLabel.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; + this.statusPanelWordwrapLabel.BorderStyle = System.Windows.Forms.Border3DStyle.Etched; + this.statusPanelWordwrapLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.statusPanelWordwrapLabel.Name = "statusPanelWordwrapLabel"; + this.statusPanelWordwrapLabel.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); + this.statusPanelWordwrapLabel.Size = new System.Drawing.Size(76, 17); + this.statusPanelWordwrapLabel.Text = "Word Wrap"; + // + // fileLockedKeyTextBox + // + this.fileLockedKeyTextBox.Location = new System.Drawing.Point(6, 34); + this.fileLockedKeyTextBox.Name = "fileLockedKeyTextBox"; + this.fileLockedKeyTextBox.Placeholder = "Password"; + this.fileLockedKeyTextBox.PlaceholderActiveForeColor = System.Drawing.Color.DarkGray; + this.fileLockedKeyTextBox.PlaceholderFont = new System.Drawing.Font("Segoe UI", 8.25F); + this.fileLockedKeyTextBox.PlaceholderForeColor = System.Drawing.Color.DarkGray; + this.fileLockedKeyTextBox.Size = new System.Drawing.Size(231, 22); + this.fileLockedKeyTextBox.TabIndex = 8; + this.fileLockedKeyTextBox.UseSystemPasswordChar = true; + this.fileLockedKeyTextBox.TextChanged += new System.EventHandler(this.FileLockedKeyTextBox_TextChanged); + this.fileLockedKeyTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FileLockedKeyTextBox_KeyDown); + // // richTextBox // this.richTextBox.AcceptsTab = true; @@ -1214,11 +1253,6 @@ public void InitializeComponent() this.richTextBox.TextChanged += new System.EventHandler(this.RichTextBox_TextChanged); this.richTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.RichTextBox_KeyDown); // - // statusPanelTimer - // - this.statusPanelTimer.Interval = 1; - this.statusPanelTimer.Tick += new System.EventHandler(this.StatusPanelTimer_Tick); - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1239,6 +1273,7 @@ public void InitializeComponent() this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Crypto Notepad"; this.Activated += new System.EventHandler(this.MainWindow_Activated); + this.Deactivate += new System.EventHandler(this.MainForm_Deactivate); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWindow_FormClosing); this.Load += new System.EventHandler(this.MainWindow_Load); this.Shown += new System.EventHandler(this.MainForm_Shown); @@ -1371,6 +1406,9 @@ public void InitializeComponent() protected internal System.Windows.Forms.PictureBox newToolbarButton; protected internal System.Windows.Forms.ToolStripMenuItem newMainMenu; protected internal System.Windows.Forms.ToolStripMenuItem fileMainMenu; + protected internal System.Windows.Forms.Timer lockTimer; private System.Windows.Forms.ToolStripMenuItem readOnlyMainMenu; + protected internal System.Windows.Forms.ToolStripStatusLabel statusPanelReadonlyLabel; + protected internal System.Windows.Forms.ToolStripStatusLabel statusPanelWordwrapLabel; } } diff --git a/Crypto Notepad/Forms/MainForm.cs b/Crypto Notepad/Forms/MainForm.cs index 89eb570..b4d563f 100644 --- a/Crypto Notepad/Forms/MainForm.cs +++ b/Crypto Notepad/Forms/MainForm.cs @@ -417,6 +417,7 @@ protected internal void StatusPanelFileInfo() } } statusPanelReadonlyLabel.Text = "Readonly: " + readOnlyMainMenu.Checked.ToString(); + statusPanelWordwrapLabel.Text = "Word Wrap: " + wordWrapMainMenu.Checked.ToString(); } } @@ -568,6 +569,7 @@ private void LoadSettings() statusPanelModifiedLabel.Visible = settings.statusPanelModified; statusPanelSizeLabel.Visible = settings.statusPanelSize; statusPanelReadonlyLabel.Visible = settings.statusPanelReadonly; + statusPanelWordwrapLabel.Visible = settings.statusPanelWordWrap; richTextBox.WordWrap = settings.editorWrap; richTextBox.ForeColor = settings.editroForeColor; richTextBox.BackColor = settings.editorBackColor; @@ -710,7 +712,6 @@ private void MainForm_Resize(object sender, EventArgs e) private void MainWindow_Activated(object sender, EventArgs e) { richTextBox.Focus(); - if (PublicVar.passwordChanged) { richTextBox.Modified = true; @@ -856,6 +857,7 @@ private async void MainWindow_Load(object sender, EventArgs e) MenuIcons(settings.menuIcons); ToolbarIcons(settings.oldToolbarIcons); statusPanelReadonlyLabel.Text = "Readonly: " + readOnlyMainMenu.Checked.ToString(); + statusPanelWordwrapLabel.Text = "Word Wrap: " + wordWrapMainMenu.Checked.ToString(); if (args.Length == 2) /*drag & drop to executable*/ { OpenAsotiations(); @@ -1378,14 +1380,7 @@ private void ReadOnlyMainMenu_Click(object sender, EventArgs e) private void WordWrapMainMenu_Click(object sender, EventArgs e) { - if (wordWrapMainMenu.Checked) - { - richTextBox.WordWrap = true; - } - else - { - richTextBox.WordWrap = false; - } + richTextBox.WordWrap = wordWrapMainMenu.Checked; settings.menuWrap = wordWrapMainMenu.Checked; settings.editorWrap = richTextBox.WordWrap; settings.Save(); @@ -1487,6 +1482,7 @@ private async void CheckForUpdatesMainMenu_Click(object sender, EventArgs e) private void AboutMainMenu_Click(object sender, EventArgs e) { AboutFrom aboutFrom = new AboutFrom(); + aboutFrom.Owner = this; aboutFrom.ShowDialog(this); } /*Help*/ diff --git a/Crypto Notepad/Forms/SettingsForm.cs b/Crypto Notepad/Forms/SettingsForm.cs index 079a235..08d3f9a 100644 --- a/Crypto Notepad/Forms/SettingsForm.cs +++ b/Crypto Notepad/Forms/SettingsForm.cs @@ -28,6 +28,7 @@ private void LoadSettings() editorOpenLinksWithComboBox.Text = settings.openLinks; editorBorderComboBox.Text = settings.editorBorder; fontDialog.Font = settings.editorFont; + editorFontLabel.Text = settings.editorFont.Name.ToString() + " " + settings.editorFont.Size.ToString(); lockTimeoutTextBox.Text = settings.lockTimeout; autoLockOnMinimizeCheckBox.Checked = settings.autoLock; autoCheckUpdatesCheckBox.Checked = settings.autoCheckUpdate; @@ -57,8 +58,9 @@ private void LoadSettings() statusPanelLinesCheckBox.Checked = settings.statusPanelLines; statusPanelModifiedCheckBox.Checked = settings.statusPanelModified; statusPanelSizeCheckBox.Checked = settings.statusPanelSize; - statusPanelLabelsGroupBox.Visible = settings.statusPanelVisible; statusPanelReadonlyCheckBox.Checked = settings.statusPanelReadonly; + statusPanelWordwrapCheckBox.Checked = settings.statusPanelWordWrap; + //statusPanelLabelsGroupBox.Visible = settings.statusPanelVisible; encryptionHintLabel.Visible = settings.encryptionHint; } #endregion @@ -171,26 +173,17 @@ private void SettingsNavigation_Click(object sender, EventArgs e) switch (settingsNavigation.SelectedIndex) { case 0: - settingsTabControl.SelectedTab = applicationTabPage; + settingsTabControl.SelectedTab = generalTabPage; break; case 1: - settingsTabControl.SelectedTab = toolbarTabPage; + settingsTabControl.SelectedTab = interfaceTabPage; break; case 2: - settingsTabControl.SelectedTab = statusPanelTabPage; - break; - case 3: - settingsTabControl.SelectedTab = searchPanelTabPage; - break; - case 4: settingsTabControl.SelectedTab = editorTabPage; break; - case 5: + case 3: settingsTabControl.SelectedTab = encryptionTabPage; - break; - case 6: - settingsTabControl.SelectedTab = integrationTabPage; - break; + break; } } @@ -302,7 +295,7 @@ private void MenuIconsCheckBox_Click(object sender, EventArgs e) main.MenuIcons(settings.menuIcons); } - private void EditorFontButton_Click(object sender, EventArgs e) + private void EditorFontLabel_Click(object sender, EventArgs e) { using (new CenterWinDialog(this)) { @@ -312,6 +305,7 @@ private void EditorFontButton_Click(object sender, EventArgs e) main.richTextBox.Font = fontDialog.Font; main.richTextBox.SetInnerMargins(Convert.ToInt32(settings.editorPaddingLeft), 0, 0, 0); settings.editorFont = fontDialog.Font; + editorFontLabel.Text = settings.editorFont.Name.ToString() + " " + settings.editorFont.Size.ToString(); } } } @@ -342,7 +336,7 @@ private void FontDialog_Apply(object sender, EventArgs e) private void StatusPanelVisibleCheckBox_Click(object sender, EventArgs e) { - statusPanelLabelsGroupBox.Visible = statusPanelVisibleCheckBox.Checked; + //statusPanelLabelsGroupBox.Visible = statusPanelVisibleCheckBox.Checked; Application.DoEvents(); MainForm main = Owner as MainForm; main.statusPanel.Visible = statusPanelVisibleCheckBox.Checked; @@ -491,7 +485,8 @@ private void PasswordIterationsTextBox_TextChanged(object sender, EventArgs e) { settings.PasswordIterations = passwordIterationsTextBox.Text; } - } + } + private void MinimizeToTrayCheckBox_Click(object sender, EventArgs e) { @@ -578,6 +573,7 @@ private void StatusPanelSizeCheckBox_Click(object sender, EventArgs e) settings.statusPanelSize = statusPanelSizeCheckBox.Checked; main.StatusPanelFileInfo(); } + #endregion private void StatusPanelReadonlyCheckBox_Click(object sender, EventArgs e) @@ -588,5 +584,12 @@ private void StatusPanelReadonlyCheckBox_Click(object sender, EventArgs e) main.StatusPanelFileInfo(); } + private void StatusPanelWordwrapCheckBox_Click(object sender, EventArgs e) + { + MainForm main = Owner as MainForm; + main.statusPanelWordwrapLabel.Visible = statusPanelWordwrapCheckBox.Checked; + settings.statusPanelWordWrap = statusPanelWordwrapCheckBox.Checked; + main.StatusPanelFileInfo(); + } } } \ No newline at end of file diff --git a/Crypto Notepad/Properties/Resources.Designer.cs b/Crypto Notepad/Properties/Resources.Designer.cs index 2b0a7bc..6552f23 100644 --- a/Crypto Notepad/Properties/Resources.Designer.cs +++ b/Crypto Notepad/Properties/Resources.Designer.cs @@ -170,6 +170,16 @@ internal static System.Drawing.Bitmap document { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap document__pencil { + get { + object obj = ResourceManager.GetObject("document__pencil", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Поиск локализованного ресурса типа System.Drawing.Bitmap. /// diff --git a/Crypto Notepad/Properties/Resources.resx b/Crypto Notepad/Properties/Resources.resx index a21fe8e..95838f2 100644 --- a/Crypto Notepad/Properties/Resources.resx +++ b/Crypto Notepad/Properties/Resources.resx @@ -1038,19 +1038,19 @@ - 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 + v9NGpIh8+DiHAAAAAElFTkSuQmCC diff --git a/Crypto Notepad/Properties/Settings.Designer.cs b/Crypto Notepad/Properties/Settings.Designer.cs index 26e5075..101090c 100644 --- a/Crypto Notepad/Properties/Settings.Designer.cs +++ b/Crypto Notepad/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace Crypto_Notepad.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -738,5 +738,18 @@ public bool statusPanelReadonly { this["statusPanelReadonly"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool statusPanelWordWrap { + get { + return ((bool)(this["statusPanelWordWrap"])); + } + set { + this["statusPanelWordWrap"] = value; + } + } } }