Esempio n. 1
0
    protected override void OnListControlAction(string actionName, object actionArgument)
    {
        var graphName = QueryHelper.GetString("graph", String.Empty);

        switch (actionName.ToLowerInvariant())
        {
        case "delete":
            var sourcePointGuid = ValidationHelper.GetGuid(actionArgument, Guid.Empty);
            if (sourcePointGuid != Guid.Empty && CreateDeleteAction(sourcePointGuid))
            {
                WorkflowScriptHelper.RefreshDesignerFromDialog(Page, CurrentStepInfo.StepID, graphName);
            }
            break;

        case "#move":
            if (UniGridFunctions.TryParseMoveActionArguments(actionArgument.ToString(), out _, out var oldIndex, out var newIndex))
            {
                if (CurrentStepInfo.MoveSourcePoint(oldIndex, newIndex))
                {
                    WorkflowScriptHelper.RefreshDesignerFromDialog(Page, CurrentStepInfo.StepID, graphName);
                }
            }
            break;
        }
    }