本文整理汇总了C#中StyleType类的典型用法代码示例。如果您正苦于以下问题:C# StyleType类的具体用法?C# StyleType怎么用?C# StyleType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StyleType类属于命名空间,在下文中一共展示了StyleType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DummyRtfStyle
/// ------------------------------------------------------------------------------------
/// <summary>
/// Construct a dummy RTF style with the given name and type. Everything else is
/// inherited/default.
/// </summary>
/// ------------------------------------------------------------------------------------
public DummyRtfStyle(string styleName, StyleType styleType)
: base(-1)
{
m_name = styleName;
m_usage = null;
m_styleType = styleType;
}
示例2: AddToRTB
public static void AddToRTB(RichTextBox rtb, string strText, StyleType style, enumIcon icon)
{
switch (style)
{
case StyleType.bodyBlack:
AddToRTB(rtb, strText, Color.Black, 8, false, icon);
break;
case StyleType.bodyBlackBold:
AddToRTB(rtb, strText, Color.Black, 8, true, icon);
break;
case StyleType.bodyBlue:
AddToRTB(rtb, strText, Color.Blue, 8, false, icon);
break;
case StyleType.bodyBlueBold:
AddToRTB(rtb, strText, Color.Blue, 8, true, icon);
break;
case StyleType.bodyChocolate:
AddToRTB(rtb, strText, Color.Chocolate, 8, false, icon);
break;
case StyleType.bodyChocolateBold:
AddToRTB(rtb, strText, Color.Chocolate, 8, true, icon);
break;
case StyleType.bodyDarkGray:
AddToRTB(rtb, strText, Color.DarkGray, 8, false, icon);
break;
case StyleType.bodyMidnightBlue:
AddToRTB(rtb, strText, Color.MidnightBlue, 8, false, icon);
break;
case StyleType.bodyOrange:
AddToRTB(rtb, strText, Color.Orange, 8, false, icon);
break;
case StyleType.bodyPurple:
AddToRTB(rtb, strText, Color.Purple, 8, false, icon);
break;
case StyleType.bodyRed:
AddToRTB(rtb, strText, Color.Red, 8, false, icon);
break;
case StyleType.bodySeaGreen:
AddToRTB(rtb, strText, Color.SeaGreen, 8, false, icon);
break;
case StyleType.bodySeaGreenBold:
AddToRTB(rtb, strText, Color.SeaGreen, 8, true, icon);
break;
case StyleType.titleBlack:
AddToRTB(rtb, strText, Color.Black, 14, true, icon);
break;
case StyleType.titleBlue:
AddToRTB(rtb, strText, Color.Blue, 14, true, icon);
break;
case StyleType.titleChocolate:
AddToRTB(rtb, strText, Color.Chocolate, 14, true, icon);
break;
case StyleType.titleSeagreen:
AddToRTB(rtb, strText, Color.SeaGreen, 14, true, icon);
break;
default:
AddToRTB(rtb, strText, Color.Black, 8, false, icon);
break;
}
}
示例3: CreateStyle
public static Style CreateStyle(StyleType styleType)
{
var styleCard = new StyleCard();
styleCard._styleType = styleType;
styleCard.ShowDialog();
return styleCard._style;
}
示例4: ApplyStyleEx
protected override void ApplyStyleEx(TextRowVisualStyle style, StyleType[] css)
{
foreach (StyleType cs in css)
{
style.ApplyStyle(SuperGrid.BaseVisualStyles.FooterStyles[cs]);
style.ApplyStyle(SuperGrid.DefaultVisualStyles.FooterStyles[cs]);
style.ApplyStyle(GridPanel.DefaultVisualStyles.FooterStyles[cs]);
}
}
示例5: ChooseStyle
public static Style ChooseStyle(StyleType? styleType = null)
{
var stylesDictForm = new StylesDictForm();
stylesDictForm._styleType = styleType;
if (stylesDictForm.ShowDialog() != DialogResult.OK)
{
return null;
}
return stylesDictForm._style;
}
示例6: GetImageWithCache
public Image GetImageWithCache(Rectangle r, StyleType style, StyleType? overlayStyle = null) {
var key = new CacheKey { OverlayStyle = overlayStyle, Rectangle = r, Style = style };
Image img;
if (cachedImages.TryGetValue(key, out img)) return img;
var bmp = new Bitmap(r.Width, r.Height);
using (var g = Graphics.FromImage(bmp))
{
RenderToGraphics(g, r, style);
if (overlayStyle != null) RenderToGraphics(g, r, overlayStyle.Value);
}
cachedImages[key] = bmp;
return bmp;
}
示例7: StyleInfo
/// ------------------------------------------------------------------------------------
/// <summary>
/// Initializes a new instance of the <see cref="StyleInfo"/> class. Creates a new
/// style of a given type.
/// </summary>
/// <param name="name">new style name</param>
/// <param name="basedOnStyle">style to be based on</param>
/// <param name="styleType"></param>
/// <param name="cache">FDO cache</param>
/// ------------------------------------------------------------------------------------
public StyleInfo(string name, StyleInfo basedOnStyle, StyleType styleType,
FdoCache cache) : base(cache)
{
Name = name;
m_styleType = styleType;
m_basedOnStyle = basedOnStyle;
if (basedOnStyle != null)
m_basedOnStyleName = basedOnStyle.Name;
else if (styleType == StyleType.kstParagraph)
{
throw new ArgumentNullException("basedOnStyle",
"New paragraph styles are required to be based on an existing style.");
}
m_nextStyleName = name;
}
示例8: Style
public Style(RTF rtf) {
num = -1;
type = StyleType.Paragraph;
based_on = NoStyleNum;
next_par = -1;
lock (rtf) {
if (rtf.Styles == null) {
rtf.Styles = this;
} else {
Style s = rtf.Styles;
while (s.next != null)
s = s.next;
s.next = this;
}
}
}
示例9: ApplyStyleEx
protected virtual void ApplyStyleEx(TextRowVisualStyle style, StyleType[] css)
{
}
示例10: DisplayImage
public static void DisplayImage( Gump gump, StyleType style )
{
switch ( style )
{
case StyleType.Scroll:{ break; }
default:{ gump.AddImage( 30, 50, 10440 ); gump.AddImage( 648, 50, 10441 ); break; }
}
}
示例11: GetEffectiveStyle
internal TextRowVisualStyle GetEffectiveStyle(StyleType type)
{
ValidateRowStyle();
return (GetStyleEx(type));
}
示例12: GetStyleEx
private TextRowVisualStyle GetStyleEx(StyleType e)
{
if (_EffectiveRowStyles.IsValid(e) == false)
{
TextRowVisualStyle style = GetNewVisualStyle();
StyleType[] css = style.GetApplyStyleTypes(e);
if (css != null)
ApplyStyleEx(style, css);
SuperGrid.DoGetTextRowStyleEvent(this, e, ref style);
if (style.Background == null || style.Background.IsEmpty == true)
style.Background = new Background(Color.White);
if (style.Font == null)
style.Font = SystemFonts.CaptionFont;
_EffectiveRowStyles[e] = style;
}
return (_EffectiveRowStyles[e]);
}
示例13: GetArgsList
private void GetArgsList()
{
MessagesTitle = (string) ArgsList[2];
Messages = (string) ArgsList[4];
HideSpawnerList = (ArrayList) ArgsList[6];
MSGCheckBoxesList = (ArrayList) ArgsList[13];
megaSpawner = (MegaSpawner) ArgsList[19];
fromSpawnerList = (bool) ArgsList[20];
PersonalConfigList = (ArrayList) ArgsList[28];
StyleTypeConfig = (StyleType) PersonalConfigList[0];
BackgroundTypeConfig = (BackgroundType) PersonalConfigList[1];
DefaultTextColor = (TextColor) PersonalConfigList[4];
TitleTextColor = (TextColor) PersonalConfigList[5];
}
示例14: GetArgsList
private void GetArgsList()
{
MessagesTitle = (string) ArgsList[2];
Messages = (string) ArgsList[4];
MSGCheckBoxesList = (ArrayList) ArgsList[13];
PersonalConfigList = (ArrayList) ArgsList[28];
StyleTypeConfig = (StyleType) PersonalConfigList[0];
BackgroundTypeConfig = (BackgroundType) PersonalConfigList[1];
DefaultTextColor = (TextColor) PersonalConfigList[4];
TitleTextColor = (TextColor) PersonalConfigList[5];
}
示例15: DeleteStyleType
partial void DeleteStyleType(StyleType instance);