public MapPanelApi(Guid applicationType, Guid applicationId) { _applicationId = applicationId; _applicationType = applicationType; _mapbook = PublicApi.MapBooks.Get(_applicationId) as PublicApi.MapBook; }
public MapBookPanelApi(PublicApi.MapBook mapbook) { _mapbook = mapbook; _maps = PublicApi.Maps.List(_mapbook.Group.Id.Value, _mapbook.SafeName, new PublicApi.MapsListOptions() { }); }
internal MapsGroupNavigationItem(ICustomNavigationPlugin plugin, ICustomNavigationItemConfiguration configuration, Guid id, int groupId, string label = "") { Plugin = plugin; Configuration = configuration; UniqueID = id; _groupId = groupId; maplistOp.IncludeSubGroups = false; _mapbooks = PublicApi.MapBooks.List(groupId, maplistOp); _mapbook = _mapbooks.FirstOrDefault(); Label = string.IsNullOrEmpty(label)? _getAppLabel(_mapbook): label; Plugin = plugin; }
public IApplication GetCurrentApplication(TeUi.IWebContext context) { PublicApi.MapBook mapbook = new PublicApi.MapBook(); IApplication app = mapbook as IApplication; if (TEApi.Url.CurrentContext == null) { return(null); } var item = TEApi.Url.CurrentContext.ContextItems.Find(c => c.ApplicationTypeId.Value == ApplicationTypeId);//.GetAllContextItems(); if (item != null && item.ApplicationId.HasValue) { return(PublicApi.MapBooks.Get(item.ApplicationId.Value)); } return(null); }
private void ParseMapBook_Context(PageContext pageContext) { var allContext = pageContext.ContextItems.GetAllContextItems(); var cnt = allContext.Count; int groupId = -1; var typename = allContext[0].TypeName; Guid appId = allContext[0].ApplicationId.Value; if (!int.TryParse(allContext[0].Id, out groupId)) { } string singleMapBook = pageContext.GetTokenValue("mapBook") as string; if (groupId > -1) { var group = TEApi.Groups.Get(new GroupsGetOptions { Id = groupId }); ContextItem contextItem = new ContextItem(); if (!string.IsNullOrEmpty(singleMapBook)) { PublicApi.MapBook mapbook = InternalApi.CoriaDataService.GetMapBookByGroupId_Name(groupId, "mapbooks", singleMapBook); contextItem.ApplicationId = mapbook.ApplicationId; contextItem.ApplicationTypeId = mapbook.ApplicationTypeId; contextItem.ContainerId = mapbook.Container.ContainerId; contextItem.ContainerTypeId = mapbook.Container.ContainerTypeId; //Apis.Get<IGroups>().ContainerTypeId, contextItem.ContentId = mapbook.ApplicationId; contextItem.ContentTypeId = mapbook.ApplicationTypeId; contextItem.TypeName = ApplicationTypeName; contextItem.Id = mapbook.Group.Id.Value.ToString(); } pageContext.ContextItems.Put(contextItem); } }
internal static PublicApi.MapBook GetMapBookByGroupId_Name(int groupId, string mapBookName, string mapBookName2) { mapBookName = mapBookName2 != null ? mapBookName2 : mapBookName; PublicApi.MapBook mapbook = new PublicApi.MapBook(GetCoriaMapBookByGroupId_MapBookName(groupId, mapBookName)); return(mapbook); }