/// <summary> /// Loads the next screen (prefab) immediately. /// </summary> /// <param name="uiEntityPrefabUrl"></param> internal Entity LoadUIEntitySync(UrlReference <Prefab> uiEntityPrefabUrl) { var prefab = _content.Load(uiEntityPrefabUrl); var entity = OnUIPrefabLoaded(prefab); return(entity); }
/// <summary> /// Loads the scene immediately. /// </summary> /// <param name="sceneUrl"></param> internal Scene LoadSceneSync(UrlReference <Scene> sceneUrl) { var sceneName = sceneUrl.GetContentName(); // Scene names aren't saved in the asset file, so need to get it from the url reference. var scene = _content.Load(sceneUrl); scene.Name = sceneName; return(scene); }
/// <summary> /// Loads the next screen (prefab) in the background. /// </summary> /// <param name="uiEntityPrefabUrl"></param> internal async Task <Entity> LoadUIEntityAsync(UrlReference <Prefab> uiEntityPrefabUrl) { var loadPrefabTask = _content.LoadAsync(uiEntityPrefabUrl); var prefab = await loadPrefabTask; var entity = OnUIPrefabLoaded(prefab); return(entity); }
/// <summary> /// Loads the next screen (scene) in the background. /// </summary> /// <param name="sceneUrl"></param> internal async Task <Scene> LoadSceneAsync(UrlReference <Scene> sceneUrl) { var sceneName = sceneUrl.GetContentName(); // Scene names aren't saved in the asset file, so need to get it from the url reference. var loadSceneTask = _content.LoadAsync(sceneUrl); var scene = await loadSceneTask; if (loadSceneTask.IsCompleted) { scene.Name = sceneName; } return(scene); }
protected override void AutoConfigureCore(JSVisualizationModel visual) { visual.AddGeneralPropertyPage(); visual.AddPropertyPage("Doughtnut", "SpotfirePS.ConfiguredJSVizForms", "SpotfirePS.ConfiguredJSVizForms.DoughnutPropertyPage"); base.AutoConfigureCore(visual); var doc = visual.Context.GetAncestor <Document>(); // Add the files; var cr = doc.CustomNodes.AddNewIfNeeded <ContentRepository>(); var content = System.Text.Encoding.UTF8.GetString(GetEmbeddedResource("SpotfirePS.ConfiguredJSViz.scripts.jQuery.js")); var urlReference = new UrlReference(@"scripts.jQuery.js", string.Empty, content, ContentType.JS, true); cr["scripts.jQuery.js"] = urlReference; visual.UrlInclusions.Add("scripts.jQuery.js"); content = System.Text.Encoding.UTF8.GetString(GetEmbeddedResource("SpotfirePS.ConfiguredJSViz.scripts.d3.v3.min.js")); urlReference = new UrlReference(@"scripts.d3.v3.min.js", string.Empty, content, ContentType.JS, true); cr["scripts.d3.v3.min.js"] = urlReference; visual.UrlInclusions.Add("scripts.d3.v3.min.js"); content = System.Text.Encoding.UTF8.GetString(GetEmbeddedResource("SpotfirePS.ConfiguredJSViz.scripts.DoughnutChart.js")); urlReference = new UrlReference(@"scripts.DoughnutChart.js", string.Empty, content, ContentType.JS, true); cr["scripts.DoughnutChart.js"] = urlReference; visual.UrlInclusions.Add("scripts.DoughnutChart.js"); content = System.Text.Encoding.UTF8.GetString(GetEmbeddedResource("SpotfirePS.ConfiguredJSViz.scripts.JSViz.js")); urlReference = new UrlReference(@"scripts.JSViz.js", string.Empty, content, ContentType.JS, true); cr["scripts.JSViz.js"] = urlReference; visual.UrlInclusions.Add("scripts.JSViz.js"); visual.AutoConfigure(); }
public void Register(SceneId sceneId, UrlReference <Scene> sceneUrl) { _sceneUrls.Add(sceneId, sceneUrl); }
public UrlContentMode(UrlReference url) { _url = url; }
protected override void AutoConfigureCore(JSVisualizationModel visual) { base.AutoConfigureCore(visual); var doc = visual.Context.GetAncestor <Document>(); // Add the files; string baseUrl = @"https://s3-eu-west-1.amazonaws.com/asset-market-place-sources"; var cr = doc.CustomNodes.AddNewIfNeeded <ContentRepository>(); string name = @"JQuery 3.2.1"; string url = baseUrl + @"/externalLibs/jquery/jquery-3.2.1.min.js"; var urlReference = new UrlReference(name, url, null, ContentType.JS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"JSVIZ"; url = baseUrl + @"/externalLibs/jsviz/lib/JSViz/JSViz.js"; urlReference = new UrlReference(name, url, null, ContentType.JS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"JVizIntrospectionJS"; url = baseUrl + @"/externalLibs/jsviz/lib/JSViz/Introspection.js"; urlReference = new UrlReference(name, url, null, ContentType.JS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"Namos Rotating Card CSS"; url = baseUrl + @"/customLibs/NamOsMarketPlace/namos-rotating-card.css"; urlReference = new UrlReference(name, url, null, ContentType.CSS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"Bootstrap"; url = baseUrl + @"/externalLibs/bootstrap/bootstrap.min.js"; urlReference = new UrlReference(name, url, null, ContentType.JS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"Angular"; url = baseUrl + @"/externalLibs/angular/1.1.1/angular.min.js"; urlReference = new UrlReference(name, url, null, ContentType.JS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"Asset Controller"; url = baseUrl + @"/customLibs/NamOsMarketPlace/assetController.js"; urlReference = new UrlReference(name, url, null, ContentType.JS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"namosMarketPlace"; url = baseUrl + @"/customLibs/NamOsMarketPlace/namosMarketPlace.js"; urlReference = new UrlReference(name, url, null, ContentType.JS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"NamosMarketPlace HTML"; url = baseUrl + @"/customLibs/NamOsMarketPlace/namos-rotating-card.html"; urlReference = new UrlReference(name, url, null, ContentType.HTML, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"Bootstrap 3 CSS"; url = baseUrl + @"/externalLibs/bootstrap/v3.0.2/bootstrap.css"; urlReference = new UrlReference(name, url, null, ContentType.CSS, false); cr[name] = urlReference; visual.UrlInclusions.Add(name); name = @"Bootstrap CSS"; url = baseUrl + @"/bootstrap/bootstrap.css"; urlReference = new UrlReference(name, url, null, ContentType.CSS, false); cr[name] = urlReference; name = @"Platform"; url = baseUrl + @"/externalLibs/platform.js-master/platform.js"; urlReference = new UrlReference(name, url, null, ContentType.JS, false); cr[name] = urlReference; visual.Title = "AssetMarketPlace"; visual.Visual.ShowTitle = true; visual.LegendVisible = false; visual.AutoConfigure(); }