protected override void ActionLogic(EventSetting eventSetting) { int newSetting = GetNewInt("Enter new setting value:", "Event settings", eventSetting.GetValue().ToString()); if (newSetting != -1) { // Limits value to min/max value when present if (min != -1) { if (newSetting < min) { newSetting = min; } } if (max != -1) { if (newSetting > max) { newSetting = max; } } eventSetting.SetValue(newSetting); } }
public Boolean PerformAction(EventSetting setting) { if (!isActionPerformed) { ActionLogic(setting); isActionPerformed = true; return(true); } return(false); }
protected abstract void ActionLogic(EventSetting setting);