From 158fbfe647ca12eab2365718941a9eb399e43b30 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Wed, 16 May 2018 12:06:32 -0700 Subject: [PATCH] Move GuideAssets list to ApplicationController - Issue MatterHackers/MCCentral#3302 Put help json document on site feed and update it from there --- ApplicationView/ApplicationController.cs | 2 ++ PartPreviewWindow/ViewControls3D.cs | 2 +- SetupWizard/DesignSpaceHelp.cs | 8 ++------ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ApplicationView/ApplicationController.cs b/ApplicationView/ApplicationController.cs index e0cf353b1..e2420520c 100644 --- a/ApplicationView/ApplicationController.cs +++ b/ApplicationView/ApplicationController.cs @@ -115,6 +115,8 @@ namespace MatterHackers.MatterControl public class ApplicationController { + public List FeatureGuides { get; set; } = new List(); + private Dictionary> objectEditorsByType; public ThemeConfig Theme { get; set; } diff --git a/PartPreviewWindow/ViewControls3D.cs b/PartPreviewWindow/ViewControls3D.cs index 2c25f3e71..19bc52335 100644 --- a/PartPreviewWindow/ViewControls3D.cs +++ b/PartPreviewWindow/ViewControls3D.cs @@ -626,7 +626,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { UiThread.RunOnIdle(() => { - DialogWindow.Show(); + DialogWindow.Show(new DesignSpaceGuid("", "")); }); } } diff --git a/SetupWizard/DesignSpaceHelp.cs b/SetupWizard/DesignSpaceHelp.cs index a1e5e68f3..f5abd0df1 100644 --- a/SetupWizard/DesignSpaceHelp.cs +++ b/SetupWizard/DesignSpaceHelp.cs @@ -85,17 +85,13 @@ namespace MatterHackers.MatterControl private List whatsNewGuides = new List(); private List allAvailableGuides = new List(); - public DesignSpaceGuid() - : this("", "") - { - } public DesignSpaceGuid(string preSelectTabName, string guideKey) - : base("Close".Localize()) + : base("Close".Localize()) { WindowSize = new Vector2(800, 600); - allAvailableGuides = JsonConvert.DeserializeObject>(AggContext.StaticData.ReadAllText(Path.Combine("OEMSettings", "HelpGuides.json"))); + allAvailableGuides = ApplicationController.Instance.FeatureGuides; // TODO: Guides document should have separate properties for differing top level containers whatsNewGuides = allAvailableGuides;