コード例 #1
0
ファイル: Form1.cs プロジェクト: ChrisPea/TuningSuites
 private void Form1_Shown(object sender, EventArgs e)
 {
     try
     {
         canUsbDevice = new CANUSBDevice();
         canUsbDevice.UseOnlyPBus = true;
         kwpCanDevice = new KWPCANDevice();
         kwpCanDevice.setCANDevice(canUsbDevice);
         KWPHandler.setKWPDevice(kwpCanDevice);
         if (KWPHandler.getInstance().openDevice())
         {
             string m_swversion = string.Empty;
             KWPHandler.getInstance().getSwVersionFromDR51(out m_swversion);
             Console.WriteLine("SW: " + m_swversion);
         }
         KWPHandler.getInstance().closeDevice();
     }
     catch (Exception E)
     {
         Console.WriteLine(E.Message);
     }
     Environment.Exit(0);
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: ChrisPea/TuningSuites
 private void Form1_Shown(object sender, EventArgs e)
 {
     try
     {
         canUsbDevice             = new CANUSBDevice();
         canUsbDevice.UseOnlyPBus = true;
         kwpCanDevice             = new KWPCANDevice();
         kwpCanDevice.setCANDevice(canUsbDevice);
         KWPHandler.setKWPDevice(kwpCanDevice);
         if (KWPHandler.getInstance().openDevice())
         {
             string m_swversion = string.Empty;
             KWPHandler.getInstance().getSwVersionFromDR51(out m_swversion);
             Console.WriteLine("SW: " + m_swversion);
         }
         KWPHandler.getInstance().closeDevice();
     }
     catch (Exception E)
     {
         Console.WriteLine(E.Message);
     }
     Environment.Exit(0);
 }