Add ApplicationLogo. Sidebar - Fixed Default Image Path.

This commit is contained in:
DucDangAnh 2020-07-06 11:07:02 +07:00
parent 9e9875123d
commit f56206d5c2
3 changed files with 4 additions and 2 deletions

View File

@ -186,6 +186,9 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Images\ApplicationLogo.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Images\CantConnectCamera.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

View File

@ -9,7 +9,7 @@ namespace AIParkingApplication
{
private Statistic statistic;
public Sidebar(ApiController apiController, string logoImagePath = @"C:\Users\B.I\Desktop\photo_2020-06-25_21-22-56.jpg")
public Sidebar(ApiController apiController, string logoImagePath = @".\Images\ApplicationLogo.ico")
{
InitializeComponent();
if (File.Exists(logoImagePath))
@ -17,7 +17,6 @@ namespace AIParkingApplication
PictureBox pictureBoxImageLogo;
pictureBoxImageLogo = new PictureBox();
pictureBoxImageLogo.Location = new Point(1, 1);
pictureBoxImageLogo.BorderStyle = BorderStyle.FixedSingle;
pictureBoxImageLogo.Size = new Size(185, 185);
pictureBoxImageLogo.SizeMode = PictureBoxSizeMode.StretchImage;
pictureBoxImageLogo.Image = new Bitmap(logoImagePath);