Make eeprom setting disabled if not connected

issue: MatterHackers/MCCentral#3628
"Configure EEPROM" should be disabled when printer is not connected
This commit is contained in:
Lars Brubaker 2018-06-15 11:11:49 -07:00
parent 407a7d1388
commit e149b76d56

View file

@ -287,29 +287,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
{
Icon = AggContext.StaticData.LoadIcon("memory_16x16.png", 16, 16, theme.InvertIcons),
Title = "Configure EEProm".Localize(),
Action = configureEePromButton_Click
Action = configureEePromButton_Click,
IsEnabled = () => printer.Connection.IsConnected
},
//new NamedAction()
//{
// Title = "Rename Printer".Localize(),
// Action = () =>
// {
// DialogWindow.Show(
// new InputBoxPage(
// "Rename Printer".Localize(),
// "Name".Localize(),
// printer.Settings.GetValue(SettingsKey.printer_name),
// "Enter New Name Here".Localize(),
// "Rename".Localize(),
// (newName) =>
// {
// if (!string.IsNullOrEmpty(newName))
// {
// printer.Settings.SetValue(SettingsKey.printer_name, newName);
// }
// }));
// }
//},
new NamedBoolAction()
{
Title = "Configure Printer".Localize(),