Beispiel #1
0
        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()
        {
            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);
        }