Convert more string literals into SettingsKey constants

This commit is contained in:
John Lewin 2016-07-12 17:46:48 -07:00
parent bc0b040fe4
commit da695dc581
24 changed files with 101 additions and 82 deletions

View file

@ -49,11 +49,11 @@ namespace MatterHackers.MatterControl
textImageButtonFactory.normalBorderColor = RGBA_Bytes.White;
int tabIndex = 0;
AddNameSetting(SettingsKey.printer_name.ToString(), contentRow, ref tabIndex);
AddNameSetting("auto_connect", contentRow, ref tabIndex);
AddNameSetting("baud_rate", contentRow, ref tabIndex);
AddNameSetting("com_port", contentRow, ref tabIndex);
AddNameSetting("delete_printer", contentRow, ref tabIndex);
AddNameSetting(SettingsKey.printer_name, contentRow, ref tabIndex);
AddNameSetting(SettingsKey.auto_connect, contentRow, ref tabIndex);
AddNameSetting(SettingsKey.baud_rate, contentRow, ref tabIndex);
AddNameSetting(SettingsKey.com_port, contentRow, ref tabIndex);
AddNameSetting(SettingsKey.delete_printer, contentRow, ref tabIndex);
footerRow.AddChild(new HorizontalSpacer());
footerRow.AddChild(cancelButton);

View file

@ -142,7 +142,7 @@ namespace MatterHackers.MatterControl
internal void ChangeToSetupBaudOrComPortOne()
{
if (string.IsNullOrEmpty(PrinterConnectionAndCommunication.Instance?.ActivePrinter?.GetValue("baud_rate")))
if (string.IsNullOrEmpty(PrinterConnectionAndCommunication.Instance?.ActivePrinter?.GetValue(SettingsKey.baud_rate)))
{
ChangeToPage<SetupStepBaudRate>();
}