예제 #1
0
    public OWWatch1(DSPortAdapter adapter)
    {
        // create the watcher with this adapter
        dm = new DeviceMonitor(adapter);

        // add this to the event listers
        try
        {
            dm.addDeviceMonitorEventListener(this);
        }
        catch (Exception)
        {
        }

        // start the monitor
        var t = Task.Run(() =>
        {
            dm.run();
        });
    }