예제 #1
0
        public StreamDeckUserControl(GamingPanelEnum panelType, HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler, DCSBIOS dcsbios)
        {
            InitializeComponent();
            ParentTabItem = parentTabItem;

            //no worky worky for this library hidSkeleton.HIDReadDevice.Removed += DeviceRemovedHandler;

            _streamDeckPanel = new StreamDeckPanel(panelType, hidSkeleton);
            _streamDeckPanel.Attach((IGamingPanelListener)this);
            globalHandler.Attach(_streamDeckPanel);
            GlobalHandler = globalHandler;
            _dcsbios      = dcsbios;

            UCStreamDeckButtonAction.SetStreamDeckPanel(_streamDeckPanel);
            UCStreamDeckButtonFace.SetStreamDeckPanel(_streamDeckPanel);

            StackPanelButtonUI.Children.Clear();
            switch (panelType)
            {
            case GamingPanelEnum.StreamDeckMini:
            {
                var child = new UserControlStreamDeckUIMini(_streamDeckPanel);
                _uiButtonGrid = child;
                StackPanelButtonUI.Children.Add(child);

                break;
            }

            case GamingPanelEnum.StreamDeck:
            {
                var child = new UserControlStreamDeckUINormal(_streamDeckPanel);
                _uiButtonGrid = child;
                StackPanelButtonUI.Children.Add(child);

                break;
            }

            case GamingPanelEnum.StreamDeckXL:
            {
                var child = new UserControlStreamDeckUIXL(_streamDeckPanel);
                _uiButtonGrid = child;
                StackPanelButtonUI.Children.Add(child);
                break;
            }
            }


            EventHandlers.AttachStreamDeckListener(UCStreamDeckButtonAction);
            EventHandlers.AttachStreamDeckListener(UCStreamDeckButtonFace);
            EventHandlers.AttachStreamDeckListener(_uiButtonGrid);
            EventHandlers.AttachStreamDeckConfigListener(_uiButtonGrid);
            EventHandlers.AttachStreamDeckListener(this);

            UCStreamDeckButtonAction.GlobalHandler = GlobalHandler;
            UCStreamDeckButtonFace.GlobalHandler   = GlobalHandler;

            UCStreamDeckButtonFace.SetStreamDeckPanel(_streamDeckPanel);
            UCStreamDeckButtonAction.SetStreamDeckPanel(_streamDeckPanel);
        }
예제 #2
0
        public StreamDeckUserControl(GamingPanelEnum panelType, HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler, DCSBIOS dcsbios)
        {
            InitializeComponent();
            _parentTabItem       = parentTabItem;
            _parentTabItemHeader = _parentTabItem.Header.ToString();
            _streamDeckPanel     = new StreamDeckPanel(panelType, hidSkeleton);
            _streamDeckPanel.Attach((IGamingPanelListener)this);
            globalHandler.Attach(_streamDeckPanel);
            _globalHandler = globalHandler;
            _dcsbios       = dcsbios;


            StackPanelButtonUI.Children.Clear();
            switch (panelType)
            {
            case GamingPanelEnum.StreamDeckMini:
            {
                var child = new UserControlStreamDeckUIMini();
                child.PanelHash = _streamDeckPanel.PanelHash;
                _uiButtonGrid   = child;
                StackPanelButtonUI.Children.Add(child);

                break;
            }

            case GamingPanelEnum.StreamDeck:
            {
                var child = new UserControlStreamDeckUINormal();
                child.PanelHash = _streamDeckPanel.PanelHash;
                _uiButtonGrid   = child;
                StackPanelButtonUI.Children.Add(child);

                break;
            }

            case GamingPanelEnum.StreamDeckXL:
            {
                var child = new UserControlStreamDeckUIXL();
                child.PanelHash = _streamDeckPanel.PanelHash;
                _uiButtonGrid   = child;
                StackPanelButtonUI.Children.Add(child);
                break;
            }
            }


            EventHandlers.AttachStreamDeckListener(UCStreamDeckButtonAction);
            EventHandlers.AttachStreamDeckListener(UCStreamDeckButtonFace);
            EventHandlers.AttachStreamDeckListener(_uiButtonGrid);
            EventHandlers.AttachStreamDeckConfigListener(_uiButtonGrid);
            EventHandlers.AttachStreamDeckListener(this);

            UCStreamDeckButtonAction.GlobalHandler = _globalHandler;
            UCStreamDeckButtonFace.GlobalHandler   = _globalHandler;

            UCStreamDeckButtonFace.PanelHash   = _streamDeckPanel.PanelHash;
            UCStreamDeckButtonAction.PanelHash = _streamDeckPanel.PanelHash;
        }
예제 #3
0
        public BackLitPanelUserControl(TabItem parentTabItem, IGlobalHandler globalHandler, HIDSkeleton hidSkeleton)
        {
            InitializeComponent();
            _parentTabItem       = parentTabItem;
            _parentTabItemHeader = _parentTabItem.Header.ToString();
            _backlitPanelBIP     = new BacklitPanelBIP(Settings.Default.BIPLedStrength, hidSkeleton);

            _backlitPanelBIP.Attach((ISaitekPanelListener)this);
            globalHandler.Attach(_backlitPanelBIP);
            _globalHandler = globalHandler;
        }
예제 #4
0
        public TPMPanelUserControl(HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler)
        {
            InitializeComponent();
            _parentTabItem       = parentTabItem;
            _parentTabItemHeader = _parentTabItem.Header.ToString();
            _tpmPanel            = new TPMPanel(hidSkeleton);

            _tpmPanel.Attach((ISaitekPanelListener)this);
            globalHandler.Attach(_tpmPanel);
            _globalHandler = globalHandler;
        }
        public BackLitPanelUserControl(TabItem parentTabItem, IGlobalHandler globalHandler, HIDSkeleton hidSkeleton)
        {
            InitializeComponent();
            ParentTabItem    = parentTabItem;
            _backlitPanelBIP = new BacklitPanelBIP(Settings.Default.BIPLedStrength, hidSkeleton);

            hidSkeleton.HIDReadDevice.Removed += DeviceRemovedHandler;

            _backlitPanelBIP.Attach((IGamingPanelListener)this);
            globalHandler.Attach(_backlitPanelBIP);
            GlobalHandler = globalHandler;
        }
        public RadioPanelPZ69UserControlSpitfireLFMkIX(HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler)
        {
            InitializeComponent();
            _parentTabItem       = parentTabItem;
            _parentTabItemHeader = _parentTabItem.Header.ToString();
            HideAllImages();
            _radioPanelPZ69 = new RadioPanelPZ69SpitfireLFMkIX(hidSkeleton);
            _radioPanelPZ69.FrequencyKnobSensitivity = Settings.Default.RadioFrequencyKnobSensitivity;
            _radioPanelPZ69.Attach((ISaitekPanelListener)this);
            globalHandler.Attach(_radioPanelPZ69);
            _globalHandler = globalHandler;

            //LoadConfiguration();
        }
        public RadioPanelPZ69UserControlF5E(HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler)
        {
            InitializeComponent();
            ParentTabItem = parentTabItem;

            hidSkeleton.HIDReadDevice.Removed += DeviceRemovedHandler;

            HideAllImages();
            _radioPanelPZ69 = new RadioPanelPZ69F5E(hidSkeleton);
            _radioPanelPZ69.FrequencyKnobSensitivity = Settings.Default.RadioFrequencyKnobSensitivity;
            _radioPanelPZ69.Attach((IGamingPanelListener)this);
            globalHandler.Attach(_radioPanelPZ69);
            GlobalHandler = globalHandler;
        }
예제 #8
0
 public RadioPanelPZ69UserControlSA342(HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler)
 {
     InitializeComponent();
     _parentTabItem       = parentTabItem;
     _parentTabItemHeader = _parentTabItem.Header.ToString();
     HideAllImages();
     _radioPanelPZ69 = new RadioPanelPZ69SA342(hidSkeleton);
     _radioPanelPZ69.FrequencyKnobSensitivity = Settings.Default.RadioFrequencyKnobSensitivity;
     _radioPanelPZ69.Attach((IGamingPanelListener)this);
     globalHandler.Attach(_radioPanelPZ69);
     _globalHandler        = globalHandler;
     LabelAirframe.Content = _globalHandler.GetAirframe() + " Gazelle";
     //LoadConfiguration();
 }
        public RadioPanelPZ69UserControlAV8BNA(HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler)
        {
            InitializeComponent();
            _parentTabItem       = parentTabItem;
            _parentTabItemHeader = _parentTabItem.Header.ToString();
            HideAllImages();
            _radioPanelPZ69 = new RadioPanelPZ69AV8BNA(hidSkeleton);
            _radioPanelPZ69.FrequencyKnobSensitivity = -1;//doesn't work with 0 value Settings.Default.RadioFrequencyKnobSensitivity;
            _radioPanelPZ69.Attach((IGamingPanelListener)this);
            globalHandler.Attach(_radioPanelPZ69);
            _globalHandler = globalHandler;

            //LoadConfiguration();
        }
예제 #10
0
        public RadioPanelPZ69UserControlSRS(HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler)
        {
            InitializeComponent();
            _parentTabItem       = parentTabItem;
            _parentTabItemHeader = _parentTabItem.Header.ToString();
            HideAllImages();

            _radioPanelPZ69SRS = new RadioPanelPZ69SRS(Settings.Default.SRSPortFrom, Settings.Default.SRSIpTo, Settings.Default.SRSPortTo, hidSkeleton);
            _radioPanelPZ69SRS.FrequencyKnobSensitivity = Settings.Default.RadioFrequencyKnobSensitivity;
            _radioPanelPZ69SRS.SmallFreqStepping        = Settings.Default.SRSSmallFreqStepping;
            _radioPanelPZ69SRS.Attach((IGamingPanelListener)this);
            globalHandler.Attach(_radioPanelPZ69SRS);
            _globalHandler = globalHandler;

            //LoadConfiguration();
        }
예제 #11
0
        public StreamDeckUserControl(GamingPanelEnum panelType, HIDSkeleton hidSkeleton, TabItem parentTabItem, IGlobalHandler globalHandler, DCSBIOS dcsbios)
        {
            InitializeComponent();
            _parentTabItem       = parentTabItem;
            _parentTabItemHeader = _parentTabItem.Header.ToString();
            _streamDeck          = new StreamDeckPanel(this, panelType, hidSkeleton);
            _streamDeck.Attach((IGamingPanelListener)this);
            globalHandler.Attach(_streamDeck);
            _globalHandler = globalHandler;

            _dcsbios = dcsbios;

            StackPanelButtonUI.Children.Clear();
            switch (panelType)
            {
            case GamingPanelEnum.StreamDeckMini:
            case GamingPanelEnum.StreamDeck:
            {
                var child = new UserControlStreamDeckUINormal();
                _streamDeckUI = child;
                child.SetSDUIParent(this);
                StackPanelButtonUI.Children.Add(child);

                break;
            }

            case GamingPanelEnum.StreamDeckXL:
            {
                var child = new UserControlStreamDeckUIXL();
                _streamDeckUI = child;
                child.SetSDUIParent(this);
                StackPanelButtonUI.Children.Add(child);
                break;
            }
            }

            UCStreamDeckButtonAction.SDUIParent    = this;
            UCStreamDeckButtonAction.GlobalHandler = _globalHandler;
            UCStreamDeckButtonFace.SDUIParent      = this;
            UCStreamDeckButtonFace.GlobalHandler   = _globalHandler;
            UCStreamDeckButtonFace.UserControlStreamDeckButtonAction = UCStreamDeckButtonAction;
            UCStreamDeckButtonAction.UserControlStreamDeckButtonFace = UCStreamDeckButtonFace;
            _streamDeckUI.HideAllDotImages();
        }