Ejemplo n.º 1
0
        public GaugeFrame(GaugeControl gaugeControl)
        {
            _GaugeControl = gaugeControl;

            Style = GaugeFrameStyle.None;

            _InnerBevel = .035f;
            _OuterBevel = .05f;
            _RoundRectangleArc = .125f;

            _BackSigmaFocus = 1;
            _BackSigmaScale = 1;
            _FrameSigmaFocus = .15f;
            _FrameSigmaScale = 1;

            BackColor = new GradientFillColor(Color.Silver, Color.Gray, 45);
            FrameColor = new GradientFillColor(Color.Gainsboro, Color.Gray, 45);
        }
Ejemplo n.º 2
0
 protected override void ProcessTemplateText(
     GaugeControl gauge, StringBuilder sb, string key, string data)
 {
     if (key.Equals("Value") == true)
     {
         sb.Append(string.IsNullOrEmpty(data)
                       ? _Value.ToString()
                       : String.Format("{0:" + data + "}", _Value));
     }
     else
     {
         base.ProcessTemplateText(gauge, sb, key, data);
     }
 }
Ejemplo n.º 3
0
        protected override void ProcessTemplateText(
            GaugeControl gauge, StringBuilder sb, string key, string data)
        {
            switch (key)
            {
                case "StartValue":
                    sb.Append(string.IsNullOrEmpty(data)
                        ? _StartValue.ToString()
                        : String.Format("{0:" + data + "}", _StartValue));
                    break;

                case "EndValue":
                    sb.Append(string.IsNullOrEmpty(data)
                        ? _EndValue.ToString()
                        : String.Format("{0:" + data + "}", _EndValue));
                    break;

                default:
                    base.ProcessTemplateText(gauge, sb, key, data);
                    break;
            }
        }