public void sendScanningMes(string no, string labelBarId) { Control[] controls = this.Controls.Find("oneScanningMonitoringView" + no, false); if (controls != null && controls.Length > 0) { CJia.PIVAS.App.UI.OneScanningMonitoringView oneScanningMonitoringView = controls[0] as CJia.PIVAS.App.UI.OneScanningMonitoringView; oneScanningMonitoringView.Scanning(labelBarId); } else { } }
private void init() { int height = this.Size.Height; int width = this.Size.Width; int oneHeight = height / 2; int oneWidth = width / 7; for (int i = 1; i <= 14; i++) { CJia.PIVAS.App.UI.OneScanningMonitoringView oneScanningMonitoringView = this.Controls.Find("oneScanningMonitoringView" + i, false)[0] as CJia.PIVAS.App.UI.OneScanningMonitoringView; oneScanningMonitoringView.Height = oneHeight; oneScanningMonitoringView.Width = oneWidth; oneScanningMonitoringView.Location = new Point(oneWidth * ((i - 1) % (count / 2)), oneHeight * ((i - 1) / (count / 2))); } }