private void ShowOnCameraMessage(string message, Color testfontColor) { Oklabel.ForeColor = testfontColor; Oklabel.Text = message; Oklabel.Visible = true; Oklabel.Update(); Task ignoredAwaitableResult = this.ClearFoundQRCode(); }
private async Task ClearFoundQRCode() { await Task.Delay(800); Oklabel.Visible = false; lblUltimoStatus.Text = ""; point1 = new Point(0, 0); point2 = new Point(0, 0); point3 = new Point(0, 0); point4 = new Point(0, 0); Oklabel.Update(); }
private void CentralizarLabelOK() { var pointXs = point1.X; var pointXg = point1.X; if (pointXs > point2.X) { pointXs = point2.X; } else if (pointXg < point2.X) { pointXg = point2.X; } if (pointXs > point3.X) { pointXs = point3.X; } else if (pointXg < point3.X) { pointXg = point3.X; } if (pointXs > point4.X) { pointXs = point4.X; } else if (pointXg < point4.X) { pointXg = point4.X; } var pointYs = point1.Y; var pointYg = point1.Y; if (pointYs > point2.Y) { pointYs = point2.Y; } else if (pointYg < point2.Y) { pointYg = point2.Y; } if (pointYs > point3.Y) { pointYs = point3.Y; } else if (pointYg < point3.Y) { pointYg = point3.Y; } if (pointYs > point4.Y) { pointYs = point4.Y; } else if (pointYg < point4.Y) { pointYg = point4.Y; } Oklabel.Location = new Point(((pointXs + pointXg) / 2) - (Oklabel.Width / 2), ((pointYs + pointYg) / 2) - (Oklabel.Height / 2)); Oklabel.Update(); }