Skip to content

Commit

Permalink
Added a basic icon, might be changed in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
R3FR4G authored and R3FR4G committed Apr 18, 2020
1 parent 371d50c commit 258c7dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Text-File-Displayer/Project1/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,12 @@ static Form MakeForm(System.Drawing.Size size, System.Drawing.Color backcolor, s
form.StartPosition = FormStartPosition.CenterScreen;
form.BackColor = backcolor;
form.Text = windowTitle;
//removed icon atm because i'm too lazy to do an other one lol
//form.Icon = new Icon("icon.ico");
try
{
form.Icon = new Icon("icon.ico");
form.ShowIcon = true;
}
catch { }
form.ShowIcon = true;
return form;
}
Expand Down
8 changes: 6 additions & 2 deletions Text-File-Displayer/Project1/Project1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
</ApplicationIcon>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
Expand All @@ -49,5 +48,10 @@
<Reference Include="System.Windows.Forms" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Binary file added Text-File-Displayer/Project1/icon.ico
Binary file not shown.

0 comments on commit 258c7dc

Please sign in to comment.