/// <summary>
        /// Adds a smart object action to the processing queue.
        /// </summary>
        /// <param name="currentDevice"></param>
        /// <param name="args"></param>
        protected void Enqueue(GenericBase currentDevice, SmartObjectEventArgs args)
        {
            var key = PanelActions.GetSmartKey(args.Sig.Number, args.SmartObjectArgs.ID);

            switch (args.Event)
            {
            case eSigEvent.BoolChange:
                var bv = args.Sig.BoolValue;
                if (Actions.BoolSmartActions.ContainsKey(key))
                {
                    panelProcessingQueue.Enqueue(() =>
                    {
                        Actions.BoolSmartActions[key].Invoke(bv);
                    });
                }
                else
                {
                    if (bv)
                    {
                        if (Actions.BoolSmartPressActions.ContainsKey(key))
                        {
                            panelProcessingQueue.Enqueue(() =>
                            {
                                Actions.BoolSmartPressActions[key].Invoke(true);
                            });
                        }
                    }
                    else
                    {
                        if (Actions.BoolSmartReleaseActions.ContainsKey(key))
                        {
                            panelProcessingQueue.Enqueue(() =>
                            {
                                Actions.BoolSmartReleaseActions[key].Invoke(false);
                            });
                        }
                    }
                }

                break;

            case eSigEvent.UShortChange:
                var uv = args.Sig.UShortValue;
                if (Actions.UShortSmartActions.ContainsKey(key))
                {
                    panelProcessingQueue.Enqueue(() =>
                    {
                        Actions.UShortSmartActions[key].Invoke(uv);
                    });
                }
                break;

            case eSigEvent.StringChange:
                var sv = args.Sig.StringValue;
                if (Actions.StringSmartActions.ContainsKey(key))
                {
                    panelProcessingQueue.Enqueue(() =>
                    {
                        Actions.StringSmartActions[key].Invoke(sv);
                    });
                }
                break;
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PanelUIBase"/> class.
 /// </summary>
 public PanelUIBase()
 {
     Actions = new PanelActions();
 }