Exemplo n.º 1
0
        /// <summary>
        /// IL归零
        /// </summary>
        private void Test1Action()
        {
            if (IsStop)
            {
                return;
            }
            var items        = TestItems.Where(q => q.TestTypeID == TestTypes[1]).ToList();
            var lastPort     = -1;
            var lastTestType = Guid.Empty;

            if (items.Count < 1)
            {
                return;
            }

            if (!MeasurementJob.SpecData.WorkInfoSpecItems.Any(q => MeasurementJob.SpecData.GetTestGroup(q.TestGroupID).TestGroupTestType == "Point") &&
                MeasurementJob.SpecData.WorkInfoSpecItems.Any(q => MeasurementJob.SpecData.GetTestGroup(q.TestGroupID).TestGroupTestType == "PointPDL"))
            {
                pdlReferces = true;
            }

            foreach (var item in items)
            {
                if (IsStop)
                {
                    return;
                }
                testResultCallback(item.ItemID, "正在测试", item.LastValueString, 3);

                var wl = item.Wavelenght;
                var ch = item.Channel;
                UpdateTestInfo(wl, ch);

                if (lastPort != item.Channel)
                {
                    var result = ShowMessage(
                        0,
                        $"请将光源连接到 功率计通道{item.Channel},开始获取归零值");
                    if (result != 1)
                    {
                        return;
                    }
                }

                lastPort     = item.Channel;
                lastTestType = item.TestTypeID;
                TestItem(item);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 回损归零
        /// </summary>
        private void Test2Action()
        {
            if (IsStop)
            {
                return;
            }

            var items = TestItems.Where(q => q.TestTypeID == TestTypes[2]).ToList();

            var lastTestType = Guid.Empty;

            foreach (var item in items)
            {
                if (IsStop)
                {
                    return;
                }
                testResultCallback(item.ItemID, "正在测试", item.LastValueString, 3);

                var wl = item.Wavelenght;
                var ch = 1;
                UpdateTestInfo(wl, ch);

                if (lastTestType == Guid.Empty)
                {
                    var result = ShowMessage(
                        0,
                        $"请将回损探头连接到功率计通道{item.Channel},并打折光源线,开始获取系统回损");
                    if (result != 1)
                    {
                        return;
                    }
                }

                lastTestType = item.TestTypeID;
                TestItem(item);
            }
        }