public void HotKeyPrefix_SetInvalid_ThrowsInvalidEnumArgumentException(HotkeyPrefix prefix) { using (var format = new StringFormat()) { AssertExtensions.Throws <InvalidEnumArgumentException>("value", () => format.HotkeyPrefix = prefix); } }
public override void StartRenderSession(HotkeyPrefix hotKeys) { this.xae3b2752a89e7464 = TextFormatFlags.EndEllipsis | TextFormatFlags.SingleLine | TextFormatFlags.VerticalCenter | TextFormatFlags.PreserveGraphicsClipping | TextFormatFlags.NoPadding; if (false) { goto label_3; } else { goto label_2; } label_1: ++this.x03bb1ee2adad51ea; return; label_2: switch (hotKeys) { case HotkeyPrefix.None: break; case HotkeyPrefix.Hide: this.xae3b2752a89e7464 |= TextFormatFlags.HidePrefix; goto label_1; default: goto label_1; } label_3: this.xae3b2752a89e7464 |= TextFormatFlags.NoPrefix; goto label_1; }
public void HotKeyPrefix_SetInvalid_ThrowsInvalidEnumArgumentException(HotkeyPrefix prefix) { using (var format = new StringFormat()) { Assert.ThrowsAny <ArgumentException>(() => format.HotkeyPrefix = prefix); } }
public override void StartRenderSession(HotkeyPrefix hotKeys) { this.x166a89f4cd379ec8 = new SolidBrush(this.x7f2683d69c01d139); do { this.x7a0be2490cda8794 = new Pen(this.x228f9881a1be0e5d); this.x050be261498a0c97 = new Pen(this.xfca0e3085d5a7f42); this.x54c190ae969c389d = new SolidBrush(this.x1da108dbfca32343); this.xa33e6094d9ed12d6 = new Pen(this.x9c1f2f40026567ee); this.x2771fbe8bb84042b = new StringFormat(StringFormat.GenericDefault); this.x2771fbe8bb84042b.FormatFlags = StringFormatFlags.NoWrap; this.x2771fbe8bb84042b.Alignment = StringAlignment.Center; if (false) { goto label_2; } }while (false); goto label_5; label_2: this.x2771fbe8bb84042b.HotkeyPrefix = hotKeys; return; label_5: if (false) { return; } this.x2771fbe8bb84042b.LineAlignment = StringAlignment.Center; goto label_2; }
public StiStringFormatGeom(StringFormat sf) { this.Alignment = sf.Alignment; this.FormatFlags = sf.FormatFlags; this.HotkeyPrefix = sf.HotkeyPrefix; this.LineAlignment = sf.LineAlignment; this.Trimming = sf.Trimming; }
public void HotKeyPrefix_SetValid_GetReturnsExpected(HotkeyPrefix prefix) { var format = new StringFormat { HotkeyPrefix = prefix }; Assert.Equal(prefix, format.HotkeyPrefix); }
public StringFormat(StringFormatFlags options, int lang) { _alignment = StringAlignment.Near; _digitSubstituteLanguage = lang; _digitSubstituteMethod = StringDigitSubstitute.User; _flags = options; _hotkeyPrefix = HotkeyPrefix.None; _lineAlignment = StringAlignment.Near; _trimming = StringTrimming.Character; }
public bitsTextOptions(bool rightToLeft, bool lineLimit, float angle, float firstTabOffset, float distanceBetweenTabs, HotkeyPrefix hotkeyPrefix, StringTrimming trimming) { this.RightToLeft = rightToLeft; this.LineLimit = lineLimit; this.Angle = angle; this.FirstTabOffset = firstTabOffset; this.DistanceBetweenTabs = distanceBetweenTabs; this.HotkeyPrefix = hotkeyPrefix; this.Trimming = trimming; }
public StringFormat (StringFormat source) { if (source == null) throw new ArgumentNullException("format"); _alignment = source.LineAlignment; _digitSubstituteLanguage = source.DigitSubstitutionLanguage; _digitSubstituteMethod = source.DigitSubstitutionMethod; _flags = source.FormatFlags; _hotkeyPrefix = source.HotkeyPrefix; _lineAlignment = source.LineAlignment; _trimming = source.Trimming; }
public override JObject SaveToJsonObject(StiJsonSaveMode mode) { var jObject = base.SaveToJsonObject(mode); jObject.Add(new JProperty("IsGeneric", IsGeneric)); jObject.Add(new JProperty("Alignment", Alignment.ToString())); jObject.Add(new JProperty("FormatFlags", FormatFlags.ToString())); jObject.Add(new JProperty("HotkeyPrefix", HotkeyPrefix.ToString())); jObject.Add(new JProperty("LineAlignment", LineAlignment.ToString())); jObject.Add(new JProperty("Trimming", Trimming.ToString())); return(jObject); }
public StringFormat(StringFormat source) { if (source == null) { throw new ArgumentNullException("format"); } _alignment = source.LineAlignment; _digitSubstituteLanguage = source.DigitSubstitutionLanguage; _digitSubstituteMethod = source.DigitSubstitutionMethod; _flags = source.FormatFlags; _hotkeyPrefix = source.HotkeyPrefix; _lineAlignment = source.LineAlignment; _trimming = source.Trimming; }
private static TextFormatFlags TranslateHotkeyPrefixForGdi(HotkeyPrefix prefix) { switch (prefix) { case HotkeyPrefix.Show: return(0); case HotkeyPrefix.Hide: return(TextFormatFlags.HidePrefix); case HotkeyPrefix.None: return(TextFormatFlags.NoPrefix); } Debug.Fail("Unknown HotkeyPrefix"); return(0); }
public StringFormat(StringFormat format) { if(format == null) { throw new ArgumentNullException("format"); } this.options = format.options; this.language = format.language; this.alignment = format.alignment; this.digitMethod = format.digitMethod; this.hotkeyPrefix = format.hotkeyPrefix; this.lineAlignment = format.lineAlignment; this.trimming = format.trimming; this.ranges = format.ranges; this.firstTabOffset = format.firstTabOffset; this.tabStops = format.tabStops; }
public StringFormat(StringFormat format) { if (format == null) { throw new ArgumentNullException("format"); } this.options = format.options; this.language = format.language; this.alignment = format.alignment; this.digitMethod = format.digitMethod; this.hotkeyPrefix = format.hotkeyPrefix; this.lineAlignment = format.lineAlignment; this.trimming = format.trimming; this.ranges = format.ranges; this.firstTabOffset = format.firstTabOffset; this.tabStops = format.tabStops; this.IsTypographic = format.IsTypographic; }
/// <summary> /// Creates a new object of the type StiTextOptions. /// </summary> /// <param name="rightToLeft">Horizontal output direction.</param> /// <param name="lineLimit">Show completed lines only.</param> /// <param name="wordWrap">Word wrap.</param> /// <param name="angle">Angle of a text rotation.</param> /// <param name="hotkeyPrefix">Type to draw hot keys.</param> /// <param name="trimming">Type to trim the end of a line.</param> /// <param name="firstTabOffset">First tab offset.</param> /// <param name="distanceBetweenTabs">Distance between tabs.</param> public StiTextOptions(bool rightToLeft, bool lineLimit, bool wordWrap, float angle, HotkeyPrefix hotkeyPrefix, StringTrimming trimming, float firstTabOffset, float distanceBetweenTabs) { this.wordWrap = wordWrap; if (rightToLeft == false && lineLimit == false && angle == 0f && hotkeyPrefix == HotkeyPrefix.None && trimming == StringTrimming.None && firstTabOffset == 40f && distanceBetweenTabs == 20f) { this.bits = null; } else { this.bits = new bitsTextOptions(rightToLeft, lineLimit, angle, firstTabOffset, distanceBetweenTabs, hotkeyPrefix, trimming); } }
public void StartRenderSession(HotkeyPrefix tabHotKeys) { this.xae3b2752a89e7464 = TextFormatFlags.EndEllipsis | TextFormatFlags.HorizontalCenter | TextFormatFlags.SingleLine | TextFormatFlags.VerticalCenter | TextFormatFlags.PreserveGraphicsClipping | TextFormatFlags.NoPadding; if (true) { goto label_4; } label_1: if (true) { return; } label_3: if (tabHotKeys != HotkeyPrefix.Hide) { return; } this.xae3b2752a89e7464 |= TextFormatFlags.HidePrefix; goto label_1; label_4: if (tabHotKeys != HotkeyPrefix.None) { if (true) { goto label_3; } else { goto label_1; } } else { this.xae3b2752a89e7464 |= TextFormatFlags.NoPrefix; } }
private static TextFormatFlags TranslateHotkeyPrefixForGdi(HotkeyPrefix prefix) { switch (prefix) { case HotkeyPrefix.Show: return 0; case HotkeyPrefix.Hide: return TextFormatFlags.HidePrefix; case HotkeyPrefix.None: return TextFormatFlags.NoPrefix; } Debug.Fail("Unknown HotkeyPrefix"); return 0; }
internal static extern int GdipGetStringFormatHotkeyPrefix(HandleRef format, out HotkeyPrefix hotkeyPrefix);
internal static extern Status GdipGetStringFormatHotkeyPrefix(IntPtr format, out HotkeyPrefix hotkeyPrefix);
/// <summary> /// Creates <see cref="CharacterFormat"/> object with implicit formatting. /// </summary> public CharacterFormat() { Font=new Font(FontFamily.GenericSansSerif,8.25f); Brush=new SolidBrush(Color.Black); Angle=0; HotkeyPrefix=HotkeyPrefix.Show; Formatted=false; FilledBounds=false; IgnoreColorFormatting=false; }
internal static extern int GdipSetStringFormatHotkeyPrefix(HandleRef format, HotkeyPrefix hotkeyPrefix);
public abstract void StartRenderSession(HotkeyPrefix hotKeys);
public void StartRenderSession(HotkeyPrefix tabHotKeys) { _textFormat = TextFormatFlags.EndEllipsis | TextFormatFlags.HorizontalCenter | TextFormatFlags.SingleLine | TextFormatFlags.VerticalCenter | TextFormatFlags.PreserveGraphicsClipping | TextFormatFlags.NoPadding; if (tabHotKeys == HotkeyPrefix.None) { _textFormat |= TextFormatFlags.NoPrefix; } else if (tabHotKeys == HotkeyPrefix.Hide) { _textFormat |= TextFormatFlags.HidePrefix; } }
/// <summary> /// Creates a new object of the type StiTextOptions. /// </summary> /// <param name="rightToLeft">Horizontal output direction.</param> /// <param name="lineLimit">Show completed lines only.</param> /// <param name="wordWrap">Word wrap.</param> /// <param name="angle">Angle of a text rotation.</param> /// <param name="hotkeyPrefix">Type to draw hot keys.</param> /// <param name="trimming">Type to trim the end of a line.</param> public StiTextOptions(bool rightToLeft, bool lineLimit, bool wordWrap, float angle, HotkeyPrefix hotkeyPrefix, StringTrimming trimming) : this(rightToLeft, lineLimit, wordWrap, angle, hotkeyPrefix, trimming, 40f, 20f) { }
/// <summary> /// Creates <see cref="CharacterFormat"/> object. /// </summary> /// <param name="f"></param> /// <param name="br"></param> /// <param name="a"></param> /// <param name="hp"></param> /// <param name="formatted"></param> public CharacterFormat(Font f, Brush br, float a, HotkeyPrefix hp, bool formatted) { Font = f; Brush = br; Angle = a; HotkeyPrefix = hp; Formatted = formatted; FilledBounds = false; IgnoreColorFormatting = false; }
public override void StartRenderSession(HotkeyPrefix hotKeys) { base.StartRenderSession(hotKeys); }
public override void StartRenderSession(HotkeyPrefix hotKeys) { _textFormat = (TextFormatFlags.EndEllipsis | TextFormatFlags.SingleLine | TextFormatFlags.VerticalCenter | TextFormatFlags.PreserveGraphicsClipping | TextFormatFlags.NoPadding); if (hotKeys != HotkeyPrefix.None) { if (hotKeys == HotkeyPrefix.Hide) { _textFormat |= TextFormatFlags.HidePrefix; } } else { _textFormat |= TextFormatFlags.NoPrefix; } _sessionCount++; }
public override void StartRenderSession(HotkeyPrefix hotKeys) { _backBrush = new SolidBrush(TabStripBackgroundColor); pen_0 = new Pen(_shadowColor); pen_1 = new Pen(_highlightColor); solidBrush_1 = new SolidBrush(BackgroundTabForeColor); pen_2 = new Pen(_collapsedTabOutlineColor); stringFormat_2 = new StringFormat(StringFormat.GenericDefault) { FormatFlags = StringFormatFlags.NoWrap, Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center, HotkeyPrefix = hotKeys }; }
public override void StartRenderSession(HotkeyPrefix hotKeys) { TextFormat = TextFormatFlags.EndEllipsis | TextFormatFlags.SingleLine | TextFormatFlags.VerticalCenter | TextFormatFlags.PreserveGraphicsClipping | TextFormatFlags.NoPadding; TextFormat |= hotKeys != HotkeyPrefix.None && hotKeys == HotkeyPrefix.Hide ? TextFormatFlags.HidePrefix : TextFormatFlags.NoPrefix; _sessionCount++; }