Exemple #1
0
        private void SelectConverterForTablet(TabletState tablet)
        {
            tabletState = tablet;

            var vendorId = tabletState?.Digitizer?.VendorID;

            if (vendorId != null)
            {
                var vendor = (DeviceVendor)vendorId;
                converterList.Select(t => t.Vendor.HasFlag(vendor));
                applyButton.Enabled = true;
            }
            else
            {
                // Deselect if no tablet is detected
                converterList.SelectedIndex = -1;
            }
        }
Exemple #2
0
        private void Select(TabletReference tablet)
        {
            if (tablet.Identifiers?.FirstOrDefault()?.VendorID is int vendorId)
            {
                var vendor = (DeviceVendor)vendorId;
                converterList.Select(t => t.Vendor.HasFlag(vendor));
                applyButton.Enabled = true;
                selectedTablet      = tablet;
            }
            else
            {
                // Deselect if no tablet is detected
                converterList.SelectedIndex = -1;
                selectedTablet = null;

                MessageBox.Show("No tablet detected.", MessageBoxType.Error);
                this.Close();
            }
        }