Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZeroitCircularGauge"/> class.
        /// </summary>
        public ZeroitCircularGauge()
            : base(false)
        {
            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.DoubleBuffer | ControlStyles.SupportsTransparentBackColor, true);

            DoubleBuffered = true;


            m_axis   = new CircularAxis();
            m_needle = new Needle();

            m_axis.AppearanceChanged += new EventHandler(OnItemAppearanceChanged);
            m_axis.LayoutChanged     += new EventHandler(OnItemLayoutChanged);

            m_needle.AppearanceChanged += new EventHandler(OnItemAppearanceChanged);
            m_needle.LayoutChanged     += new EventHandler(OnItemLayoutChanged);

            m_needle.CalculatePaths(ClientRectangle);
            m_axis.CalculatePaths(ClientRectangle);

            InitializeComponent();

            Value             = 0;
            Animate           = true;
            EaseFunction      = EaseFunctionType.Linear;
            AnimationLength   = 1000;
            AnimationInterval = 100;
            EaseMode          = EaseMode.InOut;
        }
Example #2
0
        public CircularGauge()
            : base(false)
        {
            m_axis   = new CircularAxis();
            m_needle = new Needle();

            m_axis.AppearanceChanged += new EventHandler(OnItemAppearanceChanged);
            m_axis.LayoutChanged     += new EventHandler(OnItemLayoutChanged);

            m_needle.AppearanceChanged += new EventHandler(OnItemAppearanceChanged);
            m_needle.LayoutChanged     += new EventHandler(OnItemLayoutChanged);

            m_needle.CalculatePaths(ClientRectangle);
            m_axis.CalculatePaths(ClientRectangle);

            InitializeComponent();

            Value             = 0;
            Animate           = true;
            EaseFunction      = EaseFunctionType.Linear;
            AnimationLength   = 1000;
            AnimationInterval = 100;
            EaseMode          = EaseMode.InOut;
        }