From 9b3a36ba6e0fc660a6cdc652b7dc8babde34e1d0 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Thu, 21 May 2020 10:54:57 -0700 Subject: [PATCH 1/4] improving pro messaging getting details for locked tools to be available --- .../ApplicationView/ApplicationController.cs | 28 +++++++- MatterControlLib/DataStorage/Models.cs | 4 +- .../DesignTools/OpenSCAD/OpenSCADBuilder.cs | 1 - .../DesignTools/PublicPropertyEditor.cs | 13 ++-- .../View3D/Actions/ImageEditor.cs | 2 - .../View3D/IObject3DEditor.cs | 1 - MatterControlLib/RootSystemWindow.cs | 2 +- .../SettingsManagement/ApplicationSettings.cs | 71 ++++++++++++++----- Submodules/agg-sharp | 2 +- 9 files changed, 88 insertions(+), 36 deletions(-) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index 9c7ef81e6..eb3b6f204 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -546,7 +546,7 @@ namespace MatterHackers.MatterControl // check permission to a purchase public Func UserHasPermissionToId { get; set; } - public Func GetUnlockPage { get; set; } + public Func GetUnlockData { get; set; } private static ApplicationController globalInstance; @@ -2304,9 +2304,31 @@ namespace MatterHackers.MatterControl public DragDropData DragDropData { get; set; } = new DragDropData(); - public string ShortProductName => "MatterControl"; + public string ShortProductName + { + get + { + if (this.IsMatterControlPro()) + { + return "MatterControl Pro"; + } - public string ProductName => "MatterHackers: MatterControl"; + return "MatterControl"; + } + } + + public string ProductName + { + get + { + if (this.IsMatterControlPro()) + { + return "MatterControl Pro Edition"; + } + + return "MatterHackers: MatterControl"; + } + } public void SwitchToPurchasedLibrary() { diff --git a/MatterControlLib/DataStorage/Models.cs b/MatterControlLib/DataStorage/Models.cs index e242bab79..a2f54fab6 100644 --- a/MatterControlLib/DataStorage/Models.cs +++ b/MatterControlLib/DataStorage/Models.cs @@ -94,7 +94,7 @@ namespace MatterHackers.MatterControl.DataStorage public virtual void Commit() { - //Assumes that autoincremented ids start with 1 + // Assumes that autoincremented ids start with 1 if (this.Id == 0) { TryHandleInsert(); @@ -210,7 +210,7 @@ namespace MatterHackers.MatterControl.DataStorage public string DeviceToken { get; set; } - //Auto connect to printer (if available) + // Auto connect to printer (if available) public string DeviceType { get; set; } // all the data about print leveling diff --git a/MatterControlLib/DesignTools/OpenSCAD/OpenSCADBuilder.cs b/MatterControlLib/DesignTools/OpenSCAD/OpenSCADBuilder.cs index 0941181ee..b20ee55c9 100644 --- a/MatterControlLib/DesignTools/OpenSCAD/OpenSCADBuilder.cs +++ b/MatterControlLib/DesignTools/OpenSCAD/OpenSCADBuilder.cs @@ -53,7 +53,6 @@ namespace MatterHackers.MatterControl.Library public string Name => "Builder"; - public bool Unlocked { get; } = true; private string compilerPath = UserSettings.Instance.get(UserSettingsKey.OpenScadPath) ?? "/usr/bin/openscad"; diff --git a/MatterControlLib/DesignTools/PublicPropertyEditor.cs b/MatterControlLib/DesignTools/PublicPropertyEditor.cs index 2d28039ea..d065cbe80 100644 --- a/MatterControlLib/DesignTools/PublicPropertyEditor.cs +++ b/MatterControlLib/DesignTools/PublicPropertyEditor.cs @@ -98,8 +98,6 @@ namespace MatterHackers.MatterControl.DesignTools { public string Name => "Property Editor"; - public bool Unlocked { get; } = true; - public IEnumerable SupportedTypes() => new Type[] { typeof(IObject3D) }; private static readonly Type[] allowedTypes = @@ -863,15 +861,16 @@ namespace MatterHackers.MatterControl.DesignTools public static void AddUnlockLinkIfRequired(IObject3D item, GuiWidget editControlsContainer, ThemeConfig theme) { - var unlockUrl = ApplicationController.Instance.GetUnlockPage?.Invoke(item); + var unlockdata = ApplicationController.Instance.GetUnlockData?.Invoke(item); if (!item.Persistable - && !string.IsNullOrEmpty(unlockUrl)) + && unlockdata != null + && !string.IsNullOrEmpty(unlockdata.Value.url)) { - editControlsContainer.AddChild(GetUnlockRow(theme, unlockUrl)); + editControlsContainer.AddChild(GetUnlockRow(theme, unlockdata.Value)); } } - public static GuiWidget GetUnlockRow(ThemeConfig theme, string unlockLinkUrl) + public static GuiWidget GetUnlockRow(ThemeConfig theme, (string url, string markDown) unlockData) { var detailsLink = new TextIconButton("Unlock".Localize(), AggContext.StaticData.LoadIcon("locked.png", 16, 16, theme.InvertIcons), theme) { @@ -880,7 +879,7 @@ namespace MatterHackers.MatterControl.DesignTools }; detailsLink.Click += (s, e) => { - ApplicationController.Instance.LaunchBrowser(unlockLinkUrl); + ApplicationController.Instance.LaunchBrowser(unlockData.url); }; theme.ApplyPrimaryActionStyle(detailsLink); diff --git a/MatterControlLib/PartPreviewWindow/View3D/Actions/ImageEditor.cs b/MatterControlLib/PartPreviewWindow/View3D/Actions/ImageEditor.cs index d48a5c0f8..a6b27ecfd 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/Actions/ImageEditor.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/Actions/ImageEditor.cs @@ -46,8 +46,6 @@ namespace MatterHackers.MatterControl.DesignTools public class ImageEditor : IObject3DEditor { - bool IObject3DEditor.Unlocked => true; - string IObject3DEditor.Name => "Image Editor"; IEnumerable IObject3DEditor.SupportedTypes() => new[] { typeof(ImageObject3D) }; diff --git a/MatterControlLib/PartPreviewWindow/View3D/IObject3DEditor.cs b/MatterControlLib/PartPreviewWindow/View3D/IObject3DEditor.cs index 8c7de5c05..f65968557 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/IObject3DEditor.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/IObject3DEditor.cs @@ -37,7 +37,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { public interface IObject3DEditor { - bool Unlocked { get; } string Name { get; } IEnumerable SupportedTypes(); GuiWidget Create(IObject3D item, UndoBuffer undoBuffer, ThemeConfig theme); diff --git a/MatterControlLib/RootSystemWindow.cs b/MatterControlLib/RootSystemWindow.cs index e65f57715..371295137 100644 --- a/MatterControlLib/RootSystemWindow.cs +++ b/MatterControlLib/RootSystemWindow.cs @@ -95,7 +95,7 @@ namespace MatterHackers.MatterControl this.MinimumSize = minSize; - this.Title = $"MatterHackers: MatterControl {version}"; + this.Title = $"{ApplicationController.Instance.ProductName} {version}"; if (OemSettings.Instance.WindowTitleExtra != null && OemSettings.Instance.WindowTitleExtra.Trim().Length > 0) { this.Title += $" - {OemSettings.Instance.WindowTitleExtra}"; diff --git a/MatterControlLib/SettingsManagement/ApplicationSettings.cs b/MatterControlLib/SettingsManagement/ApplicationSettings.cs index acd26ec12..98de9446f 100644 --- a/MatterControlLib/SettingsManagement/ApplicationSettings.cs +++ b/MatterControlLib/SettingsManagement/ApplicationSettings.cs @@ -1,10 +1,37 @@ -using MatterHackers.MatterControl.DataStorage; -using MatterHackers.MatterControl.SettingsManagement; +/* +Copyright (c) 2020, Lars Brubaker, John Lewin +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project. +*/ + using System.Collections.Generic; -using System; -using Newtonsoft.Json; using System.Linq; -using MatterHackers.Agg.UI; +using MatterHackers.MatterControl.DataStorage; +using MatterHackers.MatterControl.SettingsManagement; +using Newtonsoft.Json; namespace MatterHackers.MatterControl { @@ -21,13 +48,18 @@ namespace MatterHackers.MatterControl public class ApplicationSettings { public static string ValidFileExtensions { get; } = ".STL;.AMF;.OBJ"; + public static string LibraryMeshFileExtensions { get; } = ".stl,.obj,.amf,.mcx"; + public static string LibraryFilterFileExtensions { get; } = LibraryMeshFileExtensions + ",.gcode"; + public static string OpenPrintableFileParams { get; } = "STL, AMF, OBJ, GCODE, MCX|*.stl;*.amf;*.obj;*.gcode;*.mcx"; + public static string OpenDesignFileParams { get; } = "STL, AMF, OBJ, GCODE, MCX|*.stl;*.amf;*.obj;*.gcode;*.mcx"; private static ApplicationSettings globalInstance = null; - public Dictionary settingsDictionary; + + public Dictionary SettingsDictionary { get; set; } public static ApplicationSettings Instance { @@ -131,14 +163,15 @@ namespace MatterHackers.MatterControl } allocatedCount++; + } + while (!string.IsNullOrEmpty(clientToken)); - } while (!string.IsNullOrEmpty(clientToken)); return allocatedClientTokens; } private HashSet GetRunningClientTokens() { - var runningClientTokens = new HashSet(); + var runningClientTokens = new HashSet(); // Only deserialize if greater than one if (ApplicationController.ApplicationInstanceCount > 1) @@ -188,41 +221,43 @@ namespace MatterHackers.MatterControl allocatedCount++; - } while (!firstEmptySlot); + } + while (!firstEmptySlot); } public string get(string key) { string result; - if (settingsDictionary == null) + if (SettingsDictionary == null) { globalInstance.LoadData(); } - if (settingsDictionary.ContainsKey(key)) + if (SettingsDictionary.ContainsKey(key)) { - result = settingsDictionary[key].Value; + result = SettingsDictionary[key].Value; } else { result = null; } + return result; } public void set(string key, string value) { SystemSetting setting; - if (settingsDictionary.ContainsKey(key)) + if (SettingsDictionary.ContainsKey(key)) { - setting = settingsDictionary[key]; + setting = SettingsDictionary[key]; } else { setting = new SystemSetting(); setting.Name = key; - settingsDictionary[key] = setting; + SettingsDictionary[key] = setting; } setting.Value = value; @@ -231,16 +266,16 @@ namespace MatterHackers.MatterControl private void LoadData() { - settingsDictionary = new Dictionary(); + SettingsDictionary = new Dictionary(); foreach (SystemSetting s in GetApplicationSettings()) { - settingsDictionary[s.Name] = s; + SettingsDictionary[s.Name] = s; } } private IEnumerable GetApplicationSettings() { - //Retrieve SystemSettings from the Datastore + // Retrieve SystemSettings from the Datastore return Datastore.Instance.dbSQLite.Query("SELECT * FROM SystemSetting;"); } } diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index e9eee6d8b..929a7968c 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit e9eee6d8b662a49481b83d5ce66b03d59b7f3b23 +Subproject commit 929a7968c8099e1eea33f5128cb60701f0200eca From 6ef0df24cc46f4a3520762e4772137b74b342a60 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Thu, 21 May 2020 15:11:03 -0700 Subject: [PATCH 2/4] adding ability to have upsell markdown message --- .../ApplicationView/ApplicationController.cs | 15 +++++++++------ .../DesignTools/PublicPropertyEditor.cs | 15 +++++++++++---- .../PartPreviewWindow/MainViewWidget.cs | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index eb3b6f204..5fe356b25 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -546,7 +546,7 @@ namespace MatterHackers.MatterControl // check permission to a purchase public Func UserHasPermissionToId { get; set; } - public Func GetUnlockData { get; set; } + public Func GetUnlockData { get; set; } private static ApplicationController globalInstance; @@ -3637,11 +3637,14 @@ Support and tutorials: { timer = Stopwatch.StartNew(); - // set the default font - AggContext.DefaultFont = ApplicationController.GetTypeFace(NamedTypeFace.Nunito_Regular); - AggContext.DefaultFontBold = ApplicationController.GetTypeFace(NamedTypeFace.Nunito_Bold); - AggContext.DefaultFontItalic = ApplicationController.GetTypeFace(NamedTypeFace.Nunito_Italic); - AggContext.DefaultFontBoldItalic = ApplicationController.GetTypeFace(NamedTypeFace.Nunito_Bold_Italic); + if (false) + { + // set the default font + AggContext.DefaultFont = ApplicationController.GetTypeFace(NamedTypeFace.Nunito_Regular); + AggContext.DefaultFontBold = ApplicationController.GetTypeFace(NamedTypeFace.Nunito_Bold); + AggContext.DefaultFontItalic = ApplicationController.GetTypeFace(NamedTypeFace.Nunito_Italic); + AggContext.DefaultFontBoldItalic = ApplicationController.GetTypeFace(NamedTypeFace.Nunito_Bold_Italic); + } var systemWindow = new RootSystemWindow(width, height); diff --git a/MatterControlLib/DesignTools/PublicPropertyEditor.cs b/MatterControlLib/DesignTools/PublicPropertyEditor.cs index d065cbe80..5d13e2176 100644 --- a/MatterControlLib/DesignTools/PublicPropertyEditor.cs +++ b/MatterControlLib/DesignTools/PublicPropertyEditor.cs @@ -33,6 +33,7 @@ using System.ComponentModel; using System.Linq; using System.Reflection; using System.Threading; +using Markdig.Agg; using MatterHackers.Agg; using MatterHackers.Agg.Image; using MatterHackers.Agg.Platform; @@ -861,16 +862,22 @@ namespace MatterHackers.MatterControl.DesignTools public static void AddUnlockLinkIfRequired(IObject3D item, GuiWidget editControlsContainer, ThemeConfig theme) { - var unlockdata = ApplicationController.Instance.GetUnlockData?.Invoke(item); + var unlockdata = ApplicationController.Instance.GetUnlockData?.Invoke(item, theme); if (!item.Persistable && unlockdata != null && !string.IsNullOrEmpty(unlockdata.Value.url)) { - editControlsContainer.AddChild(GetUnlockRow(theme, unlockdata.Value)); + if (unlockdata.Value.markdownWidget != null) + { + unlockdata.Value.markdownWidget.VAnchor = VAnchor.Fit; + editControlsContainer.AddChild(unlockdata.Value.markdownWidget); + } + + editControlsContainer.AddChild(GetUnlockRow(theme, unlockdata.Value.url)); } } - public static GuiWidget GetUnlockRow(ThemeConfig theme, (string url, string markDown) unlockData) + public static GuiWidget GetUnlockRow(ThemeConfig theme, string url) { var detailsLink = new TextIconButton("Unlock".Localize(), AggContext.StaticData.LoadIcon("locked.png", 16, 16, theme.InvertIcons), theme) { @@ -879,7 +886,7 @@ namespace MatterHackers.MatterControl.DesignTools }; detailsLink.Click += (s, e) => { - ApplicationController.Instance.LaunchBrowser(unlockData.url); + ApplicationController.Instance.LaunchBrowser(url); }; theme.ApplyPrimaryActionStyle(detailsLink); diff --git a/MatterControlLib/PartPreviewWindow/MainViewWidget.cs b/MatterControlLib/PartPreviewWindow/MainViewWidget.cs index a626ecab2..5ac432f45 100644 --- a/MatterControlLib/PartPreviewWindow/MainViewWidget.cs +++ b/MatterControlLib/PartPreviewWindow/MainViewWidget.cs @@ -473,7 +473,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { base.OnDraw(graphics2D); - AggContext.DefaultFont.ShowDebugInfo(graphics2D); + // AggContext.DefaultFont.ShowDebugInfo(graphics2D); } private void ShowUpdateAvailableAnimation() From 7d3cce547d5a866eee443550e07bdbd2aeb14cd1 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Thu, 21 May 2020 16:29:45 -0700 Subject: [PATCH 3/4] Make the text cache look in static data if can't find cache Made persistable work on decimate and repair --- .../Operations}/DecimateObject3D.cs | 2 ++ .../DesignTools/Operations}/RepairObject3D.cs | 2 ++ .../Widgets/StorePage/UpgradeToProTabPage.cs | 3 ++- .../Utilities/WebUtilities/WebCache.cs | 23 ++++++++++++++++--- 4 files changed, 26 insertions(+), 4 deletions(-) rename {MatterControl.MeshOperations => MatterControlLib/DesignTools/Operations}/DecimateObject3D.cs (98%) rename {MatterControl.MeshOperations => MatterControlLib/DesignTools/Operations}/RepairObject3D.cs (99%) diff --git a/MatterControl.MeshOperations/DecimateObject3D.cs b/MatterControlLib/DesignTools/Operations/DecimateObject3D.cs similarity index 98% rename from MatterControl.MeshOperations/DecimateObject3D.cs rename to MatterControlLib/DesignTools/Operations/DecimateObject3D.cs index 4025042f8..e990f4173 100644 --- a/MatterControl.MeshOperations/DecimateObject3D.cs +++ b/MatterControlLib/DesignTools/Operations/DecimateObject3D.cs @@ -53,6 +53,8 @@ namespace MatterHackers.MatterControl.DesignTools Polygon_Percent } + public override bool Persistable => ApplicationController.Instance.UserHasPermission(this); + public ReductionMode Mode { get; set; } = ReductionMode.Polygon_Percent; [ReadOnly(true)] diff --git a/MatterControl.MeshOperations/RepairObject3D.cs b/MatterControlLib/DesignTools/Operations/RepairObject3D.cs similarity index 99% rename from MatterControl.MeshOperations/RepairObject3D.cs rename to MatterControlLib/DesignTools/Operations/RepairObject3D.cs index 37385c666..d373c24e9 100644 --- a/MatterControl.MeshOperations/RepairObject3D.cs +++ b/MatterControlLib/DesignTools/Operations/RepairObject3D.cs @@ -26,6 +26,8 @@ namespace MatterHackers.MatterControl.DesignTools Name = "Repair".Localize(); } + public override bool Persistable => ApplicationController.Instance.UserHasPermission(this); + [Description("Make all the faces have a consistent orientation.")] public bool FaceOrientation { get; set; } = true; diff --git a/MatterControlLib/Library/Widgets/StorePage/UpgradeToProTabPage.cs b/MatterControlLib/Library/Widgets/StorePage/UpgradeToProTabPage.cs index 867c98d1f..dab576d13 100644 --- a/MatterControlLib/Library/Widgets/StorePage/UpgradeToProTabPage.cs +++ b/MatterControlLib/Library/Widgets/StorePage/UpgradeToProTabPage.cs @@ -74,7 +74,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.PlusTab { markdownWidget.Markdown = markDown; }); - }); + }, + true); } } } diff --git a/MatterControlLib/Utilities/WebUtilities/WebCache.cs b/MatterControlLib/Utilities/WebUtilities/WebCache.cs index 410e353ac..31c54dac0 100644 --- a/MatterControlLib/Utilities/WebUtilities/WebCache.cs +++ b/MatterControlLib/Utilities/WebUtilities/WebCache.cs @@ -200,12 +200,18 @@ namespace MatterHackers.MatterControl } } - public static void RetrieveText(string uriToLoad, Action updateResult) + public static void RetrieveText(string uriToLoad, Action updateResult, bool checkStaticData = false) { var longHash = uriToLoad.GetLongHashCode(); var textFileName = ApplicationController.CacheablePath("Text", longHash.ToString() + ".txt"); + // change to a path that makes it easy to collect up all the text we want to ship with MC + if (checkStaticData) + { + textFileName = ApplicationController.CacheablePath("Text_OverRide", longHash.ToString() + ".txt"); + } + string fileText = null; if (File.Exists(textFileName)) { @@ -218,9 +224,20 @@ namespace MatterHackers.MatterControl { } } - else // check if it is in the shipping data for the application + else // We could not find it in the cache. Check if it is in static data. { - + if (File.Exists(textFileName)) + { + try + { + textFileName = AggContext.StaticData.ReadAllText(Path.Combine("Text_OverRide", longHash.ToString() + ".txt")); + fileText = File.ReadAllText(textFileName); + updateResult?.Invoke(fileText); + } + catch + { + } + } } Task.Run(async () => From 195888c8f8abe1c9485a3e326c71643236a03c15 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Thu, 21 May 2020 17:29:20 -0700 Subject: [PATCH 4/4] Setting default data --- MatterControlLib/Utilities/WebUtilities/WebCache.cs | 4 ++-- StaticData/TextWebCache/14370143712707808004.txt | 8 ++++++++ StaticData/TextWebCache/16850359717535514059.txt | 8 ++++++++ StaticData/TextWebCache/6348908994093189185.txt | 7 +++++++ StaticData/TextWebCache/6961625565010039837.txt | 8 ++++++++ StaticData/TextWebCache/7534963483184316047.txt | 8 ++++++++ 6 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 StaticData/TextWebCache/14370143712707808004.txt create mode 100644 StaticData/TextWebCache/16850359717535514059.txt create mode 100644 StaticData/TextWebCache/6348908994093189185.txt create mode 100644 StaticData/TextWebCache/6961625565010039837.txt create mode 100644 StaticData/TextWebCache/7534963483184316047.txt diff --git a/MatterControlLib/Utilities/WebUtilities/WebCache.cs b/MatterControlLib/Utilities/WebUtilities/WebCache.cs index 31c54dac0..cf4b17290 100644 --- a/MatterControlLib/Utilities/WebUtilities/WebCache.cs +++ b/MatterControlLib/Utilities/WebUtilities/WebCache.cs @@ -209,7 +209,7 @@ namespace MatterHackers.MatterControl // change to a path that makes it easy to collect up all the text we want to ship with MC if (checkStaticData) { - textFileName = ApplicationController.CacheablePath("Text_OverRide", longHash.ToString() + ".txt"); + textFileName = ApplicationController.CacheablePath("TextWebCache", longHash.ToString() + ".txt"); } string fileText = null; @@ -230,7 +230,7 @@ namespace MatterHackers.MatterControl { try { - textFileName = AggContext.StaticData.ReadAllText(Path.Combine("Text_OverRide", longHash.ToString() + ".txt")); + textFileName = AggContext.StaticData.ReadAllText(Path.Combine("TextWebCache", longHash.ToString() + ".txt")); fileText = File.ReadAllText(textFileName); updateResult?.Invoke(fileText); } diff --git a/StaticData/TextWebCache/14370143712707808004.txt b/StaticData/TextWebCache/14370143712707808004.txt new file mode 100644 index 000000000..bd7f3e8ec --- /dev/null +++ b/StaticData/TextWebCache/14370143712707808004.txt @@ -0,0 +1,8 @@ +## Reduce is Locked + +To Unlock upgrade to MatterControl Pro: + +MatterControl Pro includes: +- Professional support provided by MatterHackers +- Unlimited storage of your designs in Cloud Library +- Expanding set of Pro Design Tools diff --git a/StaticData/TextWebCache/16850359717535514059.txt b/StaticData/TextWebCache/16850359717535514059.txt new file mode 100644 index 000000000..1acd68d1a --- /dev/null +++ b/StaticData/TextWebCache/16850359717535514059.txt @@ -0,0 +1,8 @@ +## Gear is Locked + +To Unlock upgrade to MatterControl Pro: + +MatterControl Pro includes: +- Professional support provided by MatterHackers +- Unlimited storage of your designs in Cloud Library +- Expanding set of Pro Design Tools diff --git a/StaticData/TextWebCache/6348908994093189185.txt b/StaticData/TextWebCache/6348908994093189185.txt new file mode 100644 index 000000000..72fb6c99e --- /dev/null +++ b/StaticData/TextWebCache/6348908994093189185.txt @@ -0,0 +1,7 @@ +# Upgrade to [MatterControl Pro](https://www.matterhackers.com/admin/product-preview/ag1zfm1oLXBscy1wcm9kchsLEg5Qcm9kdWN0TGlzdGluZxiAgIC_65WICww) + +MatterControl Pro includes: +- All the great features of MatterControl +- Professional support provided by MatterHackers +- Unlimited storage of your designs in Cloud Library +- Access to the expanding set of Pro features diff --git a/StaticData/TextWebCache/6961625565010039837.txt b/StaticData/TextWebCache/6961625565010039837.txt new file mode 100644 index 000000000..c78a552dd --- /dev/null +++ b/StaticData/TextWebCache/6961625565010039837.txt @@ -0,0 +1,8 @@ +## Hollow Out is Locked + +To Unlock upgrade to MatterControl Pro: + +MatterControl Pro includes: +- Professional support provided by MatterHackers +- Unlimited storage of your designs in Cloud Library +- Expanding set of Pro Design Tools diff --git a/StaticData/TextWebCache/7534963483184316047.txt b/StaticData/TextWebCache/7534963483184316047.txt new file mode 100644 index 000000000..a0ce94419 --- /dev/null +++ b/StaticData/TextWebCache/7534963483184316047.txt @@ -0,0 +1,8 @@ +## Repair is Locked + +To Unlock upgrade to MatterControl Pro: + +MatterControl Pro includes: +- Professional support provided by MatterHackers +- Unlimited storage of your designs in Cloud Library +- Expanding set of Pro Design Tools