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


C# TextType类代码示例

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


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

示例1: DataSetTargetCore

        ///////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////BUILD FROM MUTABLE OBJECTS             //////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////////////
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="DataSetTargetCore"/> class.
        /// </summary>
        /// <param name="itemMutableObject">
        /// The agencyScheme. 
        /// </param>
        /// <param name="parent">
        /// The parent. 
        /// </param>
        /// <exception cref="SdmxSemmanticException"> Throws SdmxSemmanticException.
        /// </exception>
        /// <exception cref="SdmxSemmanticException">
        /// Throws Validate exception.
        /// </exception>
        public DataSetTargetCore(IDataSetTargetMutableObject itemMutableObject, IMetadataTarget parent)
            : base(itemMutableObject, parent)
        {
            this.textType = TextType.GetFromEnum(TextEnumType.DataSetReference);
            try
            {
                this.textType = itemMutableObject.TextType;
            }
            catch (SdmxSemmanticException ex)
            {
                throw new SdmxSemmanticException(ex, ExceptionCode.ObjectStructureConstructionError, this.Urn);
            }
            catch (Exception th)
            {
                throw new SdmxException(th, ExceptionCode.ObjectStructureConstructionError, this.Urn);
            }

            try
            {
                this.Validate();
            }
            catch (SdmxSemmanticException ex1)
            {
                throw new SdmxSemmanticException(ex1, ExceptionCode.ObjectStructureConstructionError, this.Urn);
            }
            catch (Exception th1)
            {
                throw new SdmxException(th1, ExceptionCode.ObjectStructureConstructionError, this.Urn);
            }
        }
开发者ID:SDMXISTATFRAMEWORK,项目名称:ISTAT_ENHANCED_SDMXRI_WS,代码行数:49,代码来源:DataSetTargetCore.cs

示例2: AddLine

        public void AddLine(TextType txtType, String text)
        {
            string indent = "";

            switch ((int)txtType)
            {
                // HeaderOpenBlock
                case 0:
                    indent = "    ";
                    break;
                // Header
                case 1:
                    indent = "    ";
                    break;
                // Indent1
                case 2:
                    indent = "         ";
                    break;
                // CloseBlock
                case 3:
                    indent = "    )";
                    break;
                // EmptyLine
                case 4:
                    indent = "";
                    break;
            }

            _text = _text.AddLast(indent + text);
            _type = _type.AddLast(txtType);
        }
开发者ID:juhan,项目名称:NModel,代码行数:31,代码来源:LogMetrics.cs

示例3: AddKeyWordProperty

		private TextType AddKeyWordProperty(TextType propType, string name, string value, ContentType property)
		{
			if (propType == null)
			{
				propType = new TextType(property);
				m_docText.AddTextType(propType);
			}

			TextNode newNode = new TextNode();
			newNode.AddParent(propType);
			propType.AddChild(newNode);

			newNode.AddInfo(new NodeInfo()
			{
				name = "Name",
				type = DataType.String,
				value = name
			});

			newNode.AddInfo(new NodeInfo()
			{
				name = "Value",
				type = DataType.String,
				value = value
			});

			return propType;
		}
开发者ID:killbug2004,项目名称:WSProf,代码行数:28,代码来源:DiscoveryResult.cs

示例4: ReportPeriodTargetCore

        ///////////////////////////////////////////////////////////////////////////////////////////////////
        ////////////BUILD FROM MUTABLE OBJECT                 //////////////////////////////////////////////////
        ///////////////////////////////////////////////////////////////////////////////////////////////////    
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="ReportPeriodTargetCore"/> class.
        /// </summary>
        /// <param name="parent">
        /// The parent. 
        /// </param>
        /// <param name="itemMutableObject">
        /// The sdmxObject. 
        /// </param>
        /// <exception cref="SdmxSemmanticException">
        /// Throws Validate exception.
        /// </exception>
        public ReportPeriodTargetCore(IIdentifiableObject parent, IReportPeriodTargetMutableObject itemMutableObject)
            : base(itemMutableObject, parent)
        {
            this.textType = TextType.GetFromEnum(TextEnumType.ObservationalTimePeriod);
            if (itemMutableObject.StartTime != null)
            {
                this.startTime = new SdmxDateCore(itemMutableObject.StartTime, TimeFormatEnumType.DateTime);
            }

            if (itemMutableObject.EndTime != null)
            {
                this.endTime = new SdmxDateCore(itemMutableObject.EndTime, TimeFormatEnumType.DateTime);
            }

            if (itemMutableObject.TextType != null)
            {
                this.textType = itemMutableObject.TextType;
            }

            try
            {
                this.Validate();
            }
            catch (SdmxSemmanticException e)
            {
                throw new SdmxSemmanticException(e, ExceptionCode.FailValidation, this);
            }
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:45,代码来源:ReportPeriodTargetCore.cs

示例5: FontCGSizeorTextType

		private float FontCGSizeorTextType (TextType type, int level)
		{
			float fontSize = 0;
			switch (type) {
			case TextType.Title:
				fontSize = 88;
				break;
			case TextType.Chapter:
				fontSize = 94;
				break;
			case TextType.Code:
				fontSize = 36;
				break;
			case TextType.Subtitle:
				fontSize = 64;
				break;
			case TextType.Body:
				fontSize = level == 0 ? 50 : 40;
				break;
			default:
				fontSize = 56;
				break;
			}
			return fontSize;
		}
开发者ID:hitchingsh,项目名称:mac-samples,代码行数:25,代码来源:SlideTextManager.cs

示例6: GetText

 /// <summary>
 ///     Get Global String
 /// </summary>
 /// <param name="tag"></param>
 /// <returns></returns>
 public String GetText(TextType tag)
 {
     String strText = String.Empty;
     _stringDic.TryGetValue(tag.ToString(), out strText);
     strText = String.IsNullOrEmpty(strText) ? tag.ToString() : strText.Replace("&amp;", "&");
     return strText;
 }
开发者ID:EricBlack,项目名称:MagicMongoDBTool,代码行数:12,代码来源:StringResources.cs

示例7: TextDescriptor

 internal TextDescriptor(TextType typeText, int start, int len, bool bold)
 {
     StartPos = start;
     Length = len;
     TypeText = typeText;
     Bold = bold;
 }
开发者ID:hybridgroup,项目名称:alljoyn,代码行数:7,代码来源:RichTextBuffer.cs

示例8: HandleOleLinks

 private void HandleOleLinks(TextType links)
 {
     for (int i = 0; i < links.GetChildCount(); i++)
     {
         IAbstractTextNode iChild = links.GetChild(i);
         ProcessChildNode(iChild);
     }
 }
开发者ID:killbug2004,项目名称:WSProf,代码行数:8,代码来源:XlsxExternalLinkXmlFilter.cs

示例9: Task1

        public Task1()
        {
            InitializeComponent();

            new Task2().Show();

            _current = TextType.In;
        }
开发者ID:npzxcf,项目名称:ComputerGraphics,代码行数:8,代码来源:Task1.cs

示例10: GetText

 /// <summary>
 ///     获得文字
 /// </summary>
 /// <param name="defaultText"></param>
 /// <param name="tag"></param>
 /// <returns></returns>
 public static string GetText(string defaultText, TextType tag)
 {
     if (IsUseDefaultLanguage || tag == TextType.UseDefaultLanguage) return defaultText;
     string strText;
     StringResource.StringDic.TryGetValue(tag.ToString(), out strText);
     strText = string.IsNullOrEmpty(strText) ? tag.ToString() : strText.Replace("&amp;", "&");
     return strText;
 }
开发者ID:lizhi5753186,项目名称:MongoCola,代码行数:14,代码来源:GUIConfig.cs

示例11: RaiseClassificationChanged

        public void RaiseClassificationChanged(SnapshotSpan span, TextType type)
        {
            _isRobotsTxt = true;
            _textType = type;
            var handler = this.ClassificationChanged;

            if (handler != null)
                handler(this, new ClassificationChangedEventArgs(span));
        }
开发者ID:ncl-dmoreira,项目名称:WebEssentials2013,代码行数:9,代码来源:RobotsTxtClassifier.cs

示例12: ProcessSchemaValidationError

 private void ProcessSchemaValidationError(CodedStatusMessageType errorMessage, SchemaValidationException e)
 {
     foreach (string error in e.GetValidationErrors())
     {
         TextType text = new TextType();
         errorMessage.Text.Add(text);
         text.TypedValue = error;
     }
 }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:9,代码来源:ErrorResponseBuilder.cs

示例13: OnClassificationChanged

        public void OnClassificationChanged(SnapshotSpan span, TextType type)
        {
            _isDockerfile = true;
            _textType = type;
            var handler = this.ClassificationChanged;

            if (handler != null)
                handler(this, new ClassificationChangedEventArgs(span));
        }
开发者ID:irongiant,项目名称:WebEssentials2015,代码行数:9,代码来源:DockerfileClassifier.cs

示例14: handleNumberkeyDown

        public static void handleNumberkeyDown(TextType _texttype, ref  KeyEventArgs e, NumberType _NumberType, NumberPower __NumberPower)
        {
            bool result = true;

            bool numericKeys = (
                ((e.KeyCode >= Keys.D0 && e.KeyCode <= Keys.D9) ||
                (e.KeyCode >= Keys.NumPad0 && e.KeyCode <= Keys.NumPad9))
                && e.Modifiers != Keys.Shift);

            bool ctrlA = e.KeyCode == Keys.A && e.Modifiers == Keys.Control;
            bool mark = (e.KeyCode == Keys.OemMinus && __NumberPower != NumberPower.positiveOnly) || (e.KeyCode == Keys.Oemplus && __NumberPower != NumberPower.NegativeOnly);
            bool comma = (_NumberType != NumberType.Integer && (e.KeyData == Keys.Decimal || e.KeyCode == Keys.Oemcomma || e.KeyCode == Keys.OemPeriod));
            bool editKeys = (
                (e.KeyCode == Keys.Z && e.Modifiers == Keys.Control) ||
                (e.KeyCode == Keys.X && e.Modifiers == Keys.Control) ||
                (e.KeyCode == Keys.C && e.Modifiers == Keys.Control) ||
                (e.KeyCode == Keys.V && e.Modifiers == Keys.Control) ||
                e.KeyCode == Keys.Delete ||
                e.KeyCode == Keys.Back);

            bool navigationKeys = (
                e.KeyCode == Keys.Up ||
                e.KeyCode == Keys.Right ||
                e.KeyCode == Keys.Down ||
                e.KeyCode == Keys.Left ||
                e.KeyCode == Keys.Home ||
                e.KeyCode == Keys.End);
            switch (_texttype)
            {
                case TextType.IsNumber:
                    {
                        if (!(numericKeys || editKeys || navigationKeys || mark || comma))
                        {

                            if (ctrlA) // Do select all as OS/Framework does not always seem to implement this.
                                //   SelectAll();
                                result = false;
                        }
                        if (!result) // If not valid key then suppress and handle.
                        {
                            e.SuppressKeyPress = true;
                            e.Handled = true;
                            if (ctrlA) { } // Do Nothing!

                        }

                        break;
                    }
                case TextType.IsdateTime: break;
                case TextType.IsMail: break;
                case TextType.IsString: break;
                case TextType.IsTel: break;

            }
        }
开发者ID:hshProject,项目名称:FinalModule,代码行数:55,代码来源:ClsGlobel.cs

示例15: DummyTextToken

		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Initializes a new instance of the <see cref="DummyTextToken"/> class.
		/// </summary>
		/// <param name="text">The text.</param>
		/// <param name="textType">Type of the text.</param>
		/// <param name="isParagraphStart">if set to <c>true</c> text token starts a paragraph.
		/// </param>
		/// <param name="isNoteStart">if set to <c>true</c> text token starts a note.</param>
		/// <param name="paraStyleName">Name of the paragraph style.</param>
		/// <param name="charStyleName">Name of the character style.</param>
		/// <param name="icuLocale">The icu locale.</param>
		/// ------------------------------------------------------------------------------------
		public DummyTextToken(string text, TextType textType, bool isParagraphStart,
			bool isNoteStart, string paraStyleName, string charStyleName, string icuLocale)
		{
			m_text = text;
			m_textType = textType;
			m_isParagraphStart = isParagraphStart;
			m_isNoteStart = isNoteStart;
			m_paraStyleName = paraStyleName;
			m_charStyleName = charStyleName;
			m_iculocale = icuLocale;
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:24,代码来源:DummyTextToken.cs


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