Revise Settings.json changes
- Reuse SliceSettingsOrganizer.GetDefaultSettings - Remove SavePropertiesJson
This commit is contained in:
parent
c6e0cca395
commit
76dcc4a072
3 changed files with 6 additions and 35 deletions
|
|
@ -282,24 +282,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
//throw new Exception("You must not have a layout for a setting that is not in the Properties.txt");
|
||||
}
|
||||
|
||||
public void SavePropertiesJson()
|
||||
{
|
||||
SettingsLayer baseLayer = ActiveSliceSettings.Instance.BaseLayer;
|
||||
|
||||
foreach (KeyValuePair<string, string> keyValue in baseLayer)
|
||||
{
|
||||
foreach(OrganizerSettingsData setting in SettingsData)
|
||||
{
|
||||
if(setting.SlicerConfigName == keyValue.Key)
|
||||
{
|
||||
setting.DefaultValue = keyValue.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
string propertiesFileContents = JsonConvert.SerializeObject(SettingsData, Formatting.Indented);
|
||||
File.WriteAllText("Properties.json", propertiesFileContents);
|
||||
}
|
||||
|
||||
private void LoadAndParseSettingsFiles()
|
||||
{
|
||||
string propertiesFileContents = StaticData.Instance.ReadAllText(Path.Combine("SliceSettings", "Properties.json"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue