Merge pull request #1719 from larsbrubaker/master
Refactored network printing settings to match the other printer settings
This commit is contained in:
commit
52fcf0e720
6 changed files with 32 additions and 33 deletions
|
|
@ -2606,7 +2606,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
|
|||
|
||||
private bool IsNetworkPrinting()
|
||||
{
|
||||
return ActiveSliceSettings.Instance.GetValue(SettingsKey.enable_network_printing) == "1";
|
||||
return ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.enable_network_printing);
|
||||
}
|
||||
|
||||
private void OnAtxPowerStateChanged(bool enableAtxPower)
|
||||
|
|
|
|||
|
|
@ -53,15 +53,15 @@ namespace MatterHackers.MatterControl
|
|||
int tabIndex = 0;
|
||||
AddNameSetting(SettingsKey.printer_name, contentRow, ref tabIndex);
|
||||
AddNameSetting(SettingsKey.auto_connect, contentRow, ref tabIndex);
|
||||
AddNameSetting(SettingsKey.baud_rate, contentRow, ref tabIndex);
|
||||
//Check if networked printing is on before displaying comport or ip/port
|
||||
if(ActiveSliceSettings.Instance.GetValue(SettingsKey.enable_network_printing)=="1")
|
||||
if(ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.enable_network_printing))
|
||||
{
|
||||
AddNameSetting(SettingsKey.ip_address, contentRow, ref tabIndex);
|
||||
AddNameSetting(SettingsKey.ip_port, contentRow, ref tabIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddNameSetting(SettingsKey.baud_rate, contentRow, ref tabIndex);
|
||||
AddNameSetting(SettingsKey.com_port, contentRow, ref tabIndex);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ Simple
|
|||
auto_connect
|
||||
baud_rate
|
||||
com_port
|
||||
ip_address
|
||||
ip_port
|
||||
Intermediate
|
||||
General
|
||||
Layers / Surface
|
||||
|
|
@ -77,6 +79,8 @@ Intermediate
|
|||
auto_connect
|
||||
baud_rate
|
||||
com_port
|
||||
ip_address
|
||||
ip_port
|
||||
Advanced
|
||||
General
|
||||
Layers / Surface
|
||||
|
|
@ -284,8 +288,6 @@ Advanced
|
|||
printer_name
|
||||
Details
|
||||
auto_connect
|
||||
enable_network_printing
|
||||
enable_sailfish_communication
|
||||
baud_rate
|
||||
com_port
|
||||
ip_address
|
||||
|
|
@ -308,6 +310,8 @@ Advanced
|
|||
has_heated_bed
|
||||
has_sd_card_reader
|
||||
has_power_control
|
||||
enable_network_printing
|
||||
enable_sailfish_communication
|
||||
Behavior
|
||||
z_homes_to_max
|
||||
z_can_be_negative
|
||||
|
|
|
|||
|
|
@ -2463,7 +2463,7 @@
|
|||
"DataEditType": "INT",
|
||||
"ExtraSettings": "",
|
||||
"ShowAsOverride": false,
|
||||
"ShowIfSet": null,
|
||||
"ShowIfSet": "!enable_network_printing",
|
||||
"ResetAtEndOfPrint": false,
|
||||
"DefaultValue": "250000",
|
||||
"RebuildGCodeOnChange": false
|
||||
|
|
@ -2578,17 +2578,6 @@
|
|||
},
|
||||
{
|
||||
"QuickMenuSettings": [ ],
|
||||
"SetSettingsOnChange": [
|
||||
{
|
||||
"TargetSetting": "driver_type",
|
||||
"OnValue": "TCPIP",
|
||||
"OffValue": "RepRap"
|
||||
},
|
||||
{
|
||||
"TargetSetting": "enable_sailfish_communication",
|
||||
"OnValue": "0"
|
||||
}
|
||||
],
|
||||
"SlicerConfigName": "enable_network_printing",
|
||||
"PresentationName": "Networked Printing",
|
||||
"HelpText": "Sets MatterControl to attempt to connect to a printer over the network. (You must disconnect and reconnect for this to take effect)",
|
||||
|
|
@ -2596,24 +2585,20 @@
|
|||
"ExtraSettings": "",
|
||||
"ShowAsOverride": true,
|
||||
"ShowIfSet": null,
|
||||
"SetSettingsOnChange": [
|
||||
{
|
||||
"TargetSetting": "driver_type",
|
||||
"OnValue": "TCPIP",
|
||||
"OffValue": "RepRap"
|
||||
}
|
||||
],
|
||||
"ResetAtEndOfPrint": false,
|
||||
"DefaultValue": "0",
|
||||
"RebuildGCodeOnChange": false,
|
||||
"ReloadUiWhenChanged": true
|
||||
},
|
||||
{
|
||||
{
|
||||
"QuickMenuSettings": [ ],
|
||||
"SetSettingsOnChange": [
|
||||
{
|
||||
"TargetSetting": "driver_type",
|
||||
"OnValue": "X3G",
|
||||
"OffValue": "RepRap"
|
||||
},
|
||||
{
|
||||
"TargetSetting": "enable_network_printing",
|
||||
"OnValue": "0"
|
||||
}
|
||||
],
|
||||
"SlicerConfigName": "enable_sailfish_communication",
|
||||
"PresentationName": "Sailfish Communication",
|
||||
"HelpText": "Sets MatterControl to use s3g communication method. (You must disconnect and reconnect for this to take effect)",
|
||||
|
|
@ -2621,6 +2606,13 @@
|
|||
"ExtraSettings": "",
|
||||
"ShowAsOverride": true,
|
||||
"ShowIfSet": null,
|
||||
"SetSettingsOnChange": [
|
||||
{
|
||||
"TargetSetting": "driver_type",
|
||||
"OnValue": "X3G",
|
||||
"OffValue": "RepRap"
|
||||
}
|
||||
],
|
||||
"ResetAtEndOfPrint": false,
|
||||
"DefaultValue": "0",
|
||||
"RebuildGCodeOnChange": false,
|
||||
|
|
@ -2634,7 +2626,7 @@
|
|||
"HelpText": "IP Address of printer/printer controller",
|
||||
"DataEditType": "STRING",
|
||||
"ExtraSettings": "",
|
||||
"ShowAsOverride": true,
|
||||
"ShowAsOverride": false,
|
||||
"ShowIfSet": "enable_network_printing",
|
||||
"ResetAtEndOfPrint": false,
|
||||
"DefaultValue": "127.0.0.1",
|
||||
|
|
@ -2645,10 +2637,10 @@
|
|||
"SetSettingsOnChange": [ ],
|
||||
"SlicerConfigName": "ip_port",
|
||||
"PresentationName": "Port",
|
||||
"HelpText": "Port number to be used with IP Adress to connect to printer over the network",
|
||||
"HelpText": "Port number to be used with IP Address to connect to printer over the network",
|
||||
"DataEditType": "INT",
|
||||
"ExtraSettings": "",
|
||||
"ShowAsOverride": true,
|
||||
"ShowAsOverride": false,
|
||||
"ShowIfSet": "enable_network_printing",
|
||||
"ResetAtEndOfPrint": false,
|
||||
"DefaultValue": "23",
|
||||
|
|
|
|||
|
|
@ -5653,3 +5653,6 @@ Translated:Show In Action Menu
|
|||
English:Unable to Connect
|
||||
Translated:Unable to Connect
|
||||
|
||||
English:Port number to be used with IP Address to connect to printer over the network
|
||||
Translated:Port number to be used with IP Address to connect to printer over the network
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit a4a07ad3397766f5c67cf5f53bc5ea5ecd479150
|
||||
Subproject commit f676c35a6660435156d8069da691ddedff8e2aee
|
||||
Loading…
Add table
Add a link
Reference in a new issue