Now its responsive
This commit is contained in:
+38
-4
@@ -17,7 +17,7 @@ namespace Caisses
|
||||
{
|
||||
InitializeComponent();
|
||||
DoubleBuffered = true;
|
||||
store = new GraphicalStore(10,12,pbxRayons.Size,pbxCaisses.Size,pbxWaitRoom.Size);
|
||||
store = new GraphicalStore(10,12,pbxCaisses.Size);
|
||||
}
|
||||
|
||||
private void btnStartStop_Click(object sender, EventArgs e)
|
||||
@@ -44,7 +44,7 @@ namespace Caisses
|
||||
|
||||
private void tmrDraw_Tick(object sender, EventArgs e)
|
||||
{
|
||||
List<Bitmap> result = store.Draw();
|
||||
List<Bitmap> result = store.Draw(pbxRayons.Size,pbxWaitRoom.Size,pbxCaisses.Size);
|
||||
if (pbxRayons.Image != null)
|
||||
{
|
||||
pbxRayons.Image.Dispose();
|
||||
@@ -58,8 +58,8 @@ namespace Caisses
|
||||
pbxWaitRoom.Image.Dispose();
|
||||
}
|
||||
pbxRayons.Image = result[0];
|
||||
pbxCaisses.Image = result[1];
|
||||
pbxWaitRoom.Image = result[2];
|
||||
pbxWaitRoom.Image = result[1];
|
||||
pbxCaisses.Image = result[2];
|
||||
|
||||
lblClients.Text = "Clients : " + store.Clients.Count();
|
||||
lblClientsWithoutCheckout.Text = "Clients without checkout : "+ store.WaitingClients.Count();
|
||||
@@ -67,5 +67,39 @@ namespace Caisses
|
||||
lblAvgWaitingTime.Text = "AverageWaitingTime = " + store.AverageWaitingTime;
|
||||
lblTime.Text = "Time of the day : "+store.TimeOfTheDayInHours + ":"+store.TimeOfTheDayInMinuts % 60;
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
ResizeCanvas();
|
||||
}
|
||||
|
||||
private void pbxWaitRoom_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void pbxCaisses_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void pbxRayons_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void Form1_Resize(object sender, EventArgs e)
|
||||
{
|
||||
ResizeCanvas();
|
||||
}
|
||||
private void ResizeCanvas()
|
||||
{
|
||||
pbxRayons.Size = new Size(this.Width, Convert.ToInt32((this.Height / 10.0) * 5.0));
|
||||
pbxRayons.Location = new Point(0, 0);
|
||||
pbxWaitRoom.Size = new Size(this.Width, Convert.ToInt32((this.Height / 10.0) * 2.0));
|
||||
pbxWaitRoom.Location = new Point(0, pbxRayons.Height);
|
||||
pbxCaisses.Size = new Size(this.Width, Convert.ToInt32((this.Height / 10.0) * 3.0));
|
||||
pbxCaisses.Location = new Point(0, pbxWaitRoom.Location.Y + pbxWaitRoom.Height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user