Move GuideAssets list to ApplicationController

- Issue MatterHackers/MCCentral#3302
Put help json document on site feed and update it from there
This commit is contained in:
John Lewin 2018-05-16 12:06:32 -07:00
parent 750b009d89
commit 158fbfe647
3 changed files with 5 additions and 7 deletions

View file

@ -115,6 +115,8 @@ namespace MatterHackers.MatterControl
public class ApplicationController
{
public List<GuideAssets> FeatureGuides { get; set; } = new List<GuideAssets>();
private Dictionary<Type, HashSet<IObject3DEditor>> objectEditorsByType;
public ThemeConfig Theme { get; set; }

View file

@ -626,7 +626,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
UiThread.RunOnIdle(() =>
{
DialogWindow.Show<DesignSpaceGuid>();
DialogWindow.Show(new DesignSpaceGuid("", ""));
});
}
}

View file

@ -85,17 +85,13 @@ namespace MatterHackers.MatterControl
private List<GuideAssets> whatsNewGuides = new List<GuideAssets>();
private List<GuideAssets> allAvailableGuides = new List<GuideAssets>();
public DesignSpaceGuid()
: this("", "")
{
}
public DesignSpaceGuid(string preSelectTabName, string guideKey)
: base("Close".Localize())
: base("Close".Localize())
{
WindowSize = new Vector2(800, 600);
allAvailableGuides = JsonConvert.DeserializeObject<List<GuideAssets>>(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;