public async void InitFromAction(Base.Action action) { InitDialog(action.ActionProvider, action.Metadata, action.ActionPoint); actionParameters = await Base.Parameter.InitActionParameters(actionProvider.GetProviderId(), action.Parameters.Values.ToList(), DynamicContent, OnChangeParameterHandler, DynamicContentLayout, CanvasRoot, false); nameInput.SetValue(Base.ProjectManager.Instance.GetFreeActionName(action.Data.Name)); }
private string EncodeLinkValue(string dropdownValue) { try { Base.Action action = Base.ProjectManager.Instance.GetActionByName(dropdownValue); return(action.GetId() + "/default/0"); } catch (ItemNotFoundException ex) { return(""); } }
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)); }
private void OnActionExecution(object sender, StringEventArgs args) { try { Base.Action action = ProjectManager.Instance.GetAction(args.Data); if (action.ActionProvider.IsRobot() && action.Metadata.Meta.Cancellable) { gameObject.SetActive(true); } } catch (ItemNotFoundException ex) { } }
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); }