本文整理汇总了C#中TextType类的典型用法代码示例。如果您正苦于以下问题:C# TextType类的具体用法?C# TextType怎么用?C# TextType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TextType类属于命名空间,在下文中一共展示了TextType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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("&", "&");
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("&", "&");
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
示例16: TextNodeBuilder
public TextNodeBuilder(TextType textType, List<NodeInfo> additionalInfo, string nameForContentProperty)
{
m_textType = textType;
m_textNode = new TextNode();
m_nameForContentProperty = nameForContentProperty;
if (additionalInfo != null)
{
foreach (NodeInfo ni in additionalInfo)
m_textNode.AddInfo(ni);
}
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:12,代码来源:TextNodeBuilder.cs
示例17: ProcessPart
public override Stream ProcessPart(Stream partData, DocumentText discoveryText, RelatedPartProvider relPartProvider, DocumentProcessingActions action)
{
//this is for the discovery on open documents - the copy loses all other macro information except this items
//specifying macro content - there is a single vbaproject.bin file containing all macros
//so far this appears to be valid
if (DocumentProcessor.ActionIncludesCleaning(action))
return null;
if (action == DocumentProcessingActions.PassThrough)
return partData;
if (m_bInterestedInMacros)
{
List<IAbstractTextType> ttypes = discoveryText.GetTextTypes(ContentType.Macro);
TextType macro = null;
if (ttypes.Count > 0)
{
macro = (TextType)ttypes[0];
}
else
{
macro = new TextType(ContentType.Macro);
discoveryText.AddTextType(macro);
}
TextNode macroNode = new TextNode();
NodeInfo ni = new NodeInfo();
ni.name = "Id";
ni.value = m_id;
ni.type = DataType.String;
macroNode.AddInfo(ni);
ni = new NodeInfo();
ni.name = "Target";
ni.value = m_target;
ni.type = DataType.String;
macroNode.AddInfo(ni);
ni = new NodeInfo();
ni.name = "Type";
ni.value = m_type;
ni.type = DataType.String;
macroNode.AddInfo(ni);
macro.AddChild(macroNode);
}
Initialize();
ConstructFilter(partData, discoveryText, action);
ExecuteFilter();
return m_outStream;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:53,代码来源:XlsxMacrosheetXmlPartFilter.cs
示例18: ReportPeriodTargetMutableCore
/// <summary>
/// Initializes a new instance of the <see cref="ReportPeriodTargetMutableCore"/> class.
/// </summary>
/// <param name="objTarget">
/// The agencySchemeMutable target.
/// </param>
public ReportPeriodTargetMutableCore(IReportPeriodTarget objTarget)
: base(objTarget)
{
this.textType = objTarget.TextType;
if (objTarget.StartTime != null)
{
this.startTime = objTarget.StartTime.Date;
}
if (objTarget.EndTime != null)
{
this.startTime = objTarget.EndTime.Date;
}
}
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:20,代码来源:ReportPeriodTargetMutableCore.cs
示例19: 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);
if (String.IsNullOrEmpty(strText))
{
strText = tag.ToString();
}
else
{
strText = strText.Replace("&", "&");
}
return strText;
}
开发者ID:Redi0,项目名称:meijing-ui,代码行数:19,代码来源:StringResources.cs
示例20: ToText
public string ToText(double Number,TextType txt)
{
if((int)txt == 1)
{
return ConvertText(Number, "Upper");
}
else if((int)txt == 2)
{
return ConvertText(Number, "Lower");
}
else
{
return "Error !";
}
}
开发者ID:nattakornsri4,项目名称:ProjectX1,代码行数:15,代码来源:ConvertionEngine.cs
注:本文中的TextType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论