示例#1
0
 private void timer1_Tick(object sender, System.EventArgs e)
 {
     try
     {
         this.iTestTime++;
         KLineTestProcessor e2      = this.gLineTestProcessor;
         KParseRepCmd       sender2 = e2.mpDevComm.mParseCmd;
         if (sender2.selfTestProgress != 100)
         {
             int iProc = System.Convert.ToInt32((double)sender2.selfTestDataCount * 100.0 / ((double)(this.iEndValue - this.iStartValue) + 1.0));
             if (iProc >= 100)
             {
                 iProc = 99;
             }
             this.progressBar1.Value = iProc;
             this.showFunc();
         }
         else
         {
             e2.mbKeepRun               = false;
             this.timer1.Enabled        = false;
             this.progressBar1.Value    = this.gLineTestProcessor.mpDevComm.mParseCmd.selfTestProgress;
             this.textBox_ex_count.Text = System.Convert.ToString(this.gLineTestProcessor.mpDevComm.mParseCmd.selfTestExPointCount);
             this.showFunc();
             this.StopRunDisposeFunc();
         }
     }
     catch (System.Exception arg_E3_0)
     {
         this.StopRunDisposeFunc();
         KLineTestProcessor.ExceptionRecordFunc(arg_E3_0.StackTrace);
     }
 }
示例#2
0
 public unsafe KTestDevComm()
 {
     this.mParseCmd           = new KParseRepCmd();
     this.mPostBuf            = new byte[8];
     this.mTestCmdMapBuf      = new TestCmdMap[65536];
     this.mUpdataCmdArray     = new System.Collections.Generic.List <TestCmdMap>(65536);
     this.mUpCmdBuf           = new CanCmdEx[65536];
     this.iEMSetTestDataIndex = 0;
     this.cannum             = 1u;
     this.mnState            = 0;
     this.mnCommState        = 0;
     this.mnRecvBufSize      = 1048576;
     this.mpRecvBuf          = new byte[1048576];
     this.mnRecvDataLen      = 0;
     this.mhRecvThreadFlag   = false;
     this.mbKeepRun          = false;
     this.mUpCmdCount        = 0;
     this.mnDownCmdCount     = 0;
     this.mnRepCmdCount      = 0;
     this.mnTotalRepCmdCount = 0;
     this.mbUpLoadFinish     = false;
     this.callocNum          = 1u;
     this.callocSize         = 16u;
     try
     {
         this.init_config = < Module >.calloc(1u, 16u);
     }
     catch (System.Exception ex_DB)
     {
         try
         {
             this.init_config = < Module >.malloc(16u);
         }
         catch (System.Exception ex2_ED)
         {
             try
             {
                 _VCI_INIT_CONFIG *this2 = < Module >.@new(16u);
                 _VCI_INIT_CONFIG *ptr;
                 if (this2 != null)
                 {
                     initblk(this2, 0, 16);
                     ptr = this2;
                 }
                 else
                 {
                     ptr = null;
                 }
                 this.init_config = ptr;
             }
             catch (System.Exception ex3_114)
             {
             }
         }
     }
 }