public ActionTreeViewItem(SwitcherActionBase action, NetworkTreeViewItem parentNetworkItem)
            : base()
        {
            if (action == null)
            {
                throw new ArgumentNullException("action", "Action cannot be null");
            }

            this.ActionId          = action.Id;
            this.Header            = action.Name;
            this.ParentNetworkItem = parentNetworkItem;
        }
        public void SetStatusText(SwitcherActionBase ownerAction, string message, bool isError = false)
        {
            if (ownerAction == null)
            {
                return;
            }

            this.Dispatcher.Invoke(new Action(delegate
            {
                labelAboutStatus.Tag     = "FROM_ACTION";
                labelAboutStatus.Content = ownerAction.Name + ": " + message;

                if (isError)
                {
                    labelAboutStatus.Foreground = new SolidColorBrush(Colors.Red);
                }
                else
                {
                    labelAboutStatus.Foreground = new SolidColorBrush(Colors.Black);
                }

                labelAboutStatus.Cursor = Cursors.Arrow;
            }));
        }