Skip to content

Commit 5aa0cfb

Browse files
R3FR4GR3FR4G
authored andcommitted
Fixed window title
1 parent 42ea495 commit 5aa0cfb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Text-File-Displayer/Project1/Program.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,15 @@ static void Analyze_file(string fileName)
137137
}
138138
catch (FileNotFoundException e)
139139
{
140+
if (emblemLabel.IsHandleCreated == true)
141+
{
142+
emblemLabel.BeginInvoke(new MethodInvoker(delegate
143+
{
144+
emblemLabel.Text = "No text\nto display";
145+
}));
146+
}
140147
string errorName = e.GetType().Name;
141-
// We don't want error spam for every loop
148+
// We don't want error spam for every
142149
if (previousError != errorName)
143150
{
144151
previousError = errorName;
@@ -499,7 +506,7 @@ static void ResizeEnd(object sender, EventArgs e)
499506
[STAThread]
500507
static void Main()
501508
{
502-
MainForm = MakeForm(new Size(250, 200), Color.FromArgb(0, 0, 0), "SRB2 Emblem Display");
509+
MainForm = MakeForm(new Size(250, 200), Color.FromArgb(0, 0, 0), "Text File Display");
503510
windowWidth = 250;
504511
windowHeight = 200;
505512
MainForm.FormBorderStyle = FormBorderStyle.Sizable;

0 commit comments

Comments
 (0)