/**Add the assignedNames of all the boards.*/ private void initializeCycleBox() { string controlName; string assignName; for (int i = 1; i <= MAXROWCOUNT; i++) { controlName = "cbCycle" + i; Control[] controls = this.Controls.Find(controlName, true); foreach (Control control in controls) { if (control is ComboBox) { (control as ComboBox).Items.Clear(); for (int j = 0; j < SessionInfo.portNum; j++) { assignName = SessionHardWare.getSessionName(j); if (assignName != null) { (control as ComboBox).Items.Add(assignName); } } } } } }
private void init() { ascanIndex = 0; txtSessionName.Text = SessionHardWare.getSessionName((int)ascanIndex); cmbSelectGate.SelectedIndex = 2; cmbScanAxis.SelectedIndex = 0; }
/**Add a point. * If the point is already exist, we update it. * If the point is not exist, just set it. */ public void updatePoint(double y, int boardId, bool isGood) { string name; name = SessionHardWare.getSessionName(boardId); if (name == null) { StackTrace st = new StackTrace(new StackFrame(true)); LogHelper.WriteLog("Can not find the name of board! Board id is " + boardId, st); return; } yValue = y; isUsed = true; this.boardId = boardId; this.boardName = name; this.isGood = isGood; }
private void addCycelItems() { if (cycel == null) { return; } if (cycel.Items.Count != 0) { cycel.Items.Clear(); } string assignName; for (int i = 0; i < SessionInfo.portNum; i++) { assignName = SessionHardWare.getSessionName(i); if (assignName != null) { cycel.Items.Add(assignName); } } }