public void removeEventListener(QSetting setting, QSettingChangedHandler handler) { int settingId = (int)setting; if (settingChangedHandlerList.ContainsKey(settingId) && settingChangedHandlerList[settingId] != null) { settingChangedHandlerList[settingId] -= handler; } }
public void addEventListener(QSetting setting, QSettingChangedHandler handler) { int settingId = (int)setting; if (!settingChangedHandlerList.ContainsKey(settingId)) { settingChangedHandlerList.Add(settingId, null); } if (settingChangedHandlerList[settingId] == null) { settingChangedHandlerList[settingId] = handler; } else { settingChangedHandlerList[settingId] += handler; } }