private void ResetEditValue() { nameEdit.Text = ""; memoEdit.Text = ""; ctrlPatternGrid.RefreshGrid(); masterSet.Select((Int64)recipeCombo.SelectedValue); masterSet.Fetch(); masterNo = masterSet.RecNo; masterLedSet.Select(masterNo); if (masterLedSet.Empty == false) { 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(); } }
private void SetEditValueFromDataSet() { Int64 slaveNo; if ((slaveSet.RecNo < 1) || (slaveSet.Empty == true)) { slaveNo = 0; nameEdit.Text = ""; memoEdit.Text = ""; } else { slaveNo = slaveSet.RecNo; nameEdit.Text = slaveSet.Name; memoEdit.Text = slaveSet.Memo; } ctrlPatternGrid.RefreshGrid(); if (slaveNo > 0) { slaveLedSet.Select(slaveNo); if (slaveLedSet.Empty == false) { for (int i = 0; i < slaveLedSet.RowCount; i++) { slaveLedSet.Fetch(i); int x = slaveLedSet.X; int y = slaveLedSet.Y; ctrlPatternGrid.PatternRows[y].Leds[x].RecNo = slaveLedSet.RecNo; ctrlPatternGrid.PatternRows[y].Leds[x].X = x; ctrlPatternGrid.PatternRows[y].Leds[x].Y = y; ctrlPatternGrid.PatternRows[y].Leds[x].StringIndex = slaveLedSet.StrNo; ctrlPatternGrid.PatternRows[y].Leds[x].LedIndex = slaveLedSet.LedNo; ctrlPatternGrid.PatternRows[y].Leds[x].TurnOn = slaveLedSet.TurnOn; ctrlPatternGrid.PatternRows[y].Leds[x].Measuring = slaveLedSet.Measuring; ctrlPatternGrid.PatternRows[y].Leds[x].Type = slaveLedSet.Type; } ctrlPatternGrid.RefreshGridData(); } } }
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); }