Exemplo n.º 1
0
        public PatternObject(Int64 slaveNo)
        {
            xyLeds      = new Dictionary <string, PatternLedObject>();
            strLeds     = new Dictionary <string, PatternLedObject>();
            slaveLedSet = new SlavePatternLedDataSet(AppRes.DB.Connect, null, null);

            Load(slaveNo);
        }
Exemplo 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";
        }
Exemplo n.º 3
0
        private void Initialize()
        {
            masterSet   = new MasterPatternDataSet(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>();
            RefreshStringToSmus();
            DispSmuColorButtons();

            ctrlPatternGrid = new CtrlPatternGrid(EPatternDispMode.StringAndLamp, stringToSmus);
            patternGridPanel.Controls.Add(ctrlPatternGrid);
        }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
0
        private void UpdateSlavePatternLed(FbTransaction trans, SlavePatternLedDataSet set, Int64 slaveNo)
        {
            int height = ctrlPatternGrid.YHeight;
            int length = ctrlPatternGrid.XLength;

            for (int i = 0; i < height; i++)
            {
                for (int j = 0; j < length; j++)
                {
                    set.RecNo          = ctrlPatternGrid.PatternRows[i].Leds[j].RecNo;
                    set.SlavePatternNo = slaveNo;
                    set.X         = ctrlPatternGrid.PatternRows[i].Leds[j].X;
                    set.Y         = ctrlPatternGrid.PatternRows[i].Leds[j].Y;
                    set.StrNo     = ctrlPatternGrid.PatternRows[i].Leds[j].StringIndex;
                    set.LedNo     = ctrlPatternGrid.PatternRows[i].Leds[j].LedIndex;
                    set.TurnOn    = ctrlPatternGrid.PatternRows[i].Leds[j].TurnOn;
                    set.Measuring = ctrlPatternGrid.PatternRows[i].Leds[j].Measuring;
                    set.Type      = ctrlPatternGrid.PatternRows[i].Leds[j].Type;
                    set.Update(trans);
                }
            }
        }
Exemplo n.º 6
0
        private void InsertSlavePatternLed(FbTransaction trans, SlavePatternLedDataSet set, Int64 slaveNo)
        {
            int height = ctrlPatternGrid.YHeight;
            int length = ctrlPatternGrid.XLength;

            for (int i = 0; i < height; i++)
            {
                for (int j = 0; j < length; j++)
                {
                    set.RecNo          = AppRes.DB.GetGenNo("GN_SLAVEPATTERN_LED");
                    set.SlavePatternNo = slaveNo;
                    set.X         = ctrlPatternGrid.PatternRows[i].Leds[j].X;
                    set.Y         = ctrlPatternGrid.PatternRows[i].Leds[j].Y;
                    set.StrNo     = ctrlPatternGrid.PatternRows[i].Leds[j].StringIndex;
                    set.LedNo     = ctrlPatternGrid.PatternRows[i].Leds[j].LedIndex;
                    set.TurnOn    = ctrlPatternGrid.PatternRows[i].Leds[j].TurnOn;
                    set.Measuring = ctrlPatternGrid.PatternRows[i].Leds[j].Measuring;
                    set.Type      = ctrlPatternGrid.PatternRows[i].Leds[j].Type;
                    set.Insert(trans);
                }
            }
        }