Exemplo n.º 1
0
 public static FontAndColor GeneralPickFontAndColor(IWin32Window who, FontAndColor what)
 {
     using (FontDialog fd = new FontDialog())
     {
         fd.AllowSimulations = true;
         fd.ScriptsOnly = false;
         fd.ShowColor = true;
         fd.FontMustExist = true;
         fd.ShowEffects = true;
         fd.Font = what.Font;
         fd.Color = what.Color;
         if (fd.ShowDialog(who) == DialogResult.OK)
         {
             return new FontAndColor(fd.Font, fd.Color);
         }
         else
             return FontAndColor.Empty;
     }
 }
Exemplo n.º 2
0
 public TreeOptions()
 {
     rendermode        = RenderMode.Walker;
     treealignment     = TreeAlignmentEnum.Middle;
     marginhorizontal  = 20;
     marginvertical    = 20;
     paddinghorizontal = 0;
     paddingvertical   = 5;
     tracehorizontal   = 3;
     tracevertical     = 10;
     backgroundcolor   = Color.White;
     labelfont         = new FontAndColor(DefaultFont(), Color.Black);
     lexicalfont       = new FontAndColor(DefaultFont(), Color.Red);
     highlightcolor    = Color.Blue;
     antialias         = true;
     linestyle         = new PenStyle(Color.Black, 1.0f, DashStyle.Solid, ArrowStyle.None);
     tracestyle        = new PenStyle(Color.Black, 1.0f, DashStyle.Dot, ArrowStyle.LittleArrow);
     tracemode         = TraceStyle.Line;
 }
Exemplo n.º 3
0
 public TreeOptions()
 {
     rendermode = RenderMode.Walker;
     treealignment = TreeAlignmentEnum.Middle;
     marginhorizontal = 20;
     marginvertical = 20;
     paddinghorizontal = 0;
     paddingvertical = 5;
     tracehorizontal = 3;
     tracevertical = 10;
     backgroundcolor = Color.White;
     labelfont = new FontAndColor(DefaultFont(), Color.Black);
     lexicalfont = new FontAndColor(DefaultFont(), Color.Red);
     highlightcolor = Color.Blue;
     antialias = true;
     linestyle = new PenStyle(Color.Black, 1.0f, DashStyle.Solid, ArrowStyle.None);
     tracestyle = new PenStyle(Color.Black, 1.0f, DashStyle.Dot, ArrowStyle.LittleArrow);
     tracemode = TraceStyle.Line;
 }
Exemplo n.º 4
0
        public static string TextAndColorToRtf(string text, FontAndColor fc)
        {
            Dummy dummy = GetInstance();
            dummy.Reset();
            dummy.Text = text;
            dummy.SelectAll();
            dummy.SelectionAlignment = HorizontalAlignment.Left; //hack
            dummy.SelectionFont = fc.Font;
            dummy.SelectionColor = fc.Color;

            return dummy.Rtf;
        }
Exemplo n.º 5
0
 private FontAndColor PickFontAndColor(FontAndColor input)
 {
     return GeneralPickFontAndColor(this, input);
 }