Skip to content

Commit

Permalink
Fixed window title
Browse files Browse the repository at this point in the history
  • Loading branch information
R3FR4G authored and R3FR4G committed Apr 12, 2020
1 parent 42ea495 commit 5aa0cfb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Text-File-Displayer/Project1/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,15 @@ static void Analyze_file(string fileName)
}
catch (FileNotFoundException e)
{
if (emblemLabel.IsHandleCreated == true)
{
emblemLabel.BeginInvoke(new MethodInvoker(delegate
{
emblemLabel.Text = "No text\nto display";
}));
}
string errorName = e.GetType().Name;
// We don't want error spam for every loop
// We don't want error spam for every
if (previousError != errorName)
{
previousError = errorName;
Expand Down Expand Up @@ -499,7 +506,7 @@ static void ResizeEnd(object sender, EventArgs e)
[STAThread]
static void Main()
{
MainForm = MakeForm(new Size(250, 200), Color.FromArgb(0, 0, 0), "SRB2 Emblem Display");
MainForm = MakeForm(new Size(250, 200), Color.FromArgb(0, 0, 0), "Text File Display");
windowWidth = 250;
windowHeight = 200;
MainForm.FormBorderStyle = FormBorderStyle.Sizable;
Expand Down

0 comments on commit 5aa0cfb

Please sign in to comment.