public MainWindow()
        {
            InitializeComponent();
            ControlGrouping();
            Core = new MainCore()
                   .Act(core =>
            {
                core.evtIntenAvg         += new TrsInt(DisplayIntenAvg);
                core.evtAreaAvg          += new TrsInt(DisplayAreaAvg);
                core.evtProcessingDone   += new TrsBool(DisplayProcessingResult);
                core.evtProcessingResult += new Trsvoid(() =>
                {
                    this.BeginInvoke(() =>
                    {
                        lblTotalChip.Content   = core.PResult.ChipTotalCount;
                        lblPassChipnum.Content = core.PResult.ChipPassCount;
                        lblLowChipnum.Content  = core.PResult.ChipLowCount;
                        lblOverChipnum.Content = core.PResult.ChipOverCount;
                        lblFailChipnum.Content = core.PResult.ChipNOPLCount;
                    });
                });
            })
                   .Act(core => InitDisplay(core)); //dependancy

            InitCoreEpi();
            RegisterZoomGrid(gridepiIdx, ZoomClickBtn, ZoomClickBtnMethod);
        }
        void InitDisplay(MainCore core)
        {
            nudCWNum.Value           = 192;
            nudCHNum.Value           = 64;
            nudThresh.Value          = 40;
            nudAreaUpLimit.Value     = 1500;
            nudAreaDWLimit.Value     = 10;
            nudIntenSumUPLimit.Value = 80000;
            nudIntenSumDWLimit.Value = 23000;
            nudboxSizeH.Value        = 30;
            nudboxSizeW.Value        = 30;
            nudThickness.Value       = 1;

            nudCropRatio.Value    = 45;
            nudCropRatioAdv.Value = 5;
            var sampleType2Idx = new Dictionary <string, SampleType>();

            sampleType2Idx.Add("1. 1B6RB", SampleType._1B6R);
            sampleType2Idx.Add("2. A (not suppported)", SampleType._A);
            sampleType2Idx.Add("3. B", SampleType._B);
            sampleType2Idx.Add("4. C", SampleType._C);
            sampleType2Idx.Add("5. D", SampleType._D);
            sampleType2Idx.Add("6. BlueLD", SampleType._BlueLD);
            sampleType2Idx.Add("7. FullEsted", SampleType.Fullested);
            sampleType2Idx.Add("8. Lumence_0620", SampleType.Lumence_0620);
            sampleType2Idx.Add("8. Lumence_0620_2mm", SampleType.Lumence_0620_2mm);
            sampleType2Idx.Select((s, ix) => Tuple.Create(ix, s)); // like List<tuple>

            core.SampleTypeList        = sampleType2Idx;
            cbSampleMethod.ItemsSource = sampleType2Idx.Select((v) => v.Key).ToList();

            //nudEpiYoffset.Value  = 25000;
            //nudEpiX1Offset.Value = 16666;
            //nudEpiX2Offset.Value = 33332;

            //nudEpiYoffset.Value = 15000;
            //nudEpiX1Offset.Value = 10000;
            //nudEpiX2Offset.Value = 20000;

            nudEpiYoffset.Value  = 13100;
            nudEpiX1Offset.Value = 8700;
            nudEpiX2Offset.Value = 17400;
        }
Beispiel #3
0
        void InitDisplay(MainCore core)
        {
            nudCWNum.Value           = 120;
            nudCHNum.Value           = 120;
            nudThresh.Value          = 91;
            nudAreaUpLimit.Value     = 250;
            nudAreaDWLimit.Value     = 5;
            nudIntenSumUPLimit.Value = 20000;
            nudIntenSumDWLimit.Value = 5000;
            nudboxSizeH.Value        = 100;
            nudboxSizeW.Value        = 100;
            nudThickness.Value       = 1;

            nudCropRatio.Value    = 100;
            nudCropRatioAdv.Value = 5;

            nudTol.Value = 3;

            ckbEst4Pos_Rumbus.IsChecked = true;
            ckbUseEl.IsChecked          = true;
            ckbGridStyle.IsChecked      = true;

            var sampleType2Idx = new Dictionary <string, SampleType>();

            sampleType2Idx.Add("0. Thres", SampleType.Thres);
            sampleType2Idx.Add("1. AdpThres", SampleType.AdpThres);
            sampleType2Idx.Add("2. A (not suppported)", SampleType._A);
            sampleType2Idx.Add("3. B", SampleType._B);
            sampleType2Idx.Add("4. C", SampleType._C);
            sampleType2Idx.Add("5. D", SampleType._D);
            sampleType2Idx.Add("6. BlueLD", SampleType._BlueLD);
            sampleType2Idx.Add("7. FullEsted", SampleType.Fullested);
            sampleType2Idx.Add("8. Lumence_0620", SampleType.Lumence_0620);
            sampleType2Idx.Add("8. Lumence_0620_2mm", SampleType.Lumence_0620_2mm);
            sampleType2Idx.Add("9. AOTCW", SampleType.AOTCW);
            sampleType2Idx.Add("10. AOTTB", SampleType.AOTTB);
            sampleType2Idx.Add("11. Epistar", SampleType.Epistar);
            sampleType2Idx.Add("12. LumenMapFront", SampleType.LumenMapFront);
            sampleType2Idx.Add("13. LumenMapBack", SampleType.LumenMapBack);
            sampleType2Idx.Add("14. LumenLineFront", SampleType.LumenLineFront);
            sampleType2Idx.Add("15. LumenLineBack", SampleType.LumenLineBack);
            sampleType2Idx.Add("16. Gaung2", SampleType.Guang2);
            sampleType2Idx.Add("17. Gaung2Scatter", SampleType.Guang2Scatter);
            sampleType2Idx.Add("18. Gaung2Mapping", SampleType.Guang2Mapping);
            sampleType2Idx.Add("19. Gaung2MappingSC", SampleType.Guang2MappingSC);
            sampleType2Idx.Add("20. SSDisplay1RGBSample", SampleType.SSDisplay1RGBSample);
            sampleType2Idx.Add("21. PlaynittideB1", SampleType.PlaynittideB1);
            sampleType2Idx.Add("22. PlaynittideB2", SampleType.PlaynittideB2);
            sampleType2Idx.Add("23. PlaynittideG1", SampleType.PlaynittideG1);
            sampleType2Idx.Select((s, ix) => Tuple.Create(ix, s));             // like List<tuple>

            core.SampleTypeList          = sampleType2Idx;
            cbSampleMethod.ItemsSource   = sampleType2Idx.Select((v) => v.Key).ToList();
            cbSampleMethod.SelectedIndex = 1;

            //nudEpiYoffset.Value  = 25000;
            //nudEpiX1Offset.Value = 16666;
            //nudEpiX2Offset.Value = 33332;

            //nudEpiYoffset.Value = 15000;
            //nudEpiX1Offset.Value = 10000;
            //nudEpiX2Offset.Value = 20000;

            nudEpiYoffset.Value  = 7499;
            nudEpiX1Offset.Value = 5000;
            nudEpiX2Offset.Value = 10000;

            nudEpiResolution.Value  = 10;
            nudEdgeOffset.Value     = 300;
            nudEpiAreaUpLimit.Value = 100000;
            nudEpiAreaDwLimit.Value = 4;
        }