mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Added indicator (*) in main window title while text is modified
This commit is contained in:
parent
b5b49ec535
commit
dea6afad84
1 changed files with 33 additions and 0 deletions
|
|
@ -603,6 +603,16 @@ public void ToolbarIcons(bool oldIcons)
|
|||
|
||||
|
||||
#region Event Handlers
|
||||
private void RichTextBox_ModifiedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (richTextBox.Modified == false)
|
||||
{
|
||||
if (Text.Contains("*"))
|
||||
{
|
||||
Text = Text.Substring(0, Text.Length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void StatusPanel_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (statusPanel.Visible)
|
||||
|
|
@ -854,6 +864,29 @@ private void RichTextBox_DragDrop(object sender, DragEventArgs e)
|
|||
private void RichTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
statusPanelTimer.Start();
|
||||
|
||||
if (richTextBox.Modified)
|
||||
{
|
||||
if (!Text.Contains("*"))
|
||||
{
|
||||
Text += "*";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Text.Contains("*"))
|
||||
{
|
||||
Text = Text.Substring(0, Text.Length - 1);
|
||||
}
|
||||
}
|
||||
if (richTextBox.TextLength == 0)
|
||||
{
|
||||
if (Text.Contains("*"))
|
||||
{
|
||||
Text = Text.Substring(0, Text.Length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void StatusPanelLabel_TextChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue