Changed the SettingsKeys from an enum to a static class of const strings.
This commit is contained in:
parent
9d0edb962c
commit
d83982089a
9 changed files with 48 additions and 51 deletions
|
|
@ -84,7 +84,7 @@ namespace MatterHackers.MatterControl
|
|||
if (ActiveSliceSettings.Instance != null)
|
||||
{
|
||||
this.SelectedValue = ActiveSliceSettings.Instance.ID;
|
||||
this.mainControlText.Text = ActiveSliceSettings.Instance.GetValue("MatterControl.PrinterName");
|
||||
this.mainControlText.Text = ActiveSliceSettings.Instance.GetValue(SettingsKey.MatterControl_PrinterName);
|
||||
}
|
||||
|
||||
this.AddItem(
|
||||
|
|
@ -96,11 +96,11 @@ namespace MatterHackers.MatterControl
|
|||
private void SettingChanged(object sender, EventArgs e)
|
||||
{
|
||||
string settingsName = (e as StringEventArgs)?.Data;
|
||||
if (settingsName != null && settingsName == "MatterControl.PrinterName")
|
||||
if (settingsName != null && settingsName == SettingsKey.MatterControl_PrinterName.ToString())
|
||||
{
|
||||
if (ProfileManager.Instance.ActiveProfile != null)
|
||||
{
|
||||
ProfileManager.Instance.ActiveProfile.Name = ActiveSliceSettings.Instance.GetValue("MatterControl.PrinterName");
|
||||
ProfileManager.Instance.ActiveProfile.Name = ActiveSliceSettings.Instance.GetValue(SettingsKey.MatterControl_PrinterName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue