Пример #1
0
        public LBAnalogMeter()
        {
            // Initialization
            InitializeComponent();

            // Properties initialization
            this.bodyColor         = Color.Red;
            this.needleColor       = Color.Yellow;
            this.scaleColor        = Color.White;
            this.meterStyle        = AnalogMeterStyle.Circular;
            this.viewGlass         = true;
            this.startAngle        = 135;
            this.endAngle          = 405;
            this.minValue          = 0;
            this.maxValue          = 1;
            this.currValue         = 0;
            this.scaleDivisions    = 11;
            this.scaleSubDivisions = 4;
            this.renderer          = null;

            // Create the sector list
            this.listThreshold = new LBMeterThresholdCollection();

            // Set the styles for drawing
            SetStyle(ControlStyles.AllPaintingInWmPaint |
                     ControlStyles.ResizeRedraw |
                     ControlStyles.DoubleBuffer |
                     ControlStyles.SupportsTransparentBackColor,
                     true);

            // Transparent background
            this.BackColor = Color.Transparent;

            // Create the default renderer
            this.defaultRenderer             = new LBAnalogMeterRenderer();
            this.defaultRenderer.AnalogMeter = this;

            this.CalculateDimensions();
        }
Пример #2
0
        public LBAnalogMeter()
        {
            // Initialization
            InitializeComponent();

            // Properties initialization
            this.bodyColor = Color.Red;
            this.needleColor = Color.Yellow;
            this.scaleColor = Color.White;
            this.meterStyle = AnalogMeterStyle.Circular;
            this.viewGlass = true;
            this.startAngle = 135;
            this.endAngle = 405;
            this.minValue = 0;
            this.maxValue = 1;
            this.currValue = 0;
            this.scaleDivisions = 11;
            this.scaleSubDivisions = 4;
            this.renderer = null;

            // Create the sector list
            this.listThreshold = new LBMeterThresholdCollection();

            // Set the styles for drawing
            SetStyle(ControlStyles.AllPaintingInWmPaint |
                ControlStyles.ResizeRedraw |
                ControlStyles.DoubleBuffer |
                ControlStyles.SupportsTransparentBackColor,
                true);

            // Transparent background
            this.BackColor = Color.Transparent;

            // Create the default renderer
            this.defaultRenderer = new LBAnalogMeterRenderer();
            this.defaultRenderer.AnalogMeter = this;

            this.CalculateDimensions();
        }
Пример #3
0
        public LBAnalogMeter()
        {
            // Initialization
            InitializeComponent();

            // Properties initialization
            this.bodyColor = Color.Red;
            this.needleColor = Color.Yellow;
            this.scaleColor = Color.White;
            this.meterStyle = AnalogMeterStyle.Circular;
            this.viewGlass = false;
            this.startAngle = 135;
            this.endAngle = 405;
            this.minValue = 0;
            this.maxValue = 1;
            this.currValue = 0;
            this.scaleDivisions = 10;
            this.scaleSubDivisions = 10;

            // Create the sector list
            this.listThreshold = new LBMeterThresholdCollection();

            this.CalculateDimensions();
        }
Пример #4
0
        public LBAnalogMeter()
        {
            // Initialization
            InitializeComponent();

            // Properties initialization
            this.bodyColor         = Color.Red;
            this.needleColor       = Color.Yellow;
            this.scaleColor        = Color.White;
            this.meterStyle        = AnalogMeterStyle.Circular;
            this.viewGlass         = false;
            this.startAngle        = 135;
            this.endAngle          = 405;
            this.minValue          = 0;
            this.maxValue          = 1;
            this.currValue         = 0;
            this.scaleDivisions    = 10;
            this.scaleSubDivisions = 10;

            // Create the sector list
            this.listThreshold = new LBMeterThresholdCollection();

            this.CalculateDimensions();
        }