private void SetBinValueFromDataSet() { binSet.Select(recipeNo); for (int i = 0; i < binSet.RowCount; i++) { binSet.Fetch(i); binRows[i].RecNo = binSet.RecNo; binRows[i].Type = binSet.Type; binRows[i].Index = binSet.Index; binRows[i].Name = binSet.Name; binRows[i].Mark = binSet.Mark; binRows[i].Clear(); binFormulaSet.Select(binSet.RecNo); for (int j = 0; j < binFormulaSet.RowCount; j++) { binFormulaSet.Fetch(j); binRows[i].Formulas[j].RecNo = binFormulaSet.RecNo; binRows[i].Formulas[j].Logic = binFormulaSet.Logic; binRows[i].Formulas[j].Formula = binFormulaSet.Formula; } } binGrid.RefreshData(); }
private void Load(Int64 recipeNo) { binSet.Select(recipeNo); Count = binSet.RowCount; for (int i = 0; i < binSet.RowCount; i++) { binSet.Fetch(i); BinObject item = new BinObject(binSet); indexes.Add(item.Index, item); if (string.IsNullOrWhiteSpace(item.Name) == true) { names.Add($"Bin-{i+1}", item); } else { names.Add(item.Name, item); } } }
private void SetEditValueFromDataSet() { nameEdit.Text = recipeSet.Name; memoEdit.Text = recipeSet.Memo; st1XEdit.EditValue = recipeSet.ST1_X; st1YEdit.EditValue = recipeSet.ST1_Y; st1QREdit.Text = recipeSet.ST1_QR; st2XEdit.EditValue = recipeSet.ST2_X; st2YEdit.EditValue = recipeSet.ST2_Y; st2QREdit.Text = recipeSet.ST2_QR; masterSet.Select(recipeNo); masterSet.Fetch(); Int64 masterPatternNo = masterSet.RecNo; xLengthEdit.Value = masterSet.XLength; yHeightEdit.Value = masterSet.YHeight; stringCountEdit.Value = masterSet.StrCount; ledCountEdit.Value = masterSet.LedCount; ctrlPatternGrid.XLength = masterSet.XLength; ctrlPatternGrid.YHeight = masterSet.YHeight; ctrlPatternGrid.StringCount = masterSet.StrCount; ctrlPatternGrid.LedCount = masterSet.LedCount; ctrlPatternGrid.RefreshGrid(); masterLedSet.Select(masterPatternNo); for (int i = 0; i < masterLedSet.RowCount; i++) { masterLedSet.Fetch(i); int x = masterLedSet.X; int y = masterLedSet.Y; ctrlPatternGrid.PatternRows[y].Leds[x].RecNo = masterLedSet.RecNo; ctrlPatternGrid.PatternRows[y].Leds[x].X = x; ctrlPatternGrid.PatternRows[y].Leds[x].Y = y; ctrlPatternGrid.PatternRows[y].Leds[x].StringIndex = masterLedSet.StrNo; ctrlPatternGrid.PatternRows[y].Leds[x].LedIndex = masterLedSet.LedNo; ctrlPatternGrid.PatternRows[y].Leds[x].Type = masterLedSet.Type; } ctrlPatternGrid.RefreshGridData(); smuSet.Select(recipeNo); RefreshSmuGrid(AppRes.Properties.SmuCount, masterSet.StrCount); for (int i = 0; i < smuSet.RowCount; i++) { smuSet.Fetch(i); stringRows[smuSet.StringNo].RecNo = smuSet.RecNo; stringRows[smuSet.StringNo].Sets.DDWord(0, smuSet.Sets); } RefreshSmuGridData(); binSet.Select(recipeNo); for (int i = 0; i < binSet.RowCount; i++) { binSet.Fetch(i); binRows[i].RecNo = binSet.RecNo; binRows[i].Type = binSet.Type; binRows[i].Index = binSet.Index; binRows[i].Name = binSet.Name; binRows[i].Mark = binSet.Mark; } AppHelper.RefreshGridData(binGridView); }