コード例 #1
0
        private void RefreshRank()
        {
            if (recipeCombo.SelectedIndex < 0)
            {
                return;
            }

            DataRow row = ((DataTable)recipeCombo.DataSource).Rows[recipeCombo.SelectedIndex];

            recipeSet.Fetch(row);

            recipeNo = recipeSet.RecNo;

            bookmark.Get();
            rankSet.Select(recipeNo);

            if (rankSet.Empty == true)
            {
                rankGrid.DataSource = null;
                SetEditValueFromDataSet();
                SetEditReadOnly(true);
            }
            else
            {
                rankGrid.DataSource = rankSet.DataSet.Tables[0];
            }

            bookmark.Goto();
            rankGrid.Focus();
        }
コード例 #2
0
        private void RefreshPattern()
        {
            if (recipeCombo.SelectedIndex < 0)
            {
                masterNo = 0;
                return;
            }

            DataRow row = ((DataTable)recipeCombo.DataSource).Rows[recipeCombo.SelectedIndex];

            recipeSet.Fetch(row);

            recipeNo = recipeSet.RecNo;
            RefreshStringToSmus();

            masterSet.Select(recipeNo);
            masterSet.Fetch();
            masterNo = masterSet.RecNo;

            xLengthEdit.EditValue     = masterSet.XLength;
            yHeightEdit.EditValue     = masterSet.YHeight;
            stringCountEdit.EditValue = masterSet.StrCount;
            ledCountEdit.EditValue    = masterSet.LedCount;

            ctrlPatternGrid.XLength     = masterSet.XLength;
            ctrlPatternGrid.YHeight     = masterSet.YHeight;
            ctrlPatternGrid.StringCount = masterSet.StrCount;
            ctrlPatternGrid.LedCount    = masterSet.LedCount;

            bookmark.Get();
            slaveSet.Select(masterNo);

            if (slaveSet.Empty == true)
            {
                patternGrid.DataSource = null;
                SetEditValueFromDataSet();
                SetEditReadOnly(true);
            }
            else
            {
                patternGrid.DataSource = slaveSet.DataSet.Tables[0];
            }

            bookmark.Goto();
            patternGrid.Focus();
        }
コード例 #3
0
        private void findButton_Click(object sender, EventArgs e)
        {
            if (mode != EDataSetMode.View)
            {
                return;
            }

            bookmark.Get();

            if (string.IsNullOrWhiteSpace(findNameEdit.Text) == true)
            {
                recipeSet.Select();
            }
            else
            {
                recipeSet.Select(findNameEdit.Text.Trim());
            }

            bookmark.Goto();
            recipeGrid.Focus();
        }