Get updated profiles compiling on Android
- Remove unused properties from ApplicationView - Rename CompactApplicationView to TouchscreenView - Rename ResponsiveApplicationView to DesktopView - Move abstract ToggleTopContainer() specific to TouchscreenView - Remove unused HideTopContainer implementations - Conditionally compile invocation/assignment of ApplicationMenuRow - Migrate single setting from PrinterSettings "PublishBedImage" to SliceSettings - Remove PrinterSettings class - Import "PublishBedImage" during ImportPrinters - Remove code that doubles the size of the splitter bar when collapsed - Fix incorrect path to "config.ini"
This commit is contained in:
parent
a333961029
commit
5db7c79d00
16 changed files with 87 additions and 236 deletions
|
|
@ -143,9 +143,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
ActiveSliceSettings.LoadStartupProfile();
|
||||
}
|
||||
|
||||
public static void SetActiveProfileID(int id)
|
||||
public static void SetActiveProfileID(string id)
|
||||
{
|
||||
UserSettings.Instance.set("ActiveProfileID", id.ToString());
|
||||
UserSettings.Instance.set("ActiveProfileID", id);
|
||||
}
|
||||
|
||||
public static LayeredProfile LoadEmptyProfile()
|
||||
|
|
@ -191,7 +191,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
var profile = LoadProfile(id);
|
||||
|
||||
SetActiveProfileID(id);
|
||||
SetActiveProfileID(id.ToString());
|
||||
|
||||
if (profile != null)
|
||||
{
|
||||
|
|
@ -221,6 +221,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
printerProfile,
|
||||
baseConfig);
|
||||
layeredProfile.DocumentPath = Path.Combine(profilesPath, guid + ".json");
|
||||
layeredProfile.UserLayer["MatterControl.PrinterID"] = guid.ToString();
|
||||
layeredProfile.UserLayer["MatterControl.PrinterName"] = printerName;
|
||||
|
||||
layeredProfile.Save();
|
||||
|
||||
ProfileData.Profiles.Add(new PrinterInfo
|
||||
|
|
@ -229,6 +232,8 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
Id = guid
|
||||
});
|
||||
|
||||
SetActiveProfileID(guid);
|
||||
|
||||
Instance = new SettingsProfile(layeredProfile);
|
||||
}
|
||||
|
||||
|
|
@ -258,7 +263,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
string baseConfigPath = Path.Combine(profilesPath, "config.json");
|
||||
if(!File.Exists(baseConfigPath))
|
||||
{
|
||||
string configIniPath = StaticData.Instance.MapPath(Path.Combine("PrinterSettings", "config.ini"));
|
||||
string configIniPath = Path.Combine("PrinterSettings", "config.ini");
|
||||
|
||||
SettingsLayer baseLayer;
|
||||
|
||||
|
|
|
|||
|
|
@ -176,6 +176,11 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
return layeredProfile.GetQualityLayer(key);
|
||||
}
|
||||
|
||||
internal bool PublishBedImage()
|
||||
{
|
||||
return ActiveValue("MatterControl.PublishBedImage") == "1";
|
||||
}
|
||||
|
||||
internal void SetMaterialPreset(int extruderIndex, string text)
|
||||
{
|
||||
layeredProfile.SetMaterialPreset(extruderIndex, text);
|
||||
|
|
@ -844,7 +849,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
public void SetComPort(string port)
|
||||
{
|
||||
layeredProfile.SetActiveValue("MatterControl.ComPort", port);
|
||||
layeredProfile.UserLayer["MatterControl.ComPort"] = port;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue