private string SetBotInfo(int i) { MinerBot b = bots[i]; return(String.Format("Bot{0} - {1} / {2} / {3} / {4}", (i + 1), b.active, b.inventoryCount, b.phase, b.mining)); }
private void UpdateLabels() { Point cursor = new Point(); GetCursorPos(ref cursor); var c = MinerBot.GetColorAt(cursor); btnColor.BackColor = c; lblColor.Text = c.Name; lblCoords.Text = cursor.X + ", " + cursor.Y; lblRgb.Text = String.Format("{0}, {1}, {2}, {3}", c.R, c.G, c.B, c.A); int i = 0; //if (cursor.X < center.X && cursor.Y < center.Y) // i = 0; //else if (cursor.X > center.X && cursor.Y < center.Y) // i = 1; //else if (cursor.X < center.X && cursor.Y > center.Y) // i = 2; //else if (cursor.X > center.X && cursor.Y > center.Y) // i = 3; lblDist.Text = (cursor.X - bots[i].X) + ", " + (cursor.Y - bots[i].Y); //if (!active) // return; timeCount--; if (timeCount == 0) { //lblTime.Text = (++time).ToString(); lbl1.Text = SetBotInfo(0); //lbl2.Text = SetBotInfo(1); //lbl3.Text = SetBotInfo(2); //lbl4.Text = SetBotInfo(3); timeCount = 100; } }