Пример #1
0
    public async void DuplicateAction(Base.Action action)
    {
        string newActionName = Base.ProjectManager.Instance.GetFreeActionName(action.GetName() + "_copy");

        addedActionName = newActionName;
        Hide();
        AREditorResources.Instance.LeftMenuProject.SetActiveSubmenu(AREditorResources.Instance.LeftMenuProject.CurrentSubmenuOpened);
        await Base.WebsocketManager.Instance.AddAction(action.ActionPoint.GetId(), action.Parameters.Values.Cast <IO.Swagger.Model.ActionParameter>().ToList(), Base.Action.BuildActionType(
                                                           action.ActionProvider.GetProviderId(), action.Metadata.Name), newActionName, action.Metadata.GetFlows(newActionName));
    }
Пример #2
0
    private string DecodeLinkValue(string linkValue)
    {
        if (string.IsNullOrEmpty(linkValue))
        {
            return(null);
        }
        if (!linkValue.Contains("/"))
        {
            return(null);
        }
        string actionId = linkValue.Substring(0, linkValue.IndexOf('/'));

        try {
            Base.Action action = ProjectManager.Instance.GetAction(actionId);
            return(action.GetName());
        } catch (ItemNotFoundException) { }
        return(null);
    }