• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# PropertyList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PropertyList的典型用法代码示例。如果您正苦于以下问题:C# PropertyList类的具体用法?C# PropertyList怎么用?C# PropertyList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PropertyList类属于命名空间,在下文中一共展示了PropertyList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: convertValueForProperty

 protected override Property convertValueForProperty(
     string propName, PropertyMaker maker, PropertyList propertyList)
 {
     Property p = null;
     if (propName.IndexOf("-top") >= 0)
     {
         p = getElement(0);
     }
     else if (propName.IndexOf("-right") >= 0)
     {
         p = getElement(count() > 1 ? 1 : 0);
     }
     else if (propName.IndexOf("-bottom") >= 0)
     {
         p = getElement(count() > 2 ? 2 : 0);
     }
     else if (propName.IndexOf("-left") >= 0)
     {
         p = getElement(count() > 3 ? 3 : (count() > 1 ? 1 : 0));
     }
     if (p != null)
     {
         return maker.ConvertShorthandProperty(propertyList, p, null);
     }
     return p;
 }
开发者ID:nholik,项目名称:Fo.Net,代码行数:26,代码来源:BoxPropShorthandParser.cs


示例2: PageSequenceMaster

        protected PageSequenceMaster(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            this.name = "fo:page-sequence-master";

            subSequenceSpecifiers = new ArrayList();

            if (parent.GetName().Equals("fo:layout-master-set"))
            {
                this.layoutMasterSet = (LayoutMasterSet)parent;
                string pm = this.properties.GetProperty("master-name").GetString();
                if (pm == null)
                {
                    FonetDriver.ActiveDriver.FireFonetWarning(
                        "page-sequence-master does not have a page-master-name and so is being ignored");
                }
                else
                {
                    this.layoutMasterSet.addPageSequenceMaster(pm, this);
                }
            }
            else
            {
                throw new FonetException("fo:page-sequence-master must be child "
                    + "of fo:layout-master-set, not "
                    + parent.GetName());
            }
        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:28,代码来源:PageSequenceMaster.cs


示例3: Make

        public override Property Make(PropertyList propertyList) {
            if (m_defaultProp == null) {
                m_defaultProp = Make(propertyList, "0", propertyList.getParentFObj());
            }
            return m_defaultProp;

        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:7,代码来源:GroupingSizeMaker.cs


示例4: Block

        public Block(FObj parent, PropertyList propertyList) : base(parent, propertyList)
        {
            this.name = "fo:block";

            switch (parent.GetName())
            {
                case "fo:basic-link":
                case "fo:block":
                case "fo:block-container":
                case "fo:float":
                case "fo:flow":
                case "fo:footnote-body":
                case "fo:inline":
                case "fo:inline-container":
                case "fo:list-item-body":
                case "fo:list-item-label":
                case "fo:marker":
                case "fo:multi-case":
                case "fo:static-content":
                case "fo:table-caption":
                case "fo:table-cell":
                case "fo:wrapper":
                    break;
                default:
                    throw new FonetException(
                        "fo:block must be child of " +
                            "fo:basic-link, fo:block, fo:block-container, fo:float, fo:flow, fo:footnote-body, fo:inline, fo:inline-container, fo:list-item-body, fo:list-item-label, fo:marker, fo:multi-case, fo:static-content, fo:table-caption, fo:table-cell or fo:wrapper " +
                            "not " + parent.GetName());
            }
            this.span = this.properties.GetProperty("span").GetEnum();
            ts = propMgr.getTextDecoration(parent);
        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:32,代码来源:Block.cs


示例5: Flusso

        public Flusso(Variable father, string[] fields, List<string> map)
        {
            this.father = father;
            protocolname = map[0];
            propertyDefinitions = VarDefinitions.Map[map[0]];
            propertyValues = new PropertyList();
            if (Regex.IsMatch(map[0], "Variables|Common", RegexOptions.IgnoreCase))
                name = map[0];
            else
                name = fields[1];

            name = name.Trim();
            foreach (var pt in propertyDefinitions)
            {
                if (!pt.Value.Visibile) continue;
                int i = map.FindIndex(x => x == pt.Key);
                if (pt.Key=="Abilitato")
                {
                    if (!Boolean.TryParse(fields[i-1], out abilitazione)) abilitazione = false;
                }
                if (i > 0)
                {
                    propertyValues.Add(pt.Key, fields[i - 1].Replace("%sc%",";").Trim(),pt.Value);
                }
                else
                    propertyValues.Add(pt.Key, "", pt.Value);
            }   
        }
开发者ID:ekox86,项目名称:vireoxConfigurator,代码行数:28,代码来源:Flusso.cs


示例6: ProjectInfo

 public ProjectInfo(Project project)
 {
     _project = project;
     _properties = new ProjectPropertyList(_project);
     _references = new ReferenceList(_project);
     _dependencies = new List<string>();
 }
开发者ID:hivie7510,项目名称:csharptest-net,代码行数:7,代码来源:ProjectInfo.cs


示例7: AddEditPropertyListDialog

        public AddEditPropertyListDialog(PropertyList propertyList)
        {
            InitializeComponent();
            Title = "Edit Component Property List";

            mViewPropertyList = new AddEditPropertyListViewModel(this, propertyList);
        }
开发者ID:barrett2474,项目名称:CMS2,代码行数:7,代码来源:AddEditPropertyListDialog.xaml.cs


示例8: SimplePageMaster

        protected SimplePageMaster(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            this.name = "fo:simple-page-master";

            if (parent.GetName().Equals("fo:layout-master-set"))
            {
                this.layoutMasterSet = (LayoutMasterSet)parent;
                masterName = this.properties.GetProperty("master-name").GetString();
                if (masterName == null)
                {
                    FonetDriver.ActiveDriver.FireFonetWarning(
                        "simple-page-master does not have a master-name and so is being ignored");
                }
                else
                {
                    this.layoutMasterSet.addSimplePageMaster(this);
                }
            }
            else
            {
                throw new FonetException("fo:simple-page-master must be child "
                    + "of fo:layout-master-set, not "
                    + parent.GetName());
            }
            _regions = new Hashtable();
        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:27,代码来源:SimplePageMaster.cs


示例9: GetShorthand

        public override Property GetShorthand(PropertyList propertyList) {
            Property p = null;
            ListProperty listprop;

            if (p == null) {
                listprop = (ListProperty) propertyList.GetExplicitProperty("border-top");
                if (listprop != null) {
                    IShorthandParser shparser = new GenericShorthandParser(listprop);
                    p = shparser.GetValueForProperty(PropName, this, propertyList);
                }
            }

            if (p == null) {
                listprop = (ListProperty) propertyList.GetExplicitProperty("border-width");
                if (listprop != null) {
                    IShorthandParser shparser = new BoxPropShorthandParser(listprop);
                    p = shparser.GetValueForProperty(PropName, this, propertyList);
                }
            }

            if (p == null) {
                listprop = (ListProperty) propertyList.GetExplicitProperty("border");
                if (listprop != null) {
                    IShorthandParser shparser = new GenericShorthandParser(listprop);
                    p = shparser.GetValueForProperty(PropName, this, propertyList);
                }
            }

            return p;
        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:30,代码来源:BorderTopWidthMaker.cs


示例10: Compute

        public override Property Compute(PropertyList propertyList)
        {
            Property computedProperty = null;
            Property correspondingProperty = propertyList.GetProperty("text-align");
            if (correspondingProperty != null)
            {
                int correspondingValue = correspondingProperty.GetEnum();

                if (correspondingValue == TextAlign.JUSTIFY)
                {
                    computedProperty = new EnumProperty(Constants.START);
                }
                else if (correspondingValue == TextAlign.END)
                {
                    computedProperty = new EnumProperty(Constants.END);
                }
                else if (correspondingValue == TextAlign.START)
                {
                    computedProperty = new EnumProperty(Constants.START);
                }
                else if (correspondingValue == TextAlign.CENTER)
                {
                    computedProperty = new EnumProperty(Constants.CENTER);
                }

            }
            return computedProperty;
        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:28,代码来源:TextAlignLastMaker.cs


示例11: Flow

        protected Flow(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            this.name = GetElementName();

            if (parent.GetName().Equals("fo:page-sequence"))
            {
                this.pageSequence = (PageSequence)parent;
            }
            else
            {
                throw new FonetException("flow must be child of "
                    + "page-sequence, not "
                    + parent.GetName());
            }
            SetFlowName(GetProperty("flow-name").GetString());

            if (pageSequence.IsFlowSet)
            {
                if (this.name.Equals("fo:flow"))
                {
                    throw new FonetException("Only a single fo:flow permitted"
                        + " per fo:page-sequence");
                }
                else
                {
                    throw new FonetException(this.name
                        + " not allowed after fo:flow");
                }
            }
            pageSequence.AddFlow(this);
        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:32,代码来源:Flow.cs


示例12: AbstractTableBody

 public AbstractTableBody(FObj parent, PropertyList propertyList) : base(parent, propertyList)
 {
     if (!(parent is Table))
     {
         FonetDriver.ActiveDriver.FireFonetError(
             "A table body must be child of fo:table, not " + parent.GetName());
     }
 }
开发者ID:nholik,项目名称:Fo.Net,代码行数:8,代码来源:AbstractTableBody.cs


示例13: Make

 public override Property Make(PropertyList propertyList)
 {
     if (m_defaultProp == null)
     {
         m_defaultProp = Make(propertyList, "use-target-processing-context", propertyList.getParentFObj());
     }
     return m_defaultProp;
 }
开发者ID:nholik,项目名称:Fo.Net,代码行数:8,代码来源:TargetPresentationContextMaker.cs


示例14: LoadExternalFile

 public virtual void LoadExternalFile(string path)
 {
     ExternalFile = path;
     if (string.IsNullOrEmpty(path))
         Properties = new PropertyList();
     else
         Properties = environmentLoader.LoadProperties(path);
 }
开发者ID:bbyars,项目名称:CM.NET,代码行数:8,代码来源:DeployForm.cs


示例15: BuildEngine

        public BuildEngine(FrameworkVersions toolsVersion, string frameworkPath)
        {
            _framework = toolsVersion;
            _frameworkPath = frameworkPath;
			Engine = CreateEngine(_framework, _frameworkPath);
            _projects = new ProjectList(this, _framework);
            _properties = new PropertyList(Engine.GlobalProperties);
        }
开发者ID:hivie7510,项目名称:csharptest-net,代码行数:8,代码来源:BuildEngine.cs


示例16: DataRecordConverterTypeBuilder

        public DataRecordConverterTypeBuilder(DataRecordConverterSpec queryInfo)
        {
            _queryInfo = Verify.ArgumentNotNull(queryInfo, "queryInfo");

            PropertyInfo[] properties = queryInfo.RecordType.GetProperties();

            var propertyMap = new NameDictionary<PropertyInfo>();
            var dataRecordMap = new NameDictionary<DataRecordFieldInfo>();

            foreach (DataRecordFieldInfo field in queryInfo.Fields)
            {
                dataRecordMap.Add(field.FieldName, field);
            }

            foreach (PropertyInfo property in properties)
            {
                if (property.HasPublicSetter())
                {
                    propertyMap.Add(property.Name, property);
                }
            }

            foreach (DataRecordFieldInfo field in queryInfo.Fields)
            {
                var propertyList = new PropertyList(queryInfo.RecordType, field.FieldName);
                if (propertyList.HasErrors)
                {
                    _errors.AddRange(propertyList.Errors);
                }
                else if (DataRecordConverterMethod.CanHandleConversion(field.FieldType, propertyList.PropertyType))
                {
                    _mapFieldToProperty.Add(field, propertyList);
                }
                else
                {
                    _errors.Add(string.Format("Cannot convert from {0} to {1} for {2}",
                                              field.FieldType.Name, propertyList.PropertyType.Name, field.FieldName));
                }
            }

            foreach (PropertyInfo property in properties)
            {
                if (property.HasPublicSetter())
                {
                    DataRecordFieldInfo field;
                    if (dataRecordMap.TryGetValue(property.Name, out field))
                    {
                        _mapPropertyToField.Add(property, field);
                    }
                    else
                    {
                        _errors.Add(string.Format("Query result does not have a column named '{0}'",
                                                  property.Name));
                    }
                }
            }
        }
开发者ID:jjeffery,项目名称:Cesto,代码行数:57,代码来源:DataRecordConverterTypeBuilder.cs


示例17: CreateNewPropertyWithBestInitialValues_InitialListTest

        public void CreateNewPropertyWithBestInitialValues_InitialListTest()
        {
            var properties = new PropertyList();

            var newProperty = properties.CreateNew(_classifiers);

            Assert.AreEqual("New Property 1", newProperty.Name);
            Assert.AreEqual(String, newProperty.Type);
        }
开发者ID:pgenfer,项目名称:YumlFrontEnd,代码行数:9,代码来源:PropertyListTest.cs


示例18: LoadProperties

 public virtual PropertyList LoadProperties(string path)
 {
     var xml = XElement.Parse(fileSystem.ReadAllText(path));
     var result = new PropertyList();
     var propertyNodes = xml.Descendants(ScopedName("PropertyGroup")).Descendants();
     foreach (var node in propertyNodes)
         result.Add(node.Name.LocalName, node.Value);
     return result;
 }
开发者ID:bbyars,项目名称:CM.NET,代码行数:9,代码来源:EnvironmentFilesLoader.cs


示例19: InlineContainer

        protected InlineContainer(FObj parent, PropertyList propertyList)
            : base(parent, propertyList)
        {
            this.name = "fo:inline-container";

            BorderAndPadding bap = propMgr.GetBorderAndPadding();
            BackgroundProps bProps = propMgr.GetBackgroundProps();
            MarginInlineProps mProps = propMgr.GetMarginInlineProps();
            RelativePositionProps mRelProps = propMgr.GetRelativePositionProps();
        }
开发者ID:nholik,项目名称:Fo.Net,代码行数:10,代码来源:InlineContainer.cs


示例20: ConvertPropertyDatatype

 protected override Property ConvertPropertyDatatype(
     Property p, PropertyList propertyList, FObj fo)
 {
     String nameval = p.GetNCname();
     if (nameval != null)
     {
         return new ColorTypeProperty(new ColorType(nameval));
     }
     return base.ConvertPropertyDatatype(p, propertyList, fo);
 }
开发者ID:nholik,项目名称:Fo.Net,代码行数:10,代码来源:BackgroundColorMaker.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PropertyMap类代码示例发布时间:2022-05-24
下一篇:
C# PropertyKey类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap