示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SimpleScale"/> class.
 /// </summary>
 /// <param name="parent">The parent gauge object.</param>
 public SimpleScale(GaugeObject parent) : base(parent)
 {
     MajorTicks     = new ScaleTicks(10, 2, Color.Black);
     MinorTicks     = new ScaleTicks(6, 1, Color.Black);
     majorTicksNum  = 6;
     firstSubScale  = new SimpleSubScale();
     secondSubScale = new SimpleSubScale();
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RadialPointer"/>
 /// </summary>
 /// <param name="parent">The parent gauge object.</param>
 /// <param name="scale">The scale object.</param>
 public RadialPointer(GaugeObject parent, RadialScale scale) : base(parent)
 {
     this.scale     = scale;
     gradAutoRotate = true;
 }
 /// <inheritdoc />
 public SimpleProgressLabel(GaugeObject parent) : base(parent)
 {
     Parent   = parent as SimpleProgressGauge;
     decimals = 0;
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LinearScale"/> class.
 /// </summary>
 /// <param name="parent">The parent gauge object.</param>
 public LinearScale(GaugeObject parent) : base(parent)
 {
     MajorTicks    = new ScaleTicks(10, 2, Color.Black);
     MinorTicks    = new ScaleTicks(6, 1, Color.Black);
     majorTicksNum = 6;
 }
示例#5
0
 public static Font GetFont(FRPaintEventArgs e, GaugeObject gauge, Font font)
 {
     return(e.Cache.GetFont(font.Name, gauge.IsPrinting ? font.Size : font.Size *e.ScaleX * 96f / DrawUtils.ScreenDpi, font.Style));
 }
示例#6
0
 public static bool IsQuadrant(GaugeObject radialGauge)
 {
     return(((radialGauge as RadialGauge).Type & RadialGaugeType.Quadrant) != 0);
 }
示例#7
0
 public static bool IsSemicircle(GaugeObject radialGauge)
 {
     return(((radialGauge as RadialGauge).Type & RadialGaugeType.Semicircle) != 0);
 }
示例#8
0
 public static bool IsRight(GaugeObject radialGauge)
 {
     return(((radialGauge as RadialGauge).Position & RadialGaugePosition.Right) != 0);
 }
示例#9
0
 public static bool IsBottom(GaugeObject radialGauge)
 {
     return(((radialGauge as RadialGauge).Position & RadialGaugePosition.Bottom) != 0);
 }
示例#10
0
 public static bool IsTop(GaugeObject radialGauge)
 {
     return(((radialGauge as RadialGauge).Position & RadialGaugePosition.Top) != 0);
 }
示例#11
0
        public static SizeF GetStringSize(FRPaintEventArgs e, GaugeObject gauge, Font font, string text)
        {
            Graphics g = e.Graphics;

            return(g.MeasureString(text, GetFont(e, gauge, font)));
        }
示例#12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LinearPointer"/>
 /// </summary>
 /// <param name="parent">The parent gauge object.</param>
 public LinearPointer(GaugeObject parent) : base(parent)
 {
     height = 4.0f;
     width  = 8.0f;
 }
示例#13
0
 public RadialLabel(GaugeObject parent) : base(parent)
 {
     Parent = parent as RadialGauge;
 }
示例#14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SimplePointer"/> class.
 /// </summary>
 /// <param name="parent">The parent gauge object.</param>
 public SimplePointer(GaugeObject parent) : base(parent)
 {
     height           = Parent.Height * ptrRatio;
     width            = Parent.Width * ptrRatio;
     horizontalOffset = 0.5f * Units.Centimeters;
 }
 /// <inheritdoc />
 public SimpleProgressPointer(GaugeObject parent) : base(parent)
 {
     smallPointerWidthRatio = 0.1f;
 }