33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Windows.Forms;
|
|
|
|
namespace AIParkingApplication
|
|
{
|
|
public partial class Sidebar : UserControl
|
|
{
|
|
private Statistic statistic;
|
|
|
|
public Sidebar(ApiController apiController, string logoImagePath = @".\Images\ApplicationLogo.ico")
|
|
{
|
|
InitializeComponent();
|
|
if (File.Exists(logoImagePath))
|
|
{
|
|
PictureBox pictureBoxImageLogo;
|
|
pictureBoxImageLogo = new PictureBox();
|
|
pictureBoxImageLogo.Location = new Point(1, 1);
|
|
pictureBoxImageLogo.Size = new Size(185, 185);
|
|
pictureBoxImageLogo.SizeMode = PictureBoxSizeMode.StretchImage;
|
|
pictureBoxImageLogo.Image = new Bitmap(logoImagePath);
|
|
Controls.Add(pictureBoxImageLogo);
|
|
}
|
|
|
|
statistic = new Statistic(apiController, TimeSpan.FromMinutes(10));
|
|
statistic.Location = new Point(0, 400);
|
|
statistic.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
|
Controls.Add(statistic);
|
|
}
|
|
}
|
|
}
|