MonoHotDraw.Samples.AnalogClockFigure.AnalogClockFigure C# (CSharp) Method

AnalogClockFigure() public method

public AnalogClockFigure ( ) : System
return System
        public AnalogClockFigure()
            : base()
        {
            DisplayBox = new RectangleD (0.0, 0.0, 100.0, 100.0);

            LineWidth  = 3.0;
            FillColor  = new Color (0.7, 0.7, 0.7, 0.8);
            _now       = DateTime.Now;
            _handles   = new List <IHandle> ();
            //Handle used to keep height and width synchronized when resizing
            _handles.Add (new AnalogClockNorthWestHandle (this));

            _handlesHand = new List <IHandle> ();
            //Handles to move hands
            _handlesHand.Add (new AnalogClockHandHandle (this, new AnalogClockHandLocatorHour ()));
            _handlesHand.Add (new AnalogClockHandHandle (this, new AnalogClockHandLocatorMinute ()));
            _handlesHand.Add (new AnalogClockHandHandle (this, new AnalogClockHandLocatorSecond ()));

            _hourColor   = new Color (0.337, 0.612, 0.117, 0.8);
            _minuteColor = new Color (0.117, 0.337, 0.619, 0.8);
            _secondColor = new Color (1, 1, 1, 0.8);

            _hourHandLength = 0.0;

            //Timer to update time
            GLib.Timeout.Add (500, new GLib.TimeoutHandler (UpdateClock));
        }