/// <summary> /// Initializes a view for ObsProperties. </summary> /// <param name="settings"> The source of properties. </param> /// <param name="context"> Owner of the settings, receives callbacks when a change occurs. </param> /// <param name="reloadDelegate"> Callback used for refreshing properties. </param> /// <param name="defaultsDelegate"> Optional: Callback used for reseting the settings to default values. </param> /// <param name="updateDelegate"> Optional: Callback used for notifying the object when update is needed. </param> public PropertiesView(ObsData settings, IObsContextData context, Func<ObsProperties> reloadDelegate, Func<ObsData> defaultsDelegate = null, Action<ObsData> updateDelegate = null) { InitializeComponent(); this.settings = settings; this.context = context; this.reloadDelegate = reloadDelegate; this.defaultsDelegate = defaultsDelegate; this.updateDelegate = updateDelegate; InitView(); }
/// <summary> /// Initializes a view for ObsProperties. </summary> /// <param name="settings"> The source of properties. </param> /// <param name="context"> Owner of the settings, receives callbacks when a change occurs. </param> /// <param name="reloadDelegate"> Callback used for refreshing properties. </param> /// <param name="defaultsDelegate"> Optional: Callback used for reseting the settings to default values. </param> /// <param name="updateDelegate"> Optional: Callback used for notifying the object when update is needed. </param> public PropertiesView(ObsData settings, IObsContextData context, Func <ObsProperties> reloadDelegate, Func <ObsData> defaultsDelegate = null, Action <ObsData> updateDelegate = null) { InitializeComponent(); this.settings = settings; this.context = context; this.reloadDelegate = reloadDelegate; this.defaultsDelegate = defaultsDelegate; this.updateDelegate = updateDelegate; InitView(); }