diff --git a/MatterControlLib/Library/Widgets/AddMaterialWidget.cs b/MatterControlLib/Library/Widgets/AddMaterialWidget.cs index 7d021131d..af0fff072 100644 --- a/MatterControlLib/Library/Widgets/AddMaterialWidget.cs +++ b/MatterControlLib/Library/Widgets/AddMaterialWidget.cs @@ -174,7 +174,7 @@ namespace MatterHackers.MatterControl.Library.Widgets { var treeNode = new TreeNode(theme) { - Text = Path.GetFileName(directory), + Text = Path.GetFileName(directory).Replace("_", " ").Trim(), }; foreach (var subDirectory in Directory.EnumerateDirectories(directory).OrderBy(f => Path.GetFileName(f))) @@ -186,7 +186,7 @@ namespace MatterHackers.MatterControl.Library.Widgets { var materialToAdd = PrinterSettings.LoadFile(materialFile); var name = materialToAdd.MaterialLayers[0].Name; - var fileName = Path.GetFileNameWithoutExtension(materialFile); + var fileName = Path.GetFileNameWithoutExtension(materialFile).Replace("_", " ").Trim(); var sku = ""; if (materialToAdd.MaterialLayers[0].ContainsKey(SettingsKey.material_sku)) { @@ -249,6 +249,32 @@ namespace MatterHackers.MatterControl.Library.Widgets Margin = new BorderDouble(0, 7) }); + var settingsBackground = new GuiWidget() + { + Name = "Bacground", + HAnchor = HAnchor.Stretch, + VAnchor = VAnchor.Fit + }; + + var settingsHolder = settingsBackground.AddChild(new FlowLayoutWidget(FlowDirection.TopToBottom) + { + Name = "Holder", + HAnchor = HAnchor.Stretch, + }); + + var settingsCover = settingsBackground.AddChild(new GuiWidget() + { + Name = "Cover", + HAnchor = HAnchor.Stretch, + }); + + settingsHolder.SizeChanged += (s5, e5) => + { + settingsCover.Height = settingsHolder.Height; + }; + + printerDetails.ProductDataContainer.AddChild(settingsBackground); + var printerProfile = PrinterSettings.LoadFile(SelectedMaterial.Path); printerProfile.OemLayer = new PrinterSettingsLayer(); // move all the settings to the oem layer @@ -279,7 +305,7 @@ namespace MatterHackers.MatterControl.Library.Widgets { lastCategory = setting.category; // add a new setting header - printerDetails.ProductDataContainer.AddChild(new TextWidget(setting.category.Localize() + " " + "Settings".Localize() + ":", 0, 0, bold: true) + settingsHolder.AddChild(new TextWidget(setting.category.Localize() + " " + "Settings".Localize() + ":", 0, 0, bold: true) { TextColor = theme.TextColor, Margin = new BorderDouble(0, 5, 0, 7) @@ -292,10 +318,10 @@ namespace MatterHackers.MatterControl.Library.Widgets if (row is SliceSettingsRow settingsRow) { settingsRow.ArrowDirection = ArrowDirection.Left; - settingsRow.Enabled = false; + settingsRow.Enabled = true; } - printerDetails.ProductDataContainer.AddChild(row); + settingsHolder.AddChild(row); } }; diff --git a/MatterControlLib/SlicerConfiguration/PresetSelectorWidget.cs b/MatterControlLib/SlicerConfiguration/PresetSelectorWidget.cs index 1d068438f..09efdb50e 100644 --- a/MatterControlLib/SlicerConfiguration/PresetSelectorWidget.cs +++ b/MatterControlLib/SlicerConfiguration/PresetSelectorWidget.cs @@ -272,6 +272,16 @@ namespace MatterHackers.MatterControl.SlicerConfiguration "new", pointSize: theme.DefaultFontSize); + var selectedIndex = dropDownList.SelectedIndex; + + dropDownList.SelectionChanged += (s3, e3) => + { + if (dropDownList.SelectedIndex < dropDownList.MenuItems.Count - 1) + { + selectedIndex = dropDownList.SelectedIndex; + } + }; + addNewPreset.Selected += (s, e) => { if (layerType == NamedSettingsLayers.Material) @@ -294,6 +304,14 @@ namespace MatterHackers.MatterControl.SlicerConfiguration editButton.InvokeClick(); })); + + window.Closed += (s2, e2) => + { + if (dropDownList.SelectedIndex >= dropDownList.MenuItems.Count - 1) + { + dropDownList.SelectedIndex = selectedIndex < dropDownList.MenuItems.Count - 1 ? selectedIndex : 0; + } + }; } else { diff --git a/StaticData/Materials/Filamentum/CPE HG100.material b/StaticData/Materials/Filamentum/CPE HG100.material new file mode 100644 index 000000000..1679d6ad3 --- /dev/null +++ b/StaticData/Materials/Filamentum/CPE HG100.material @@ -0,0 +1,34 @@ +{ + "DocumentVersion": 201606271, + "ID": null, + "Macros": [], + "MaterialLayers": [ + { + "layer_name": "Filamentum CPE HG100", + "layer_id": "dbbf12f0-4237-41e8-b15e-85436d833fcc", + "temperature": "245", + "filament_density": "1.28", + "bed_temperature": "75", + "bridge_fan_speed": "25", + "max_fan_speed": "100", + "min_fan_speed": "35", + "min_fan_speed_layer_time": "25", + "max_fan_speed_layer_time": "10", + "layer_etag": "", + "layer_source": "", + "extrusion_multiplier": "0.95", + "filament_cost": "24.99", + "bed_temperature_buildtak": "55", + "bed_temperature_garolite": "75", + "bed_temperature_glass": "75", + "bed_temperature_kapton": "75", + "bed_temperature_pei": "75", + "bed_temperature_pp": "55", + "material_sku": "MHSXGFA0" + } + ], + "OemLayer": null, + "QualityLayers": [], + "StagedUserSettings": {}, + "UserLayer": {} +} \ No newline at end of file diff --git a/StaticData/Materials/Generic/ABS.material b/StaticData/Materials/General/ABS.material similarity index 100% rename from StaticData/Materials/Generic/ABS.material rename to StaticData/Materials/General/ABS.material diff --git a/StaticData/Materials/Generic/Nylon.material b/StaticData/Materials/General/Nylon.material similarity index 100% rename from StaticData/Materials/Generic/Nylon.material rename to StaticData/Materials/General/Nylon.material diff --git a/StaticData/Materials/Generic/PETg.material b/StaticData/Materials/General/PETg.material similarity index 100% rename from StaticData/Materials/Generic/PETg.material rename to StaticData/Materials/General/PETg.material diff --git a/StaticData/Materials/Generic/PLA.material b/StaticData/Materials/General/PLA.material similarity index 100% rename from StaticData/Materials/Generic/PLA.material rename to StaticData/Materials/General/PLA.material diff --git a/StaticData/Materials/MatterHackers/Build Series/ABS.material b/StaticData/Materials/_MatterHackers/Build Series/ABS.material similarity index 100% rename from StaticData/Materials/MatterHackers/Build Series/ABS.material rename to StaticData/Materials/_MatterHackers/Build Series/ABS.material diff --git a/StaticData/Materials/MatterHackers/Build Series/PETg.material b/StaticData/Materials/_MatterHackers/Build Series/PETg.material similarity index 100% rename from StaticData/Materials/MatterHackers/Build Series/PETg.material rename to StaticData/Materials/_MatterHackers/Build Series/PETg.material diff --git a/StaticData/Materials/MatterHackers/Build Series/PLA.material b/StaticData/Materials/_MatterHackers/Build Series/PLA.material similarity index 100% rename from StaticData/Materials/MatterHackers/Build Series/PLA.material rename to StaticData/Materials/_MatterHackers/Build Series/PLA.material diff --git a/StaticData/Materials/MatterHackers/NylonG.material b/StaticData/Materials/_MatterHackers/NylonG.material similarity index 100% rename from StaticData/Materials/MatterHackers/NylonG.material rename to StaticData/Materials/_MatterHackers/NylonG.material diff --git a/StaticData/Materials/MatterHackers/NylonX.material b/StaticData/Materials/_MatterHackers/NylonX.material similarity index 100% rename from StaticData/Materials/MatterHackers/NylonX.material rename to StaticData/Materials/_MatterHackers/NylonX.material diff --git a/StaticData/Materials/MatterHackers/PRO Series/ABS.material b/StaticData/Materials/_MatterHackers/PRO Series/ABS.material similarity index 100% rename from StaticData/Materials/MatterHackers/PRO Series/ABS.material rename to StaticData/Materials/_MatterHackers/PRO Series/ABS.material diff --git a/StaticData/Materials/MatterHackers/PRO Series/Nylon.material b/StaticData/Materials/_MatterHackers/PRO Series/Nylon.material similarity index 100% rename from StaticData/Materials/MatterHackers/PRO Series/Nylon.material rename to StaticData/Materials/_MatterHackers/PRO Series/Nylon.material diff --git a/StaticData/Materials/MatterHackers/PRO Series/PLA.material b/StaticData/Materials/_MatterHackers/PRO Series/PLA.material similarity index 100% rename from StaticData/Materials/MatterHackers/PRO Series/PLA.material rename to StaticData/Materials/_MatterHackers/PRO Series/PLA.material diff --git a/StaticData/Materials/MatterHackers/PRO Series/RYNO.material b/StaticData/Materials/_MatterHackers/PRO Series/RYNO.material similarity index 100% rename from StaticData/Materials/MatterHackers/PRO Series/RYNO.material rename to StaticData/Materials/_MatterHackers/PRO Series/RYNO.material diff --git a/StaticData/Materials/MatterHackers/PRO Series/Tough PLA.material b/StaticData/Materials/_MatterHackers/PRO Series/Tough PLA.material similarity index 100% rename from StaticData/Materials/MatterHackers/PRO Series/Tough PLA.material rename to StaticData/Materials/_MatterHackers/PRO Series/Tough PLA.material diff --git a/StaticData/Materials/MatterHackers/Quantum PLA.material b/StaticData/Materials/_MatterHackers/Quantum PLA.material similarity index 100% rename from StaticData/Materials/MatterHackers/Quantum PLA.material rename to StaticData/Materials/_MatterHackers/Quantum PLA.material