Esempio n. 1
0
        public FlowToken Execute(EntityToken entityToken, ActionToken actionToken, FlowControllerServicesContainer flowControllerServicesContainer)
        {
            MessageBoxActionNodeActionToken messageBoxActionNodeActionToken = (MessageBoxActionNodeActionToken)actionToken;

            MessageBoxActionNode messageBoxActionNode = (MessageBoxActionNode)ActionNode.Deserialize(messageBoxActionNodeActionToken.SerializedActionNode);

            IManagementConsoleMessageService managementConsoleMessageService = flowControllerServicesContainer.GetService <IManagementConsoleMessageService>();

            managementConsoleMessageService.ShowMessage(
                messageBoxActionNode.DialogType,
                messageBoxActionNodeActionToken.Title,
                messageBoxActionNodeActionToken.Message);

            return(null);
        }
Esempio n. 2
0
        protected override void OnAddAction(Action <ElementAction> actionAdder, EntityToken entityToken, TreeNodeDynamicContext dynamicContext, DynamicValuesHelperReplaceContext dynamicValuesHelperReplaceContext)
        {
            ActionToken actionToken = new MessageBoxActionNodeActionToken(
                this.TitleDynamicValuesHelper.ReplaceValues(dynamicValuesHelperReplaceContext),
                this.MessageDynamicValuesHelper.ReplaceValues(dynamicValuesHelperReplaceContext),
                this.Serialize(),
                this.PermissionTypes
                );

            ElementAction elementAction = new ElementAction(new ActionHandle(actionToken))
            {
                VisualData = this.CreateActionVisualizedData(dynamicValuesHelperReplaceContext)
            };

            elementAction.VisualData.ActionLocation = this.Location;

            actionAdder(elementAction);
        }
Esempio n. 3
0
        protected override void OnAddAction(Action<ElementAction> actionAdder, EntityToken entityToken, TreeNodeDynamicContext dynamicContext, DynamicValuesHelperReplaceContext dynamicValuesHelperReplaceContext)
        {
            ActionToken actionToken = new MessageBoxActionNodeActionToken(
                this.TitleDynamicValuesHelper.ReplaceValues(dynamicValuesHelperReplaceContext),
                this.MessageDynamicValuesHelper.ReplaceValues(dynamicValuesHelperReplaceContext),
                this.Serialize(), 
                this.PermissionTypes
                );

            ElementAction elementAction = new ElementAction(new ActionHandle(actionToken))
            {
                VisualData = this.CreateActionVisualizedData(dynamicValuesHelperReplaceContext)
            };

            elementAction.VisualData.ActionLocation = this.Location;

            actionAdder(elementAction);
        }