Exemplo n.º 1
0
        private void SetDataSetMode(EDataSetMode mode)
        {
            this.mode           = mode;
            viewStatePanel.Text = mode.ToString().ToUpper();

            switch (mode)
            {
            case EDataSetMode.View:
                ctrlParent.SetMenuEnabled(true);
                ctrlParent.SetButtonEnabled(false);
                viewStatePanel.BackColor = Color.Gray;
                SetEditReadOnly(true);
                break;

            case EDataSetMode.New:
                ctrlParent.SetMenuEnabled(false);
                ctrlParent.SetButtonEnabled(true);
                viewStatePanel.BackColor = Color.DeepSkyBlue;
                SetEditReadOnly(false);
                break;

            case EDataSetMode.Modify:
                ctrlParent.SetMenuEnabled(false);
                ctrlParent.SetButtonEnabled(true);
                viewStatePanel.BackColor = Color.DeepSkyBlue;
                SetEditReadOnly(false);
                break;
            }
        }
Exemplo n.º 2
0
        private void SetDataSetMode(EDataSetMode mode)
        {
            this.mode           = mode;
            viewStatePanel.Text = mode.ToString().ToUpper();

            switch (mode)
            {
            case EDataSetMode.View:
                saveButton.Enabled       = false;
                cancelButton.Enabled     = false;
                viewStatePanel.BackColor = Color.Gray;
                SetEditReadOnly(true);
                break;

            case EDataSetMode.New:
                saveButton.Enabled       = true;
                cancelButton.Enabled     = true;
                viewStatePanel.BackColor = Color.DeepSkyBlue;
                SetEditReadOnly(false);
                break;

            case EDataSetMode.Modify:
                saveButton.Enabled       = true;
                cancelButton.Enabled     = true;
                viewStatePanel.BackColor = Color.DeepSkyBlue;
                SetEditReadOnly(false);
                break;
            }
        }
Exemplo n.º 3
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.º 4
0
        private void SetEditData(EDataSetMode mode)
        {
            switch (mode)
            {
            case EDataSetMode.View:
            case EDataSetMode.Modify:
                SetEditFromDataSet();
                break;

            case EDataSetMode.New:
                ResetEdit();
                break;
            }
        }
Exemplo n.º 5
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();
        }
Exemplo n.º 6
0
        private void SetDataSetMode(EDataSetMode mode)
        {
            this.mode = mode;
            string strMode = mode.ToString().ToUpper();

            noteTitlePanel.Text     = $"NOTE({strMode})";
            thermoTitlePanel.Text   = $"THERMOCOUPLE({strMode})";
            pressureTitlePanel.Text = $"PRESSURE({strMode})";
            ratedTitlePanel.Text    = $"RATED CONDITION({strMode})";

            switch (mode)
            {
            case EDataSetMode.View:
                saveButton.Enabled           = false;
                cancelButton.Enabled         = false;
                noteTitlePanel.BackColor     = Color.Gray;
                thermoTitlePanel.BackColor   = Color.Gray;
                pressureTitlePanel.BackColor = Color.Gray;
                ratedTitlePanel.BackColor    = Color.Gray;
                SetEditReadOnly(true);
                break;

            case EDataSetMode.New:
                saveButton.Enabled           = true;
                cancelButton.Enabled         = true;
                noteTitlePanel.BackColor     = Color.DeepSkyBlue;
                thermoTitlePanel.BackColor   = Color.DeepSkyBlue;
                pressureTitlePanel.BackColor = Color.DeepSkyBlue;
                ratedTitlePanel.BackColor    = Color.DeepSkyBlue;
                SetEditReadOnly(false);
                break;

            case EDataSetMode.Modify:
                saveButton.Enabled           = true;
                cancelButton.Enabled         = true;
                noteTitlePanel.BackColor     = Color.DeepSkyBlue;
                thermoTitlePanel.BackColor   = Color.DeepSkyBlue;
                pressureTitlePanel.BackColor = Color.DeepSkyBlue;
                ratedTitlePanel.BackColor    = Color.DeepSkyBlue;
                SetEditReadOnly(false);
                break;
            }
        }
Exemplo n.º 7
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.º 8
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);
        }
Exemplo n.º 9
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);
        }
Exemplo n.º 10
0
        private void Initialize()
        {
            db       = Resource.ConfigDB;
            mode     = EDataSetMode.View;
            bookmark = new GridBookmark(scheduleGridView);

            viewEdits = new List <TextEdit>();
            viewEdits.Add(standardEdit);
            viewEdits.Add(nameEdit);
            viewEdits.Add(noSteadyEdit);
            viewEdits.Add(preparationEdit);
            viewEdits.Add(judgementEdit);
            viewEdits.Add(repeatEdit);

            id1Edits = new List <TextEdit>();
            id1Edits.Add(id1EdbSetupEdit);
            id1Edits.Add(id1EdbAvgEdit);
            id1Edits.Add(id1EdbDevEdit);
            id1Edits.Add(id1EwbSetupEdit);
            id1Edits.Add(id1EwbAvgEdit);
            id1Edits.Add(id1EwbDevEdit);
            id1Edits.Add(id1Ldb1DevEdit);
            id1Edits.Add(id1Lwb1DevEdit);
            id1Edits.Add(id1Airflow1DevEdit);
            id1Edits.Add(id1Ldb2DevEdit);
            id1Edits.Add(id1Lwb2DevEdit);
            id1Edits.Add(id1Airflow2DevEdit);
            id1Edits.Add(id1Cdp1SetupEdit);
            id1Edits.Add(id1Cdp1AvgEdit);
            id1Edits.Add(id1Cdp1DevEdit);
            id1Edits.Add(id1Cdp2SetupEdit);
            id1Edits.Add(id1Cdp2AvgEdit);
            id1Edits.Add(id1Cdp2DevEdit);

            id2Edits = new List <TextEdit>();
            id2Edits.Add(id2EdbSetupEdit);
            id2Edits.Add(id2EdbAvgEdit);
            id2Edits.Add(id2EdbDevEdit);
            id2Edits.Add(id2EwbSetupEdit);
            id2Edits.Add(id2EwbAvgEdit);
            id2Edits.Add(id2EwbDevEdit);
            id2Edits.Add(id2Ldb1DevEdit);
            id2Edits.Add(id2Lwb1DevEdit);
            id2Edits.Add(id2Airflow1DevEdit);
            id2Edits.Add(id2Ldb2DevEdit);
            id2Edits.Add(id2Lwb2DevEdit);
            id2Edits.Add(id2Airflow2DevEdit);
            id2Edits.Add(id2Cdp1SetupEdit);
            id2Edits.Add(id2Cdp1AvgEdit);
            id2Edits.Add(id2Cdp1DevEdit);
            id2Edits.Add(id2Cdp2SetupEdit);
            id2Edits.Add(id2Cdp2AvgEdit);
            id2Edits.Add(id2Cdp2DevEdit);

            odEdits = new List <TextEdit>();
            odEdits.Add(odEdbSetupEdit);
            odEdits.Add(odEdbAvgEdit);
            odEdits.Add(odEdbDevEdit);
            odEdits.Add(odEwbSetupEdit);
            odEdits.Add(odEwbAvgEdit);
            odEdits.Add(odEwbDevEdit);
            odEdits.Add(odEdpSetupEdit);
            odEdits.Add(odEdpAvgEdit);
            odEdits.Add(odEdpDevEdit);
            odEdits.Add(odVolt1SetupEdit);
            odEdits.Add(odVolt1AvgEdit);
            odEdits.Add(odVolt1DevEdit);
            odEdits.Add(odVolt2SetupEdit);
            odEdits.Add(odVolt2AvgEdit);
            odEdits.Add(odVolt2DevEdit);

            viewGrids = new List <AdvBandedGridView>();
            viewGrids.Add(indoor1GridView);
            viewGrids.Add(indoor2GridView);
            viewGrids.Add(outdoorGridView);

            chamberParams = new List <ChamberParams>();
            chamberParams.Add(new ChamberParams());

            indoor1Grid.DataSource = chamberParams;
            indoor2Grid.DataSource = chamberParams;
            outdoorGrid.DataSource = chamberParams;

            NameValue <EIndoorUse>[] inUseItems = EnumHelper.GetNameValues <EIndoorUse>();
            indoor1UseLookUp.DataSource    = inUseItems;
            indoor1UseLookUp.DisplayMember = "Name";
            indoor1UseLookUp.ValueMember   = "Value";
            indoor1UseLookUp.KeyMember     = "Value";
            indoor2UseLookUp.DataSource    = inUseItems;
            indoor2UseLookUp.DisplayMember = "Name";
            indoor2UseLookUp.ValueMember   = "Value";
            indoor2UseLookUp.KeyMember     = "Value";

            NameValue <EIndoorMode>[] modeItems = EnumHelper.GetNameValues <EIndoorMode>();
            indoor1ModeLookUp.DataSource    = modeItems;
            indoor1ModeLookUp.DisplayMember = "Name";
            indoor1ModeLookUp.ValueMember   = "Value";
            indoor1ModeLookUp.KeyMember     = "Value";
            indoor2ModeLookUp.DataSource    = modeItems;
            indoor2ModeLookUp.DisplayMember = "Name";
            indoor2ModeLookUp.ValueMember   = "Value";
            indoor2ModeLookUp.KeyMember     = "Value";

            NameValue <EIndoorDuct>[] ductItems = EnumHelper.GetNameValues <EIndoorDuct>();
            indoor1DuctLookUp.DataSource    = ductItems;
            indoor1DuctLookUp.DisplayMember = "Name";
            indoor1DuctLookUp.ValueMember   = "Value";
            indoor1DuctLookUp.KeyMember     = "Value";
            indoor2DuctLookUp.DataSource    = ductItems;
            indoor2DuctLookUp.DisplayMember = "Name";
            indoor2DuctLookUp.ValueMember   = "Value";
            indoor2DuctLookUp.KeyMember     = "Value";

            NameValue <EOutdoorUse>[] outUseItems = EnumHelper.GetNameValues <EOutdoorUse>();
            outdoorUseLookUp.DataSource    = outUseItems;
            outdoorUseLookUp.DisplayMember = "Name";
            outdoorUseLookUp.ValueMember   = "Value";
            outdoorUseLookUp.KeyMember     = "Value";

            NameValue <EEtcUse>[] etcUseItems = EnumHelper.GetNameValues <EEtcUse>();
            outdoorEtcUseLookUp.DataSource    = etcUseItems;
            outdoorEtcUseLookUp.DisplayMember = "Name";
            outdoorEtcUseLookUp.ValueMember   = "Value";
            outdoorEtcUseLookUp.KeyMember     = "Value";

            string format;
            string devFormat;

            foreach (TextEdit edit in id1Edits)
            {
                switch (int.Parse(((string)edit.Tag).ToString()))
                {
                // Temperature Edit
                case 0:
                    format    = Resource.Variables.Measured["ID11.Entering.DB"].Format;
                    devFormat = ToDevFormat(format);
                    break;

                // Air Flow Edit
                case 1:
                    format    = Resource.Variables.Calcurated["ID11.Air.Flow.Lev"].Format;
                    devFormat = ToDevFormat(format);
                    break;

                // Diff. Pressure Edit
                case 2:
                    format    = Resource.Variables.Measured["ID11.Nozzle.Diff.Pressure"].Format;
                    devFormat = ToDevFormat(format);
                    break;

                default:
                    format    = "0.0";
                    devFormat = "f1";
                    break;
                }

                edit.EditValue = 0f;
                edit.Properties.Mask.EditMask = devFormat;
                edit.Properties.DisplayFormat.FormatString = devFormat;
                edit.Properties.EditFormat.FormatString    = devFormat;
            }

            foreach (TextEdit edit in id2Edits)
            {
                switch (int.Parse(((string)edit.Tag).ToString()))
                {
                // Temperature Edit
                case 0:
                    format    = Resource.Variables.Measured["ID21.Entering.DB"].Format;
                    devFormat = ToDevFormat(format);
                    break;

                // Air Flow Edit
                case 1:
                    format    = Resource.Variables.Calcurated["ID21.Air.Flow.Lev"].Format;
                    devFormat = ToDevFormat(format);
                    break;

                // Diff. Pressure Edit
                case 2:
                    format    = Resource.Variables.Measured["ID21.Nozzle.Diff.Pressure"].Format;
                    devFormat = ToDevFormat(format);
                    break;

                default:
                    format    = "0.0";
                    devFormat = "f1";
                    break;
                }

                edit.EditValue = 0f;
                edit.Properties.Mask.EditMask = devFormat;
                edit.Properties.DisplayFormat.FormatString = devFormat;
                edit.Properties.EditFormat.FormatString    = devFormat;
            }

            foreach (TextEdit edit in odEdits)
            {
                switch (int.Parse(((string)edit.Tag).ToString()))
                {
                // Temperature Edit
                case 0:
                    format    = Resource.Variables.Measured["OD.Entering.DB"].Format;
                    devFormat = ToDevFormat(format);
                    break;

                // Air Flow Edit
                case 1:
                    format    = Resource.Variables.Calcurated["ID1.IDU.Voltage"].Format;
                    devFormat = ToDevFormat(format);
                    break;

                default:
                    format    = "0.0";
                    devFormat = "f1";
                    break;
                }

                edit.EditValue = 0f;
                edit.Properties.Mask.EditMask = devFormat;
                edit.Properties.DisplayFormat.FormatString = devFormat;
                edit.Properties.EditFormat.FormatString    = devFormat;
            }
        }
Exemplo n.º 11
0
        private void Initialize()
        {
            Color evenColor = Color.FromArgb(244, 244, 236);

            db       = Resource.ConfigDB;
            mode     = EDataSetMode.View;
            bookmark = new GridBookmark(conditionGridView);

            int length = Resource.Tag.ThermoLength / 3;

            id1TCs = new List <MeasureRow>();
            id2TCs = new List <MeasureRow>();
            odTCs  = new List <MeasureRow>();

            for (int i = 0; i < length; i++)
            {
                id1TCs.Add(new MeasureRow(null, "", "", i + 1));
                id2TCs.Add(new MeasureRow(null, "", "", i + length + 1));
                odTCs.Add(new MeasureRow(null, "", "", i + length * 2 + 1));
            }

            presses = new List <MeasureRow>();

            for (int i = 0; i < Resource.Tag.PressLength; i++)
            {
                presses.Add(new MeasureRow(null, "", "", i + 1));
            }

            thermo1Grid.DataSource = id1TCs;
            thermo1GridView.Appearance.EvenRow.BackColor        = evenColor;
            thermo1GridView.OptionsView.EnableAppearanceEvenRow = true;

            thermo2Grid.DataSource = id2TCs;
            thermo2GridView.Appearance.EvenRow.BackColor        = evenColor;
            thermo2GridView.OptionsView.EnableAppearanceEvenRow = true;

            thermo3Grid.DataSource = odTCs;
            thermo3GridView.Appearance.EvenRow.BackColor        = evenColor;
            thermo3GridView.OptionsView.EnableAppearanceEvenRow = true;

            thermoTagGrid.DataSource = Resource.Tag.Thermos;
            thermoTagGridView.Appearance.EvenRow.BackColor        = evenColor;
            thermoTagGridView.OptionsView.EnableAppearanceEvenRow = true;

            pressureGrid.DataSource = presses;
            pressureGridView.Appearance.EvenRow.BackColor        = evenColor;
            pressureGridView.OptionsView.EnableAppearanceEvenRow = true;

            pressureTagGrid.DataSource = Resource.Tag.Presses;
            pressureTagGridView.Appearance.EvenRow.BackColor        = evenColor;
            pressureTagGridView.OptionsView.EnableAppearanceEvenRow = true;

            methodCapaCoolingUnitCombo.DisplayMember = "Name";
            methodCapaCoolingUnitCombo.ValueMember   = "Value";
            methodCapaCoolingUnitCombo.DataSource    = EnumHelper.GetNameValues <EUnitCapacity>();

            methodCapaHeatingUnitCombo.DisplayMember = "Name";
            methodCapaHeatingUnitCombo.ValueMember   = "Value";
            methodCapaHeatingUnitCombo.DataSource    = EnumHelper.GetNameValues <EUnitCapacity>();

            foreach (TabPage page in ratedTab.TabPages)
            {
                EConditionRated index = (EConditionRated)int.Parse(page.Tag.ToString());
                CtrlTestRated   ctrl  = new CtrlTestRated(index, Resource.Variables.Graph);
                ctrl.CalcCapacity      += DoCalcCapacity;
                ctrl.ChangedPowerMeter += DoChangedPowerMeter;
                page.Controls.Add(ctrl);
            }

            noteEdits = new List <TextEdit>();
            noteEdits.Add(noteCompanyEdit);
            noteEdits.Add(noteTestNameEdit);
            noteEdits.Add(noteTestNoEdit);
            noteEdits.Add(noteObserverEdit);
            noteEdits.Add(noteMakerEdit);
            noteEdits.Add(noteModel1Edit);
            noteEdits.Add(noteSerial1Edit);
            noteEdits.Add(noteModel2Edit);
            noteEdits.Add(noteSerial2Edit);
            noteEdits.Add(noteModel3Edit);
            noteEdits.Add(noteSerial3Edit);
            noteEdits.Add(noteExpDeviceEdit);
            noteEdits.Add(noteRefChargeEdit);
            noteEdits.Add(noteMemoEdit);

            gridViews = new List <GridView>();
            gridViews.Add(thermo1GridView);
            gridViews.Add(thermo2GridView);
            gridViews.Add(thermo3GridView);
            gridViews.Add(thermoTagGridView);
            gridViews.Add(pressureGridView);
            gridViews.Add(pressureTagGridView);

            SetPanelActive(true);
        }