mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Disabling shortcut keys while file locked
This commit is contained in:
parent
62d4f3d54a
commit
bb8a62c06d
2 changed files with 21 additions and 3 deletions
2
Crypto Notepad/MainForm.Designer.cs
generated
2
Crypto Notepad/MainForm.Designer.cs
generated
|
|
@ -1,4 +1,4 @@
|
||||||
namespace Crypto_Notepad
|
namespace Crypto_Notepad
|
||||||
{
|
{
|
||||||
partial class MainForm
|
partial class MainForm
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -1121,7 +1121,7 @@ private void ExitMainMenu_Click(object sender, EventArgs e)
|
||||||
|
|
||||||
private void FileMainMenu_DropDownOpened(object sender, EventArgs e)
|
private void FileMainMenu_DropDownOpened(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (filePath == "")
|
if (filePath == null)
|
||||||
{
|
{
|
||||||
fileLocationMainMenu.Enabled = false;
|
fileLocationMainMenu.Enabled = false;
|
||||||
deleteFileMainMenu.Enabled = false;
|
deleteFileMainMenu.Enabled = false;
|
||||||
|
|
@ -1653,6 +1653,15 @@ private void FileLockedPanel_VisibleChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (fileLockedPanel.Visible)
|
if (fileLockedPanel.Visible)
|
||||||
{
|
{
|
||||||
|
foreach (ToolStripItem item in mainMenu.Items)
|
||||||
|
{
|
||||||
|
if (item is ToolStripDropDownItem)
|
||||||
|
foreach (ToolStripItem dropDownItem in ((ToolStripDropDownItem)item).DropDownItems)
|
||||||
|
{
|
||||||
|
dropDownItem.Enabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PublicVar.encryptionKey.Set(null);
|
PublicVar.encryptionKey.Set(null);
|
||||||
caretPos = richTextBox.SelectionStart;
|
caretPos = richTextBox.SelectionStart;
|
||||||
richTextBox.Visible = false;
|
richTextBox.Visible = false;
|
||||||
|
|
@ -1663,6 +1672,15 @@ private void FileLockedPanel_VisibleChanged(object sender, EventArgs e)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
foreach (ToolStripItem item in mainMenu.Items)
|
||||||
|
{
|
||||||
|
if (item is ToolStripDropDownItem)
|
||||||
|
foreach (ToolStripItem dropDownItem in ((ToolStripDropDownItem)item).DropDownItems)
|
||||||
|
{
|
||||||
|
dropDownItem.Enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
richTextBox.Visible = true;
|
richTextBox.Visible = true;
|
||||||
toolbarPanel.Enabled = true;
|
toolbarPanel.Enabled = true;
|
||||||
searchPanel.Enabled = true;
|
searchPanel.Enabled = true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue