Put in the action menus and controls.

This commit is contained in:
Lars Brubaker 2016-12-08 15:39:23 -08:00
parent a9a5a9f476
commit d8d3e23522
11 changed files with 203 additions and 86 deletions

View file

@ -440,34 +440,6 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
//If the active printer has no theme we set it to the current theme color
printerSettings.UserLayer[SettingsKey.active_theme_name] = ActiveTheme.Instance.Name;
// Import named macros as defined in the following printers: (Airwolf Axiom, HD, HD-R, HD2x, HDL, HDx, Me3D Me2, Robo R1[+])
var classicDefaultMacros = printerSettings.GetValue("default_macros");
if (!string.IsNullOrEmpty(classicDefaultMacros))
{
var namedMacros = new Dictionary<string, string>();
namedMacros["Lights On"] = "M42 P6 S255";
namedMacros["Lights Off"] = "M42 P6 S0";
namedMacros["Offset 0.8"] = "M565 Z0.8;\nM500";
namedMacros["Offset 0.9"] = "M565 Z0.9;\nM500";
namedMacros["Offset 1"] = "M565 Z1;\nM500";
namedMacros["Offset 1.1"] = "M565 Z1.1;\nM500";
namedMacros["Offset 1.2"] = "M565 Z1.2;\nM500";
namedMacros["Z Offset"] = "G1 Z10;\nG28;\nG29;\nG1 Z10;\nG1 X5 Y5 F4000;\nM117;";
foreach (string namedMacro in classicDefaultMacros.Split(','))
{
string gcode;
if (namedMacros.TryGetValue(namedMacro.Trim(), out gcode))
{
printerSettings.Macros.Add(new GCodeMacro()
{
Name = namedMacro.Trim(),
GCode = gcode
});
}
}
}
// Add to Profiles - fires ProfileManager.Save due to ObservableCollection event listener
Instance.Profiles.Add(new PrinterInfo
{