public override void setupComponents(OrderDealingGUI parent) { Label text = new Label(); text.Text = "Orders In Preparation"; text.Parent = parent; text.BorderStyle = BorderStyle.FixedSingle; text.Font = new Font("Arial", 14, FontStyle.Bold); text.BackColor = Color.SkyBlue; text.Location = new Point(this.x, this.y); text.AutoSize = true; parent.Controls.Add(text); parent.controls.Add(text); int i = 0; foreach (KeyValuePair <int, string> item in this.orders) { Label order = new Label(); order.Tag = item.Key; order.Parent = parent; order.Text = item.Key + " : " + item.Value; order.BorderStyle = BorderStyle.FixedSingle; order.Font = new Font("Arial", 14, FontStyle.Bold); order.BackColor = Color.SkyBlue; order.Location = new Point(this.x, this.y + text.Height * (i + 1) + 10); order.AutoSize = true; parent.Controls.Add(order); parent.controls.Add(order); Button button = new Button(); button.Parent = parent; button.Text = "<-"; button.BackColor = Color.SkyBlue; button.Location = new Point(this.x + order.Width + 10, this.y + text.Height * (i + 1) + 10); button.Size = new Size(20, 20); button.Tag = order; button.Click += new EventHandler((sender, e) => parent.ButtonClick(sender, e, "In Preparation")); parent.Controls.Add(button); parent.controls.Add(button); Button button2 = new Button(); button2.Parent = parent; button2.Text = "->"; button2.BackColor = Color.SkyBlue; button2.Location = new Point(this.x + order.Width + button.Width + 10, this.y + text.Height * (i + 1) + 10); button2.Size = new Size(20, 20); button2.Tag = order; button2.Click += new EventHandler((sender, e) => parent.ButtonClick(sender, e, "Ready")); parent.Controls.Add(button2); parent.controls.Add(button2); i++; } }
public abstract void setupComponents(OrderDealingGUI parent);