Пример #1
0
    public override Control Generete()
    {
        GaugeControl gc = new GaugeControl();

        gc.BackColor = Color.Transparent;
        gc.Size      = Size;
        gc.Location  = Location;
        var digitalGauge = gc.AddDigitalGauge();

        // The text to be displayed.
        digitalGauge.Text = "Gauge Control";
        // The number of digits.
        digitalGauge.DigitCount = 14;
        // Use 14 segment display mode.
        digitalGauge.DisplayMode = DigitalGaugeDisplayMode.FourteenSegment;
        // Add a background layer and set its painting style.
        DigitalBackgroundLayerComponent background2 = digitalGauge.AddBackgroundLayer();

        background2.ShapeType = DigitalBackgroundShapeSetType.Style2;
        // Set the color of digits.
        digitalGauge.AppearanceOn.ContentBrush = new SolidBrushObject(Color.Red);
        // Add the gauge control to the form.
        Control = gc;
        return(gc);
    }
        public override void SetupGaugeCore(GaugeControl gaugeContainer)
        {
            DigitalGauge digitalGauge = gaugeContainer.AddDigitalGauge();

            // The number of digits.
            digitalGauge.DigitCount = 14;
            // Use 14 segment display mode.
            digitalGauge.DisplayMode = DigitalGaugeDisplayMode.FourteenSegment;
            // Add a background layer and set its painting style.
            DigitalBackgroundLayerComponent backgroundDigital = digitalGauge.AddBackgroundLayer();

            BindableComponent           = digitalGauge;
            backgroundDigital.ShapeType = DigitalBackgroundShapeSetType.Style2;
            // Set the color of digits.
            digitalGauge.AppearanceOn.ContentBrush = new SolidBrushObject(Color.Red);
        }