public RadioPanelPZ69AV8BNA(HIDSkeleton hidSkeleton) : base(hidSkeleton)
 {
     CreateRadioKnobs();
     Startup();
     BIOSEventHandler.AttachStringListener(this);
     BIOSEventHandler.AttachDataListener(this);
 }
Пример #2
0
 public RadioPanelPZ69SpitfireLFMkIX(HIDSkeleton hidSkeleton)
     : base(hidSkeleton)
 {
     CreateRadioKnobs();
     Startup();
     BIOSEventHandler.AttachDataListener(this);
 }
Пример #3
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _dcsbiosDecoder?.Dispose();
         BIOSEventHandler.DetachDataListener(this);
     }
 }
        /*[NonSerialized]
         * private List<string> _listDecimalFormatters = new List<string>()
         * {
         *  "0", "0.0", "0.00", "0.000", "0.0000", "0.00000"
         * };*/

        public DCSBIOSDecoder()
        {
            Debug.WriteLine("Creating Image Update Thread for Streamdeck #2");
            _imageUpdateTread = new Thread(ImageRefreshingThread);
            _imageUpdateTread.Start();
            BIOSEventHandler.AttachDataListener(this);
            BIOSEventHandler.AttachStringListener(this);
            SDEventHandler.AttachDCSBIOSDecoder(this);
        }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         // dispose managed resources
         _autoResetEvent?.Dispose();
         BIOSEventHandler.DetachDataListener(this);
     }
     // free native resources
 }
        public JaceSandboxWindow()
        {
            BIOSEventHandler.AttachDataListener(this);
            DCSBIOSControlLocator.LoadControls();
            _dcsbiosControls = DCSBIOSControlLocator.GetIntegerOutputControls();
            var thread = new Thread(ThreadLoop);

            thread.Start();
            InitializeComponent();
        }
Пример #7
0
        public StreamDeckDCSBIOSDecoderWindow(DCSBIOSDecoder dcsbiosDecoder, StreamDeckPanel streamDeckPanel)
        {
            InitializeComponent();
            _dcsbiosDecoder = dcsbiosDecoder;
            DCSBIOSControlLocator.LoadControls();
            _dcsbiosControls = DCSBIOSControlLocator.GetIntegerOutputControls();
            _streamDeckPanel = streamDeckPanel;

            BIOSEventHandler.AttachDataListener(this);
        }
 public DCSBiosOutputFormulaWindow(string description, bool userEditsDescription = false, bool showDecimalSetting = false)
 {
     InitializeComponent();
     _description          = description;
     _userEditsDescription = userEditsDescription;
     _showDecimalSetting   = showDecimalSetting;
     _dcsBiosOutput        = new DCSBIOSOutput();
     DCSBIOSControlLocator.LoadControls();
     _dcsbiosControls = DCSBIOSControlLocator.GetIntegerOutputControls();
     BIOSEventHandler.AttachDataListener(this);
 }
 public DCSBiosOutputFormulaWindow(string description, DCSBIOSOutput dcsBiosOutput, bool limitDecimals, int decimalPlaces, bool userEditsDescription = false, bool showDecimalSetting = false)
 {
     InitializeComponent();
     _description          = description;
     _userEditsDescription = userEditsDescription;
     _showDecimalSetting   = showDecimalSetting;
     _dcsBiosOutput        = dcsBiosOutput;
     _limitDecimals        = limitDecimals;
     _decimalPlaces        = decimalPlaces;
     DCSBIOSControlLocator.LoadControls();
     _dcsbiosControl  = DCSBIOSControlLocator.GetControl(_dcsBiosOutput.ControlId);
     _dcsbiosControls = DCSBIOSControlLocator.GetIntegerOutputControls();
     BIOSEventHandler.AttachDataListener(this);
 }
        public SwitchPanelPZ55(HIDSkeleton hidSkeleton) : base(GamingPanelEnum.PZ55SwitchPanel, hidSkeleton)
        {
            if (hidSkeleton.GamingPanelType != GamingPanelEnum.PZ55SwitchPanel)
            {
                throw new ArgumentException();
            }

            // Fixed values
            VendorId  = 0x6A3;
            ProductId = 0xD67;
            CreateSwitchKeys();
            Startup();
            BIOSEventHandler.AttachDataListener(this);
        }
Пример #11
0
        public FarmingSidePanel(HIDSkeleton hidSkeleton) : base(GamingPanelEnum.FarmingPanel, hidSkeleton)
        {
            if (hidSkeleton.GamingPanelType != GamingPanelEnum.FarmingPanel)
            {
                throw new ArgumentException();
            }

            // Fixed values
            VendorId  = 0x0738;
            ProductId = 0x2218;
            CreateKeys();
            Startup();
            BIOSEventHandler.AttachDataListener(this);
        }
Пример #12
0
        // Protected implementation of Dispose pattern.
        protected override void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (disposing)
                {
                    BIOSEventHandler.DetachDataListener(this);
                }

                _disposed = true;
            }

            // Call base class implementation.
            base.Dispose(disposing);
        }
Пример #13
0
        public void Event_MultiPanel_SettingsModified_Proper_Attachment()
        {
            var gamingPanelSkeleton =
                new GamingPanelSkeleton(GamingPanelVendorEnum.Saitek, GamingPanelEnum.PZ70MultiPanel);
            var multiPanelPZ70 = new MultiPanelPZ70(new HIDSkeleton(gamingPanelSkeleton, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"));

            //MultiPanel
            Assert.True(BIOSEventHandler.OnDcsDataAddressValueEventSubscribed());
            Assert.True(AppEventHandler.OnForwardPanelEventChangedSubscribed());

            //GamingPanel
            Assert.True(AppEventHandler.OnProfileEventSubscribed());
            Assert.True(AppEventHandler.OnSavePanelSettingsSubscribed());
            Assert.True(AppEventHandler.OnSavePanelSettingsJSONSubscribed());
        }
Пример #14
0
 public StreamDeckDCSBIOSDecoderWindow(StreamDeckPanel streamDeckPanel)
 {
     InitializeComponent();
     _streamDeckPanel = streamDeckPanel;
     _dcsbiosDecoder  = new DCSBIOSDecoder
     {
         DecoderSourceType       = DCSBiosOutputType.IntegerType,
         StreamDeckPanelInstance = streamDeckPanel,
         StreamDeckButtonName    = streamDeckPanel.SelectedButtonName
     };
     LoadDefaults();
     DCSBIOSControlLocator.LoadControls();
     _dcsbiosControls = DCSBIOSControlLocator.GetIntegerOutputControls();
     BIOSEventHandler.AttachDataListener(this);
 }
Пример #15
0
        /*
         * 01000000 2nd BIP from left GREEN
         * 00000000
         *
         * 01000000 2nd BIP from left YELLOW
         * 01000000
         *
         * 00000000 2nd BIP from left RED
         * 01000000
         *
         * 00000000 2nd BIP from left DARK
         * 00000000
         *
         */
        public BacklitPanelBIP(uint ledBrightness, HIDSkeleton hidSkeleton)
            : base(GamingPanelEnum.BackLitPanel, hidSkeleton)
        {
            if (hidSkeleton.GamingPanelType != GamingPanelEnum.BackLitPanel)
            {
                throw new ArgumentException();
            }

            VendorId       = 0x6A3;
            ProductId      = 0xB4E;
            _ledBrightness = ledBrightness;
            BipFactory.RegisterBip(this);
            Startup();

            BIOSEventHandler.AttachDataListener(this);
        }
 public void Dispose()
 {
     BIOSEventHandler.DetachDataListener(this);
 }