예제 #1
0
        /// <summary>
        /// 循环检测测试线程状态并循环开启测试线程
        /// </summary>
        public void CheckProductionTestState(object labelImeiIn)
        {
            //秒表伴随测试线程
            stopwatch.ReStart();
            flow.StartTimeoutTimer();

            string labelImei = labelImeiIn as string;

            HttpAllCheck httpImeiSnDecorrelation = new HttpAllCheck();

            //Test
            //int ret = httpImeiSnDecorrelation.DataGetAndAnalysis("PLANTEST", "898602C99916C0362528", "864867040002025", "CH04027410010001", "898602C99916C0362528");
            //frmMain.ClearUILastTestState();
            //循环检测模块上电
            frmMain.DisplayLog("正在检测模块上电,请插入模块...\r\n");
            flow.CheckModulePowerOn();

            //开始测试
            flow.TestTaskMain(labelImei);
            flow.StopTimeOutTimer();
            stopwatch.Stop();
            frmMain.SetTextBoxReadOnly(AllForms.EnumControlWidget.txtLabelImei.ToString(), false);

            ////循环检测模块掉电
            //frmMain.DisplayLog("正在检测模块掉电,请拔下模块...\r\n");
            //flow.CheckModulePowerOff();
            //frmMain.DisplayLog("模块已拔出\r\n");
            //frmMain.ClearUILastTestState();
        }
예제 #2
0
        public void RunSolution()
        {
            ChangeMade = false;

            Counter++;
            MyStopwatch.Start();
            List <Cell> resultCells = FindApplicableCells();

            if (ApplyAlgorithmOnCells(resultCells))
            {
                ChangeMade = true;
                ApplyRippleEffects(resultCells);
            }
            MyStopwatch.Stop();
        }
예제 #3
0
        public async void CheckUrl(string url)
        {
            ProccessIsStart = false;
            MyStopwatch.Restart();
            WebRequest  webRequest = WebRequest.Create(url);
            WebResponse response   = await webRequest.GetResponseAsync();

            using (StreamReader reader = new StreamReader(response.GetResponseStream()))
            {
                string sizeOfCharters = await reader.ReadToEndAsync();

                UrlSize = $"Size of Your Size Is: {sizeOfCharters.Length.ToString()} Bytes.";
            }
            ProccessIsStart = true;
            MyStopwatch.Stop();
        }