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


C# DisplayOptions类代码示例

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


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

示例1: LoadSettings

 private void LoadSettings()
 {
   this.DisplayOptions = XMLUTILS.LoadDisplayOptionsSettings();
   this.SetVolume();
   this.SetProgress();
   this.SetDiskIcon();
 }
开发者ID:sanyaade-embedded-systems,项目名称:MediaPortal-1,代码行数:7,代码来源:DisplayOptionsWindow.cs

示例2: WriteTarget

        /// <summary>
        /// Write out the target link information
        /// </summary>
        /// <param name="target">The target for which to write link information</param>
        /// <param name="options">The link display options</param>
        /// <param name="writer">The write to which the information is written</param>
        public void WriteTarget(Target target, DisplayOptions options, XmlWriter writer)
        {
            if(target == null)
                throw new ArgumentNullException("target");

            if(writer == null)
                throw new ArgumentNullException("writer");

            NamespaceTarget space = target as NamespaceTarget;

            if(space != null)
            {
                WriteNamespaceTarget(space, writer);
                return;
            }

            TypeTarget type = target as TypeTarget;

            if(type != null)
            {
                WriteTypeTarget(type, options, writer);
                return;
            }

            MemberTarget member = target as MemberTarget;

            if(member != null)
            {
                WriteMemberTarget(member, options, writer);
                return;
            }

            if(target.Id.StartsWith("R:", StringComparison.OrdinalIgnoreCase))
            {
                WriteInvalid(new InvalidReference(target.Id), writer);
                return;
            }

            throw new InvalidOperationException("Unknown target type");
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:46,代码来源:LinkTextResolver.cs

示例3: WriteReferenceType

        private void WriteReferenceType(ReferenceTypeReference reference, DisplayOptions options, XmlWriter writer, Dictionary<IndexedTemplateTypeReference, TypeReference> dictionary)
        {
            WriteType(reference.ReferredToType, options, writer, dictionary);

            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "languageSpecificText");
            // add % in C++
            writer.WriteStartElement("span");
            writer.WriteAttributeString("class", "cpp");
            writer.WriteString("%");
            writer.WriteEndElement();
            writer.WriteEndElement();
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:13,代码来源:LinkTextResolver.cs

示例4: WriteProperty

        private void WriteProperty(PropertyTarget target, DisplayOptions options, XmlWriter writer)
        {
            WriteProcedureName(target, writer);

            if((options & DisplayOptions.ShowParameters) > 0)
            {
                IList<Parameter> parameters = target.Parameters;

                if(parameters.Count > 0)
                {
                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "languageSpecificText");
                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "cs");
                    writer.WriteString("[");
                    writer.WriteEndElement();

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "vb");
                    writer.WriteString("(");
                    writer.WriteEndElement();

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "cpp");
                    writer.WriteString("[");
                    writer.WriteEndElement();

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "nu");
                    writer.WriteString("(");
                    writer.WriteEndElement();

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "fs");
                    writer.WriteString(" ");
                    writer.WriteEndElement();

                    writer.WriteEndElement();

                    // show parameters
                    // we need to deal with type template substitutions!
                    for(int i = 0; i < parameters.Count; i++)
                    {
                        if(i > 0)
                            writer.WriteString(", ");

                        WriteType(parameters[i].ParameterType, DisplayOptions.Default, writer);
                    }

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "languageSpecificText");
                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "cs");
                    writer.WriteString("]");
                    writer.WriteEndElement();

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "vb");
                    writer.WriteString(")");
                    writer.WriteEndElement();

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "cpp");
                    writer.WriteString("]");
                    writer.WriteEndElement();

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "nu");
                    writer.WriteString(")");
                    writer.WriteEndElement();

                    writer.WriteStartElement("span");
                    writer.WriteAttributeString("class", "fs");
                    writer.WriteString(" ");
                    writer.WriteEndElement();

                    writer.WriteEndElement();
                }
            }
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:80,代码来源:LinkTextResolver.cs

示例5: WritePointerType

 private void WritePointerType(PointerTypeReference pointer, DisplayOptions options, XmlWriter writer, Dictionary<IndexedTemplateTypeReference, TypeReference> dictionary)
 {
     WriteType(pointer.PointedToType, options, writer, dictionary);
     writer.WriteString("*");
 }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:5,代码来源:LinkTextResolver.cs

示例6: WriteSpecializedMemberWithParameters

        private void WriteSpecializedMemberWithParameters(SpecializedMemberWithParametersReference ugly, DisplayOptions options, XmlWriter writer)
        {
            if((options & DisplayOptions.ShowContainer) > 0)
            {
                WriteSpecializedType(ugly.SpecializedType, options & ~DisplayOptions.ShowContainer, writer);
                WriteSeparator(writer);
            }

            writer.WriteString(ugly.MemberName);

            if((options & DisplayOptions.ShowParameters) > 0)
            {
                writer.WriteString("(");

                IList<TypeReference> parameterTypes = ugly.ParameterTypes;

                for(int i = 0; i < parameterTypes.Count; i++)
                {
                    if(i > 0)
                        writer.WriteString(", ");

                    WriteType(parameterTypes[i], DisplayOptions.Default, writer);
                }

                writer.WriteString(")");
            }
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:27,代码来源:LinkTextResolver.cs

示例7: SimpleRootSiteDataProvider_MultiStringViewVc

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the SimpleRootSiteDataProviderVc class
		/// </summary>
		/// <param name="options"></param>
		/// ------------------------------------------------------------------------------------
		public SimpleRootSiteDataProvider_MultiStringViewVc(DisplayOptions options)
		{
			m_displayOptions = options;
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:10,代码来源:SimpleRootSiteDataProviderView.cs

示例8: WriteMember

        /// <summary>
        /// Write out a member reference
        /// </summary>
        /// <param name="member">The member reference information</param>
        /// <param name="options">The link display options</param>
        /// <param name="writer">The write to which the information is written</param>
        public void WriteMember(MemberReference member, DisplayOptions options, XmlWriter writer)
        {
            if(member == null)
                throw new ArgumentNullException("member");

            if(writer == null)
                throw new ArgumentNullException("writer");

            SimpleMemberReference simple = member as SimpleMemberReference;
            if(simple != null)
            {
                WriteSimpleMember(simple, options, writer);
                return;
            }

            SpecializedMemberReference special = member as SpecializedMemberReference;
            if(special != null)
            {
                WriteSpecializedMember(special, options, writer);
                return;
            }

            SpecializedMemberWithParametersReference ugly = member as SpecializedMemberWithParametersReference;
            if(ugly != null)
            {
                WriteSpecializedMemberWithParameters(ugly, options, writer);
                return;
            }

            throw new InvalidOperationException("Unknown member reference type");

        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:38,代码来源:LinkTextResolver.cs

示例9: WriteSimpleMember

 private void WriteSimpleMember(SimpleMemberReference member, DisplayOptions options, XmlWriter writer)
 {
     WriteSimpleMember(member, options, writer, null);
 }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:4,代码来源:LinkTextResolver.cs

示例10: WriteType

        /// <summary>
        /// Write out a type reference
        /// </summary>
        /// <param name="type">The type reference information</param>
        /// <param name="options">The link display options</param>
        /// <param name="writer">The write to which the information is written</param>
        /// <param name="dictionary">The template type dictionary</param>
        private void WriteType(TypeReference type, DisplayOptions options, XmlWriter writer, Dictionary<IndexedTemplateTypeReference, TypeReference> dictionary)
        {
            if(type == null)
                throw new ArgumentNullException("type");
            if(writer == null)
                throw new ArgumentNullException("writer");

            SimpleTypeReference simple = type as SimpleTypeReference;
            if(simple != null)
            {
                WriteSimpleType(simple, options, writer);
                return;
            }

            SpecializedTypeReference specialized = type as SpecializedTypeReference;
            if(specialized != null)
            {
                WriteSpecializedType(specialized, options, writer);
                return;
            }

            ArrayTypeReference array = type as ArrayTypeReference;
            if(array != null)
            {
                WriteArrayType(array, options, writer, dictionary);
                return;
            }

            ReferenceTypeReference reference = type as ReferenceTypeReference;
            if(reference != null)
            {
                WriteReferenceType(reference, options, writer, dictionary);
                return;
            }

            PointerTypeReference pointer = type as PointerTypeReference;
            if(pointer != null)
            {
                WritePointerType(pointer, options, writer, dictionary);
                return;
            }

            TemplateTypeReference template = type as TemplateTypeReference;
            if(template != null)
            {
                WriteTemplateType(template, options, writer, dictionary);
                return;
            }

            throw new InvalidOperationException("Unknown type reference type");
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:58,代码来源:LinkTextResolver.cs

示例11: WriteSimpleType

 /// <summary>
 /// Write out a simple type reference
 /// </summary>
 /// <param name="simple">The simple type reference information</param>
 /// <param name="options">The link display options</param>
 /// <param name="writer">The write to which the information is written</param>
 public void WriteSimpleType(SimpleTypeReference simple, DisplayOptions options, XmlWriter writer)
 {
     WriteSimpleType(simple, options, true, writer);
 }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:10,代码来源:LinkTextResolver.cs

示例12: WriteReference

        /// <summary>
        /// Write out a reference
        /// </summary>
        /// <param name="reference">The reference information</param>
        /// <param name="options">The link display options</param>
        /// <param name="writer">The write to which the information is written</param>
        public void WriteReference(Reference reference, DisplayOptions options, XmlWriter writer)
        {
            if(reference == null)
                throw new ArgumentNullException("reference");

            if(writer == null)
                throw new ArgumentNullException("writer");

            NamespaceReference space = reference as NamespaceReference;

            if(space != null)
            {
                WriteNamespace(space, writer);
                return;
            }

            TypeReference type = reference as TypeReference;

            if(type != null)
            {
                WriteType(type, options, writer);
                return;
            }

            MemberReference member = reference as MemberReference;

            if(member != null)
            {
                WriteMember(member, options, writer);
                return;
            }

            ExtensionMethodReference extMethod = reference as ExtensionMethodReference;

            if(extMethod != null)
            {
                WriteExtensionMethod(extMethod, options, writer);
                return;
            }

            InvalidReference invalid = reference as InvalidReference;

            if(invalid != null)
            {
                WriteInvalid(invalid, writer);
                return;
            }

            throw new InvalidOperationException("Unknown target type");
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:56,代码来源:LinkTextResolver.cs

示例13: WriteMemberTarget

        private void WriteMemberTarget(MemberTarget target, DisplayOptions options, XmlWriter writer, Dictionary<IndexedTemplateTypeReference, TypeReference> dictionary)
        {
            if(target == null)
                throw new ArgumentNullException("target");

            if(writer == null)
                throw new ArgumentNullException("writer");

            MethodTarget method = target as MethodTarget;

            if((options & DisplayOptions.ShowContainer) > 0)
            {
                WriteType(target.ContainingType, options & ~DisplayOptions.ShowContainer, writer);

                if(method != null && method.IsConversionOperator)
                    writer.WriteString(" ");
                else
                    WriteSeparator(writer);
            }

            // special logic for writing methods
            if(method != null)
            {
                WriteMethod(method, options, writer, dictionary);
                return;
            }

            // special logic for writing properties
            PropertyTarget property = target as PropertyTarget;

            if(property != null)
            {
                WriteProperty(property, options, writer);
                return;
            }

            // special logic for writing constructors
            ConstructorTarget constructor = target as ConstructorTarget;

            if(constructor != null)
            {
                WriteConstructor(constructor, options, writer);
                return;
            }

            // special logic for writing events
            EventTarget trigger = target as EventTarget;

            if(trigger != null)
            {
                WriteEvent(trigger, writer);
                return;
            }

            // by default, just write name
            writer.WriteString(target.Name);
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:57,代码来源:LinkTextResolver.cs

示例14: WriteTypeTarget

        /// <summary>
        /// Write out a type target
        /// </summary>
        /// <param name="type">The type target information</param>
        /// <param name="options">The link display options</param>
        /// <param name="showOuterType">True to show the outer type, false if not</param>
        /// <param name="writer">The write to which the information is written</param>
        private void WriteTypeTarget(TypeTarget type, DisplayOptions options, bool showOuterType, XmlWriter writer)
        {

            // write namespace, if containers are requested
            if((options & DisplayOptions.ShowContainer) > 0)
            {
                WriteNamespace(type.ContainingNamespace, writer);
                WriteSeparator(writer);
            }

            // write outer type, if one exists
            if(showOuterType && (type.ContainingType != null))
            {
                WriteSimpleType(type.ContainingType, DisplayOptions.Default, writer);
                WriteSeparator(writer);
            }

            // write the type name
            writer.WriteString(type.Name);

            // write if template parameters, if they exist and we are requested
            if((options & DisplayOptions.ShowTemplates) > 0)
            {
                WriteTemplateParameters(type.Templates, writer);
            }
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:33,代码来源:LinkTextResolver.cs

示例15: WriteTemplateType

        private void WriteTemplateType(TemplateTypeReference template, DisplayOptions options, XmlWriter writer, Dictionary<IndexedTemplateTypeReference, TypeReference> dictionary)
        {
            // if we have the name, just write it
            NamedTemplateTypeReference namedTemplate = template as NamedTemplateTypeReference;

            if(namedTemplate != null)
            {
                writer.WriteString(namedTemplate.Name);
                return;
            }

            IndexedTemplateTypeReference indexedTemplate = template as IndexedTemplateTypeReference;

            if(indexedTemplate != null)
            {
                if(dictionary != null && dictionary.ContainsKey(indexedTemplate))
                    WriteType(dictionary[indexedTemplate], options, writer);
                else
                    writer.WriteString(GetTemplateName(indexedTemplate.TemplateId, indexedTemplate.Index));

                return;
            }

            TypeTemplateTypeReference typeTemplate = template as TypeTemplateTypeReference;

            if(typeTemplate != null)
            {

                TypeReference value = null;

                if(dictionary != null)
                {
                    IndexedTemplateTypeReference key = new IndexedTemplateTypeReference(typeTemplate.TemplateType.Id, typeTemplate.Position);

                    if(dictionary.ContainsKey(key))
                        value = dictionary[key];
                }

                if(value == null)
                    writer.WriteString(GetTypeTemplateName(typeTemplate.TemplateType, typeTemplate.Position));
                else
                    WriteType(value, options, writer);

                return;
            }

            throw new InvalidOperationException("Unknown template type");
        }
开发者ID:modulexcite,项目名称:SHFB-1,代码行数:48,代码来源:LinkTextResolver.cs


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