当前位置: 首页>>代码示例>>C#>>正文


C# IControlFactory.CreateLookupComboBoxDefaultMapperStrategy方法代码示例

本文整理汇总了C#中IControlFactory.CreateLookupComboBoxDefaultMapperStrategy方法的典型用法代码示例。如果您正苦于以下问题:C# IControlFactory.CreateLookupComboBoxDefaultMapperStrategy方法的具体用法?C# IControlFactory.CreateLookupComboBoxDefaultMapperStrategy怎么用?C# IControlFactory.CreateLookupComboBoxDefaultMapperStrategy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IControlFactory的用法示例。


在下文中一共展示了IControlFactory.CreateLookupComboBoxDefaultMapperStrategy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EnumComboBoxMapper

 /// <summary>
 /// Instantiates a new mapper
 /// </summary>
 /// <param name="comboBox">The ComboBox to map</param>
 /// <param name="propName">The property name</param>
 /// <param name="isReadOnly">Whether this control is read only</param>
 /// <param name="factory">The control factory to be used when creating the controlMapperStrategy</param>
 public EnumComboBoxMapper(IComboBox comboBox, string propName, bool isReadOnly, IControlFactory factory) 
     : base(comboBox, propName, isReadOnly, factory)
 {
     _mapperStrategy = factory.CreateLookupComboBoxDefaultMapperStrategy();
     if (_mapperStrategy == null) return;
     _mapperStrategy.AddHandlers(this);
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:14,代码来源:EnumComboBoxMapper.cs

示例2: CollectionComboBoxMapper

 /// <summary>
 /// Constructor to initialise the mapper
 /// </summary>
 /// <param name="cbx">The ComboBox to map</param>
 /// <param name="propName">The property name</param>
 /// <param name="isReadOnly">Whether this control is read only</param>
 /// <param name="factory">The control factory to be used when creating the controlMapperStrategy</param>
 public CollectionComboBoxMapper(IComboBox cbx, string propName, bool isReadOnly, IControlFactory factory)
     : base(cbx, propName, isReadOnly, factory)
 {
     _comboBox = cbx;
     _mapperStrategy = factory.CreateLookupComboBoxDefaultMapperStrategy();
     _mapperStrategy.AddHandlers(this);
     _comboBoxCollectionSelector = new ComboBoxCollectionSelector(cbx, factory, false);
     _comboBoxCollectionSelector.PreserveSelectedItem = true;
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:16,代码来源:CollectionComboBoxMapper.cs

示例3: LookupComboBoxMapper

 /// <summary>
 /// Constructor to initialise the mapper
 /// </summary>
 /// <param name="cbx">The ComboBox to map</param>
 /// <param name="propName">The property name</param>
 /// <param name="isReadOnly">Whether this control is read only</param>
 /// <param name="factory">The control factory to be used when creating the controlMapperStrategy</param>
 public LookupComboBoxMapper(IComboBox cbx, string propName, bool isReadOnly, IControlFactory factory)
     : base(cbx, propName, isReadOnly, factory)
 {
     _comboBox = cbx;
     _mapperStrategy = factory.CreateLookupComboBoxDefaultMapperStrategy();
     if (_mapperStrategy == null) return;
     _mapperStrategy.AddHandlers(this);
     _collection = new Dictionary<string, string>();
 }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:16,代码来源:LookupComboBoxMapper.cs

示例4: BORelationshipMapper

        /// <summary>
        /// Constructs a <see cref="RelationshipComboBoxMapper"/> with the <paramref name="comboBox"/>
        ///  <paramref name="relationshipName"/>
        /// </summary>
        /// <param name="comboBox">The combo box that is being mapped to</param>
        /// <param name="relationshipName">The name of the relation that is being mapped to</param>
        /// <param name="isReadOnly">Whether the Combo box can be used to edit from or whether it is only viewable</param>
        /// <param name="controlFactory">A control factory that is used to create control mappers etc</param>
        public RelationshipComboBoxMapper
            (IComboBox comboBox, string relationshipName, bool isReadOnly, IControlFactory controlFactory)
        {
            if (comboBox == null) throw new ArgumentNullException("comboBox");
            if (relationshipName == null) throw new ArgumentNullException("relationshipName");
            if (controlFactory == null) throw new ArgumentNullException("controlFactory");

            IsReadOnly = isReadOnly;
            ControlFactory = controlFactory;
            Control = comboBox;
            RelationshipName = relationshipName;
            _boRelationshipMapper = new BORelationshipMapper(relationshipName);
            _boRelationshipMapper.RelationshipChanged += (sender, e) => OnMappedRelationshipChanged();
            
            _mapperStrategy = ControlFactory.CreateLookupComboBoxDefaultMapperStrategy();
            _mapperStrategy.AddHandlers(this);
            UpdateIsEditable();
            _comboBoxCollectionSelector = new ComboBoxCollectionSelector(comboBox, controlFactory, false)
                                              {PreserveSelectedItem = true};
            this.IncludeBlankItem = true;
        }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:29,代码来源:RelationshipComboBoxMapper.cs


注:本文中的IControlFactory.CreateLookupComboBoxDefaultMapperStrategy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。