Exemple #1
0
        private void StatusChangeMonitor(object source, FootpedalEventArgs statuschange)
        {
            FootpedalStatus newStatus = statuschange.Status;

            if (newStatus.IsLeftDown != _status.IsLeftDown)
            {
            }
        }
Exemple #2
0
        private async void DevicePoller_DeviceInitialized(object sender, DeviceEventArgs e)
        {
            _rs28Device = (IHidDevice)e.Device;
            try
            {
                while (true)
                {
                    FootpedalStatus status = await ReadStatusAsync();

                    StatusChanged?.Invoke(this, new FootpedalEventArgs(status));
                }
            }
            catch (Exception)
            {
                /* Probably due to device being uplugged */
            }
        }
 public FootpedalEventArgs(FootpedalStatus status)
 {
     Status = status;
 }