public UsbTinModel()
        {
            AppDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

            logFilePath = System.IO.Path.Combine(AppDir, "Log.Log");

            USBTinLib        = new CsharpUSBTinLib.UsbTin();
            Th_SearchDevices = new Thread(ThD_SearchDevices);
            Th_SearchDevices.IsBackground = true;
            Th_SearchDevices.Start();

            //register events
            USBTinLib.MessageEvent    += USBTinLib_MessageEvent;
            USBTinLib.CANMessageEvent += USBTinLib_CANMessageEvent;
        }
        public UsbTinModel()
        {
            
            AppDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

            logFilePath = System.IO.Path.Combine(AppDir, "Log.Log");

            USBTinLib = new CsharpUSBTinLib.UsbTin();
            Th_SearchDevices = new Thread(ThD_SearchDevices);
            Th_SearchDevices.IsBackground = true;
            Th_SearchDevices.Start();

            //register events
            USBTinLib.MessageEvent += USBTinLib_MessageEvent;
            USBTinLib.CANMessageEvent += USBTinLib_CANMessageEvent;

           
            
        }