Ejemplo n.º 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());
        }
Ejemplo n.º 2
0
 public OltDiagForm(OltDiagParams diagParams)
 {
     this.diagParams = diagParams;
     InitializeComponent();
 }