Esempio n. 1
0
        /// <summary>
        /// Disconnects everything inside this class
        /// </summary>
        public virtual void Disconnect()
        {
/*			lastItems = null;
 *                      UnsetDragFunctionality();
 *                      onListCellDescription = null;
 *                      if (listadaptor != null) {
 *                              listadaptor.OnListChanged -= DSChanged;
 *                              listadaptor.OnElementAdded -= DSElementAdded;
 *                              listadaptor.OnElementChanged -= DSElementChanged;
 *                              listadaptor.OnElementRemoved -= DSElementRemoved;
 *                              listadaptor.OnTargetChange -= ListTargetChanged;
 *                              listadaptor.Disconnect();
 *                              listadaptor = null;
 *                      }*/
            if (CurrentSelection != null)
            {
                CurrentSelection.Disconnect();
                currentSelection = null;
            }
            if (adaptor != null)
            {
                adaptor.Disconnect();
                adaptor = null;
            }
            internalModel.Disconnect();
            internalModel = null;
//			cachedItems = null;
        }
 /// <summary>
 /// Creates Widget 
 /// </summary>
 /// <param name="aMappings">
 /// Mappings with this widget <see cref="System.String"/>
 /// </param>
 public DataEntryReferenceVM(string aMappings)
     : base()
 {
     internalModel = new MappingsImplementor (this);
     CreateAdaptors ();
     Mappings = aMappings;
 }
Esempio n. 3
0
        /// <summary>
        /// Creates query implementor for specific class, first turn of checking is
        /// restricted to direct type handling, second turn checks for model that
        /// handles this type with inheritance in mind
        /// </summary>
        /// <param name="aOwnerModel">
        /// A <see cref="MappingImplementor"/>
        /// </param>
        /// <param name="aDataSource">
        /// A <see cref="System.Object"/>
        /// </param>
        /// <returns>
        /// A <see cref="QueryImplementor"/>
        /// </returns>
        public static QueryImplementor CreateModelFor(MappingsImplementor aOwnerModel, object aDataSource)
        {
            if (aDataSource == null)
            {
                return(null);
            }

            // Check if explicit handler exists
            foreach (QueryModelDescription desc in models)
            {
                if (desc.Definition.ListType == aDataSource.GetType())
                {
                    return(desc.CreateModel(aOwnerModel));
                }
            }

            // Check if generic handler exists
            foreach (QueryModelDescription desc in models)
            {
                if (desc.HandlesType(aDataSource.GetType()) == true)
                {
                    return(desc.CreateModel(aOwnerModel));
                }
            }

            return(null);
        }
Esempio n. 4
0
 /// <summary>
 /// Creates Widget
 /// </summary>
 /// <param name="aMappings">
 /// Mappings with this widget <see cref="System.String"/>
 /// </param>
 public DataTreeView(string aMappings)
     : base()
 {
     internalModel = new MappingsImplementor(this);
     CreateAdaptors();
     Mappings = aMappings;
 }
Esempio n. 5
0
 /// <summary>
 /// Creates Widget
 /// </summary>
 /// <param name="aMappings">
 /// Mappings with this widget <see cref="System.String"/>
 /// </param>
 public DataComboBoxEntry(string aMappings)
     : base()
 {
     internalModel = new MappingsImplementor(this);
     CreateAdaptors();
     Mappings = aMappings;
 }
 /// <summary>
 /// Creates Widget 
 /// </summary>
 /// <param name="aDataSource">
 /// DataSource connected to this widget <see cref="System.Object"/>
 /// </param>
 /// <param name="aMappings">
 /// Mappings with this widget <see cref="System.String"/>
 /// </param>
 public DataEntryReferenceVM(object aDataSource, string aMappings)
     : base()
 {
     internalModel = new MappingsImplementor (this);
     CreateAdaptors ();
     DataSource = aDataSource;
     Mappings = aMappings;
 }
Esempio n. 7
0
 /// <summary>
 /// Creates Widget
 /// </summary>
 /// <param name="aDataSource">
 /// DataSource connected to this widget <see cref="System.Object"/>
 /// </param>
 /// <param name="aMappings">
 /// Mappings with this widget <see cref="System.String"/>
 /// </param>
 public DataTreeView(object aDataSource, string aMappings)
     : base()
 {
     internalModel = new MappingsImplementor(this);
     CreateAdaptors();
     DataSource = aDataSource;
     Mappings   = aMappings;
 }
Esempio n. 8
0
 /// <summary>
 /// Creates Widget
 /// </summary>
 public DataComboBox()
     : base()
 {
     internalModel = new MappingsImplementor(this);
     internalModel.RespectHierarchy = true;
     //FIXME: Make possibility to use false value. Now it leads to no items in combo.
     CreateAdaptors();
 }
Esempio n. 9
0
 public QueryImplementor(MappingsImplementor aMasterImplementor)
 {
     if (aMasterImplementor == null)
     {
         throw new NullReferenceException("MasterImplementor has to be set for QueryImplementor");
     }
     masterImplementor = aMasterImplementor;
 }
Esempio n. 10
0
 public IListTreeModel(MappingsImplementor aMasterImplementor)
     : base(aMasterImplementor)
 {
     if (Items != null)
     {
         if (TypeValidator.IsCompatible(Items.GetType(), typeof(DbObservableList)) == true)
         {
             HasDeletedItems = true;
         }
     }
 }
Esempio n. 11
0
 /// <summary>
 /// Disconnects everything inside this class
 /// </summary>
 public virtual void Disconnect()
 {
     if (CurrentSelection != null)
     {
         CurrentSelection.Disconnect();
         currentSelection = null;
     }
     if (adaptor != null)
     {
         adaptor.Disconnect();
         adaptor = null;
     }
     internalModel.Disconnect();
     internalModel = null;
 }
Esempio n. 12
0
 public DataTableTreeModel(MappingsImplementor aMasterImplementor)
     : base(aMasterImplementor)
 {
     HasDeletedItems = true;
 }
		public MemberDevelopmentInformationQueryModel (MappingsImplementor aMasterImplementor)
			: base (aMasterImplementor)
		{
		}
Esempio n. 14
0
 /// <summary>
 /// Creates Widget
 /// </summary>
 public DataIconView()
     : base()
 {
     internalModel = new MappingsImplementor(this);
     CreateAdaptors();
 }
		public NullTreeModel (MappingsImplementor aMasterImplementor)
			: base (aMasterImplementor)
		{
		}
		public DataTableTreeModel (MappingsImplementor aMasterImplementor)
			: base (aMasterImplementor)
		{
			HasDeletedItems = true;
		}
		/// <summary>
		/// Disconnects everything inside this class
		/// </summary>
		public virtual void Disconnect ()
		{
			if (CurrentSelection != null) {
				CurrentSelection.Disconnect ();
				currentSelection = null;
			}
			if (adaptor != null) {
				adaptor.Disconnect ();
				adaptor = null;
			}
			internalModel.Disconnect ();
			internalModel = null;
		}
		/// <summary>
		/// Creates new model based on Model type
		/// </summary>
		/// <param name="aImplementor">
		/// Master implementor <see cref="MappingsImplemetor"/>
		/// </param>
		/// <returns>
		/// New query implementor <see cref="QueryImplementor"/>
		/// </returns>
		public QueryImplementor CreateModel (MappingsImplementor aImplementor)
		{
			return ((QueryImplementor) constructor.Invoke (new object[1] {aImplementor}));
		}
		/// <summary>
		/// Creates Widget 
		/// </summary>
		/// <param name="aMappings">
		/// Mappings with this widget <see cref="System.String"/>
		/// </param>
		public DataIconView (string aMappings)
			: base()
		{
			internalModel = new MappingsImplementor (this);
			CreateAdaptors();
			Mappings = aMappings;
		}
 public HierarchicalShellQueryModel(MappingsImplementor aMasterImplementor)
     : base(aMasterImplementor)
 {
 }
Esempio n. 21
0
 /// <summary>
 /// Creates new model based on Model type
 /// </summary>
 /// <param name="aImplementor">
 /// Master implementor <see cref="MappingsImplemetor"/>
 /// </param>
 /// <returns>
 /// New query implementor <see cref="QueryImplementor"/>
 /// </returns>
 public QueryImplementor CreateModel(MappingsImplementor aImplementor)
 {
     return((QueryImplementor)constructor.Invoke(new object[1] {
         aImplementor
     }));
 }
		/// <summary>
		/// Creates Widget 
		/// </summary>
		public DataComboBox ()
			: base ()
		{
			internalModel = new MappingsImplementor (this);
			internalModel.RespectHierarchy = true;
			//FIXME: Make possibility to use false value. Now it leads to no items in combo. 
			CreateAdaptors ();
		}
Esempio n. 23
0
 public ArrayQueryModel(MappingsImplementor aMasterImplementor)
     : base(aMasterImplementor)
 {
 }
Esempio n. 24
0
 public LinearListShellQueryModel(MappingsImplementor aMasterImplementor)
     : base(aMasterImplementor)
 {
 }
		/// <summary>
		/// Disconnects everything inside this class
		/// </summary>
		public virtual void Disconnect()
		{
/*			lastItems = null;
			UnsetDragFunctionality();
			onListCellDescription = null;
			if (listadaptor != null) {
				listadaptor.OnListChanged -= DSChanged;
				listadaptor.OnElementAdded -= DSElementAdded;
				listadaptor.OnElementChanged -= DSElementChanged;
				listadaptor.OnElementRemoved -= DSElementRemoved;
				listadaptor.OnTargetChange -= ListTargetChanged;
				listadaptor.Disconnect();
				listadaptor = null;
			}*/
			if (CurrentSelection != null) {
				CurrentSelection.Disconnect();
				currentSelection = null;
			}
			if (adaptor != null) {
				adaptor.Disconnect();
				adaptor = null;
			}
			internalModel.Disconnect();
			internalModel = null;
//			cachedItems = null;
		}
Esempio n. 26
0
 public AssemblyDevelopmentInformationQueryModel(MappingsImplementor aMasterImplementor)
     : base(aMasterImplementor)
 {
 }
		public LinearListShellQueryModel (MappingsImplementor aMasterImplementor)
			: base (aMasterImplementor)
		{
		}
Esempio n. 28
0
 public NullTreeModel(MappingsImplementor aMasterImplementor)
     : base(aMasterImplementor)
 {
 }