/// <summary> /// Calls controls PutDataToDataSource, in case of gtk this handles being called /// in the right thread /// </summary> /// <param name="aControl"> /// Control to call PutDataToDataSource <see cref="IChangeableControl"/> /// </param> /// <param name="aSender"> /// Sender object <see cref="System.Object"/> /// </param> /// <remarks> /// By overriding this method one can handle things differently. Specific /// example of this is GTK+ which needs to call control changes in its master thread /// </remarks> internal void InvokeControlDataChange(IPostableControl aControl, object aSender) { if (avoidPost == true) { return; } if (adaptor.IsControllingWidget == true) { if (CanPost == true) { if (SetState(EObserveableState.PostDataInProgress) == false) { return; } InvokeDirectControlDataChange(aControl, aSender); SetState(EObserveableState.None); } } }
/// <summary> /// Calls controls PutDataToDataSource, in case of gtk this handles being called /// in the right thread /// </summary> /// <param name="aControl"> /// Control to call PutDataToDataSource <see cref="IPostableControl"/> /// </param> /// <param name="aSender"> /// Sender object <see cref="System.Object"/> /// </param> /// <remarks> /// By overriding this method one can handle things differently. Specific /// example of this is GTK+ which needs to call control changes in its master thread /// </remarks> public virtual void InvokeDirectControlDataChange(IPostableControl aControl, object aSender) { if (TypeValidator.IsCompatible(aControl.GetType(), typeof(ICustomPostData)) == true) { if (ActivateUserPostData() == true) { return; } } // Since control will load new values clear flag that data has changed DataChanged = false; // Transfer data aControl.PutDataToDataSource(aSender); if (DisableMappingsDataTransfer == false) { if (TypeValidator.IsCompatible(adaptor.GetType(), typeof(Adaptor)) == true) { if ((adaptor as Adaptor).SingleMappingOnly == false) { PutValuesToDataSource(); } } } }