Exemple #1
0
        public KWPTestForm()
        {
            InitializeComponent();
            serialPort.ReadTimeout  = 50;// SerialPort.InfiniteTimeout;
            serialPort.WriteTimeout = 50;
            uiContext        = SynchronizationContext.Current;
            ecuSN.Text       = DataHelper.ByteArrayToStr(keyBuffer, keyBuffer.Length);
            oltDiagParams    = new OltDiagParams();
            commonDiagParams = new CommonDiagParams();
            oltDiagForm      = new OltDiagForm(oltDiagParams);
            commonDiagForm   = new CommonDiagForm(commonDiagParams);

            random = new Random((int)DateTime.Now.Ticks);

            InitKeyHashBuffer();
            CalcSNHash();

            InitUserProtocol();

            portNumber.Items.AddRange(SerialPort.GetPortNames());
        }
 public CommonDiagForm(CommonDiagParams commonDiagParams)
 {
     this.commonDiagParams = commonDiagParams;
     InitializeComponent();
 }