public override void DeleteAction(ActionContainerControl control)
 {
     this.actionControls.Remove(control);
 }
        protected override async Task OnLoaded()
        {
            if (!hasLoaded)
            {
                List <ActionTypeEntry> actionTypes = new List <ActionTypeEntry>();
                foreach (ActionTypeEnum actionType in EnumHelper.GetEnumList <ActionTypeEnum>())
                {
                    ActionTypeEntry entry = new ActionTypeEntry()
                    {
                        Name = EnumHelper.GetEnumName(actionType), Type = actionType
                    };
                    switch (entry.Type)
                    {
                    case ActionTypeEnum.Custom:
                        continue;

                    case ActionTypeEnum.Chat:
                        entry.Name += " Message";
                        break;

                    case ActionTypeEnum.Counter:
                        entry.Name += " (Create & Update)";
                        break;

                    case ActionTypeEnum.Input:
                        entry.Name += " (Keyboard & Mouse)";
                        break;

                    case ActionTypeEnum.Overlay:
                        entry.Name += " (Images & Videos)";
                        break;

                    case ActionTypeEnum.File:
                        entry.Name += " (Read & Write)";
                        break;

                    default:
                        break;
                    }
                    actionTypes.Add(entry);
                }

                this.TypeComboBox.ItemsSource        = actionTypes.OrderBy(at => at.Name);
                this.ActionsItemsControl.ItemsSource = this.actionControls;

                this.CommandDetailsGrid.Visibility = Visibility.Visible;
                this.CommandDetailsGrid.Children.Add(this.commandDetailsControl);
                await this.commandDetailsControl.Initialize();

                List <ActionBase> actions = new List <ActionBase>();

                CommandBase command = this.commandDetailsControl.GetExistingCommand();
                if (command != null && command.Actions.Count > 0)
                {
                    actions.AddRange(command.Actions);
                }
                else if (initialActions != null)
                {
                    actions.AddRange(initialActions);
                }

                foreach (ActionBase action in actions)
                {
                    ActionContainerControl actionControl = new ActionContainerControl(this.window, this, action);
                    actionControl.Minimize();
                    this.actionControls.Add(actionControl);
                }
            }

            hasLoaded = true;
            await base.OnLoaded();
        }
 public override void DuplicateAction(ActionContainerControl actionContainer)
 {
     this.AddActionControlContainer(new ActionContainerControl(this.window, this, actionContainer.GetAction()));
 }