Exemple #1
0
 /// <summary>
 /// Calls controls AdapteeDataChange, in case of gtk this handles being called
 /// in the right thread
 /// </summary>
 /// <param name="aControl">
 /// Control to call AdapteeDataChanged <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>
 public override void InvokeControlAdapteeDataChange(IChangeableControl aControl, object aSender)
 {
     if (controlAdapteeDataChangeIsInvoked)
     {
         return;
     }
     controlAdapteeDataChangeIsInvoked = true;
     Gtk.Application.Invoke(delegate {
         controlAdapteeDataChangeIsInvoked = false;
         base.InvokeControlAdapteeDataChange(aControl, aSender);
     });
 }
Exemple #2
0
 /// <summary>
 /// Calls controls GetDataFromDataSource, in case of gtk this handles being called
 /// in the right thread
 /// </summary>
 /// <param name="aControl">
 /// Control to call GetDataFromDataSource <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>
 public void InvokeAdapteeDataChange(IChangeableControl aControl, object aSender)
 {
     avoidPost = true;
     if (adaptor.IsControllingWidget == true)
     {
         if (CanGet == true)
         {
             if (SetState(EObserveableState.GetDataInProgress) == false)
             {
                 avoidPost = false;
                 return;
             }
             InvokeControlAdapteeDataChange(aControl, aSender);
             SetState(EObserveableState.None);
         }
     }
     avoidPost = false;
 }
Exemple #3
0
 /// <summary>
 /// Calls controls GetDataFromDataSource, in case of gtk this handles being called
 /// in the right thread
 /// </summary>
 /// <param name="aControl">
 /// Control to call GetDataFromDataSource <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>
 public virtual void InvokeControlAdapteeDataChange(IChangeableControl aControl, object aSender)
 {
     if (TypeValidator.IsCompatible(aControl.GetType(), typeof(ICustomGetData)) == true)
     {
         if (ActivateUserGetData() == true)
         {
             return;
         }
     }
     // Since control will load new values clear flag that data has changed
     DataChanged = false;
     // Transfer data
     aControl.GetDataFromDataSource(aSender);
     if (DisableMappingsDataTransfer == false)
     {
         if (TypeValidator.IsCompatible(adaptor.GetType(), typeof(Adaptor)) == true)
         {
             if ((adaptor as Adaptor).SingleMappingOnly == false)
             {
                 GetValuesFromDataSource();
             }
         }
     }
 }
		/// <summary>
		/// Calls controls AdapteeDataChange, in case of gtk this handles being called
		/// in the right thread
		/// </summary>
		/// <param name="aControl">
		/// Control to call AdapteeDataChanged <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>
		public override void InvokeControlAdapteeDataChange (IChangeableControl aControl, object aSender)
		{
			if (controlAdapteeDataChangeIsInvoked)
				return;
			controlAdapteeDataChangeIsInvoked = true;
			Gtk.Application.Invoke (delegate {
				controlAdapteeDataChangeIsInvoked = false;
				base.InvokeControlAdapteeDataChange (aControl, aSender);
			});
		}