Ejemplo n.º 1
0
 public RecipeList()
 {
     keys      = new Dictionary <Int64, RecipeObject>();
     names     = new Dictionary <string, RecipeObject>();
     recipeSet = new RecipeDataSet(AppRes.DB.Connect, null, null);
     Load();
 }
Ejemplo n.º 2
0
        private void Initialize()
        {
            recipeNo = 0;

            recipeSet    = new RecipeDataSet(AppRes.DB.Connect, null, null);
            masterSet    = new MasterPatternDataSet(AppRes.DB.Connect, null, null);
            masterLedSet = new MasterPatternLedDataSet(AppRes.DB.Connect, null, null);
            slaveSet     = new SlavePatternDataSet(AppRes.DB.Connect, null, null);
            slaveLedSet  = new SlavePatternLedDataSet(AppRes.DB.Connect, null, null);
            smuSet       = new SmuDataSet(AppRes.DB.Connect, null, null);
            binSet       = new BinDataSet(AppRes.DB.Connect, null, null);

            mode     = EDataSetMode.View;
            bookmark = new GridBookmark(recipeGridView);

            stringToSmus = new List <int>();
            stringRows   = new List <StringRow>();

            ctrlPatternGrid             = new CtrlPatternGrid(EPatternDispMode.String, stringToSmus);
            ctrlPatternGrid.XLength     = (int)xLengthEdit.Value;
            ctrlPatternGrid.YHeight     = (int)yHeightEdit.Value;
            ctrlPatternGrid.StringCount = (int)stringCountEdit.Value;
            ctrlPatternGrid.LedCount    = (int)ledCountEdit.Value;

            patternGridPanel.Controls.Add(ctrlPatternGrid);

            smuGrid.DataSource = stringRows;

            smuGridView.BeginUpdate();
            try
            {
                smuGridView.Columns.Clear();
                smuGridView.Columns.Add(CreateGridColumn(" ", "StringNo", 64));

                for (int i = 0; i < 20; i++)
                {
                    smuGridView.Columns.Add(CreateGridColumn($"SMU{i + 1}", $"SMU{i + 1}", 64, true, true));
                }
            }
            finally
            {
                smuGridView.EndUpdate();
            }

            binRows = new List <RecipeBinRow>();

            for (int i = 0; i < AppRes.Properties.BinCount; i++)
            {
                RecipeBinRow row = new RecipeBinRow();
                row.Clear(i + 1);
                binRows.Add(row);
            }

            binTypeLookUpEdit.DataSource    = EnumHelper.GetNameValues <EBinType>();
            binTypeLookUpEdit.DisplayMember = "Name";
            binTypeLookUpEdit.ValueMember   = "Value";
            binTypeLookUpEdit.KeyMember     = "Value";
        }
Ejemplo n.º 3
0
        private void Initialize()
        {
            Result    = new DialogSelectedItem();
            recipeSet = new RecipeDataSet(AppRes.DB.Connect, null, null);

            recipeSet.Select();
            recipeGrid.DataSource = recipeSet.DataSet.Tables[0];
            recipeGridView.Appearance.EvenRow.BackColor        = Color.FromArgb(244, 244, 236);
            recipeGridView.OptionsView.EnableAppearanceEvenRow = true;
        }
Ejemplo n.º 4
0
 private void UpdateRecipe(FbTransaction trans, RecipeDataSet set)
 {
     set.Name   = nameEdit.Text.Trim();
     set.Memo   = memoEdit.Text;
     set.ST1_X  = double.Parse(st1XEdit.Text);
     set.ST1_Y  = double.Parse(st1YEdit.Text);
     set.ST1_QR = st1QREdit.Text.Trim();
     set.ST2_X  = double.Parse(st2XEdit.Text);
     set.ST2_Y  = double.Parse(st2YEdit.Text);
     set.ST2_QR = st2QREdit.Text.Trim();
     set.Update(trans);
 }
Ejemplo n.º 5
0
        public RecipeObject()
        {
            RecNo = 0;
            Code  = "";
            Memo  = "";

            Pattern = null;
            Rank    = null;
            Work    = null;
            Bin     = null;

            recipeSet = new RecipeDataSet(AppRes.DB.Connect, null, null);
        }
Ejemplo n.º 6
0
 private void InsertRecipe(FbTransaction trans, RecipeDataSet set, Int64 recNo)
 {
     set.RecNo  = recNo;
     set.Name   = nameEdit.Text.Trim();
     set.Memo   = memoEdit.Text;
     set.ST1_X  = double.Parse(st1XEdit.Text);
     set.ST1_Y  = double.Parse(st1YEdit.Text);
     set.ST1_QR = st1QREdit.Text.Trim();
     set.ST2_X  = double.Parse(st2XEdit.Text);
     set.ST2_Y  = double.Parse(st2YEdit.Text);
     set.ST2_QR = st2QREdit.Text.Trim();
     set.Insert(trans);
 }
Ejemplo n.º 7
0
        private void btn_Next_Click(object sender, EventArgs e)
        {
            RecipeDataSet ds = new RecipeDataSet();

            DataRow row = ds.Tables["recipeTable"].NewRow();

            row["recipeName"]        = txt_RecipeName.Text;
            row["recipeCategory"]    = cmb_Category.Text;
            row["recipeDescription"] = txt_Description.Text;
            ds.RecipeTable.Rows.Add(row);

            AddIngredientsForm addIngredientsForm = new AddIngredientsForm(row["recipeID"].ToString(), txt_RecipeName.Text);

            this.Hide();
            addIngredientsForm.ShowDialog();
            this.Close();
        }
Ejemplo n.º 8
0
        private void Initialize()
        {
            recipeSet  = new RecipeDataSet(AppRes.DB.Connect, null, null);
            rankSet    = new RankDataSet(AppRes.DB.Connect, null, null);
            rankRowSet = new RankRowDataSet(AppRes.DB.Connect, null, null);

            rankRows = new List <TestRankRow>();

            mode     = EDataSetMode.View;
            bookmark = new GridBookmark(rankGridView);

            NameValue <EReportItemCode>[] itemCodes = EnumHelper.GetNameValues <EReportItemCode>();
            itemCodeCombo.DataSource    = itemCodes;
            itemCodeCombo.DisplayMember = "Name";
            itemCodeCombo.ValueMember   = "Value";

            LoadRecipeComboItems();
        }
Ejemplo n.º 9
0
        private void Initialize()
        {
            recipeSet    = new RecipeDataSet(AppRes.DB.Connect, null, null);
            masterSet    = new MasterPatternDataSet(AppRes.DB.Connect, null, null);
            masterLedSet = new MasterPatternLedDataSet(AppRes.DB.Connect, null, null);
            slaveSet     = new SlavePatternDataSet(AppRes.DB.Connect, null, null);
            slaveLedSet  = new SlavePatternLedDataSet(AppRes.DB.Connect, null, null);
            smuSet       = new SmuDataSet(AppRes.DB.Connect, null, null);

            stringToSmus = new List <int>();

            mode     = EDataSetMode.View;
            bookmark = new GridBookmark(patternGridView);

            ctrlPatternGrid = new CtrlPatternGrid(EPatternDispMode.StringAndLamp, stringToSmus);
            patternGridPanel.Controls.Add(ctrlPatternGrid);

            DispSmuColorButtons();
            LoadRecipeComboItems();
        }
Ejemplo n.º 10
0
        private void findButton_Click(object sender, EventArgs e)
        {
            if (mode != EDataSetMode.View)
            {
                return;
            }

            RecipeDataSet set = recipeSet;

            bookmark.Get();

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

            bookmark.Goto();
            recipeGrid.Focus();
        }
Ejemplo n.º 11
0
        private void Initialize()
        {
            CtrlTestWorkGrid   ctrlTestWork;
            CtrlReportWorkGrid ctrlReportWork;

            recipeNo = 0;

            mode     = EDataSetMode.View;
            bookmark = new GridBookmark(recipeGridView);

            ctrlTestWork = new CtrlTestWorkGrid();
            testProcPanel.Controls.Add(ctrlTestWork);

            ctrlReportWork          = new CtrlReportWorkGrid();
            ctrlReportWork.TestRows = ctrlTestWork.Rows;
            reportProcPanel.Controls.Add(ctrlReportWork);

            recipeSet     = new RecipeDataSet(AppRes.DB.Connect, null, null);
            slaveSet      = new SlavePatternDataSet(AppRes.DB.Connect, null, null);
            testWorkSet   = new TestWorkDataSet(AppRes.DB.Connect, null, null);
            reportWorkSet = new ReportWorkDataSet(AppRes.DB.Connect, null, null);
            rankSet       = new RankDataSet(AppRes.DB.Connect, null, null);
            smuSet        = new SmuDataSet(AppRes.DB.Connect, null, null);
        }
Ejemplo n.º 12
0
        private void Initialize()
        {
            recipeSet     = new RecipeDataSet(AppRes.DB.Connect, null, null);
            binSet        = new BinDataSet(AppRes.DB.Connect, null, null);
            binFormulaSet = new BinFormulaDataSet(AppRes.DB.Connect, null, null);

            mode     = EDataSetMode.View;
            bookmark = new GridBookmark(recipeGridView);

            binRows = new List <BinRow>();

            BinRow row;

            for (int i = 0; i < AppRes.Properties.BinCount; i++)
            {
                row = new BinRow();
                binRows.Add(row);
            }

            binGrid          = new CtrlBinGrid(binRows);
            binGrid.RecipeNo = 0;
            binGrid.Type     = EWorkType.Normal;
            binGridPanel.Controls.Add(binGrid);
        }