mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Added "Unnamed.cnp - Crypto Notepad" to title bar, when typing text in editor with no opened file
This commit is contained in:
parent
d11d04db1f
commit
336c6c1a25
1 changed files with 5 additions and 15 deletions
|
|
@ -986,21 +986,11 @@ private void RichTextBox_TextChanged(object sender, EventArgs e)
|
|||
if (!Text.Contains("*"))
|
||||
{
|
||||
Text = Text.Insert(0, "*");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Text.Contains("*"))
|
||||
{
|
||||
Text = Text.Replace("*", string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
if (richTextBox.TextLength == 0)
|
||||
{
|
||||
if (Text.Contains("*"))
|
||||
{
|
||||
Text = Text.Replace("*", string.Empty);
|
||||
if (string.IsNullOrEmpty(PublicVar.openFileName) & richTextBox.TextLength > 0)
|
||||
{
|
||||
Text = "Unnamed.cnp" + " – " + PublicVar.appName;
|
||||
Text = Text.Insert(0, "*");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue