Use EventHandler<StringEventArgs> for SettingChanged event

- Issue MatterHackers/MCCentral#4730
Event should declare specialized EventArgs used via EventHandler<T>
This commit is contained in:
John Lewin 2018-12-20 12:38:05 -08:00
parent b6d30bf781
commit f06e67a65e
19 changed files with 37 additions and 41 deletions

View file

@ -93,10 +93,9 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
uiField.Content.VAnchor = VAnchor.Center;
totalContent.AddChild(uiField.Content);
void Printer_SettingChanged(object s, EventArgs e)
void Printer_SettingChanged(object s, StringEventArgs stringArgs)
{
if (e is StringEventArgs stringArgs
&& stringArgs.Data == settingData.SlicerConfigName)
if (stringArgs.Data == settingData.SlicerConfigName)
{
string newSliceSettingValue = printer.Settings.GetValue(settingData.SlicerConfigName);