Esempio n. 1
0
        public override void PaintValue(PaintValueEventArgs e)
        {
            BrushMapper bm = (BrushMapper)e.Value;

            e.Graphics.FillRectangle(bm.GetBrush(e.Bounds), e.Bounds);
            base.PaintValue(e);
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor of FormulaBack
 /// </summary>
 public FormulaBack()
 {
     BackGround = new BrushMapper(Color.White);      // new SolidBrush(Color.White);
     LeftPen    = new PenMapper(Color.Black);        // Pen(Color.Black,1);
     TopPen     = new PenMapper(Color.Black);        // Pen(Color.Black,1);
     RightPen   = new PenMapper(Color.Black);        // Pen(Color.Black,1);
     BottomPen  = new PenMapper(Color.Black);        // Pen(Color.Black,1);
 }
Esempio n. 3
0
        public BrushMapper Clone()
        {
            BrushMapper bm = new BrushMapper();

            bm.Color      = Color;
            bm.Color2     = Color2;
            bm.BrushStyle = BrushStyle;
            bm.Alpha      = Alpha;
            bm.Alpha2     = Alpha2;
            bm.HatchStyle = HatchStyle;
            bm.Angle      = Angle;
            return(bm);
        }
Esempio n. 4
0
 /// <summary>
 /// Copy attribute from another FormulaAxisY
 /// </summary>
 /// <param name="fay"></param>
 public void CopyFrom(FormulaAxisY fay)
 {
     visible      = fay.visible;
     autoMultiply = fay.autoMultiply;
     width        = fay.width;
     //autoScale = fay.autoScale;
     majorTick    = fay.majorTick.Clone();
     minorTick    = fay.minorTick.Clone();
     back         = (FormulaBack)fay.back.Clone();
     autoFormat   = fay.autoFormat;
     format       = fay.format;
     multiplyBack = (FormulaBack)fay.multiplyBack.Clone();
     labelFont    = (Font)fay.labelFont.Clone();
     labelBrush   = fay.labelBrush.Clone();
     axisPos      = fay.axisPos;
 }
Esempio n. 5
0
 /// <summary>
 /// Copy attribute from another FormulaAxisX
 /// </summary>
 /// <param name="fax"></param>
 public void CopyFrom(FormulaAxisX fax)
 {
     visible            = fax.visible;
     DateFormatProvider = fax.DateFormatProvider;
     autoScale          = fax.autoScale;
     format             = fax.format;
     majorTick          = fax.majorTick.Clone();
     minorTick          = fax.minorTick.Clone();
     back           = (FormulaBack)fax.back.Clone();
     labelFont      = (Font)fax.labelFont.Clone();
     labelBrush     = fax.labelBrush.Clone();
     axisLabelAlign = fax.axisLabelAlign;
     DataCycle      = fax.DataCycle;
     cursorFormat   = fax.cursorFormat;
     height         = fax.height;
 }
Esempio n. 6
0
 /// <summary>
 /// Used by xml serializer
 /// </summary>
 /// <returns></returns>
 public bool ShouldSerializeNameBrush()
 {
     return(BrushMapper.NotDefault(NameBrush));
 }
Esempio n. 7
0
 public bool ShouldSerializeTextBrush()
 {
     return(BrushMapper.NotDefault(TextBrush));
 }
Esempio n. 8
0
 public static bool NotDefault(BrushMapper ob)
 {
     return(ob.Color != defaultBrush.Color || ob.Color2 != defaultBrush.Color2 ||
            ob.Alpha != defaultBrush.Alpha || ob.Alpha2 != defaultBrush.Alpha2 || ob.Angle != defaultBrush.Angle ||
            ob.HatchStyle != defaultBrush.HatchStyle || ob.BrushStyle != defaultBrush.BrushStyle);
 }