示例#1
0
        private void InternalConstruct(int x, int y, int width, int height)
        {
            _x          = x;
            _y          = y;
            _width      = width;
            _height     = height;
            _clientRect = new Rectangle(_x, _y, _width, _height);
            int       ox    = _clientRect.X + _clientRect.Width / 2 - _meterWidth / 2;
            int       oy    = _clientRect.Y + 4;
            Rectangle oRect = new Rectangle(ox, oy, _meterWidth, _clientRect.Height - 8);

            rect = new RoundedRectangle(oRect, 4);

            if (_collection == null)
            {
                _collection         = new MeterLabelCollection();
                _collection.Delete += new OnRemove(_collection_Delete);
                _collection.Insert += new OnInsert(_collection_Insert);
                _collection.Set    += new OnSet(_collection_Set);
            }
            if (_timer == null)
            {
                _timer          = new Timer();
                _timer.Interval = _interval;
                _timer.Tick    += new EventHandler(_timer_Tick);
            }
        }
示例#2
0
 public SelectControl()
 {
     InitializeComponent();
     _collection         = new MeterLabelCollection();
     _collection.Set    += new OnSet(_collection_Set);
     _collection.Insert += new OnInsert(_collection_Insert);
 }
示例#3
0
 private void InternalConstruct(int x, int y, int width, int height)
 {
     _x          = x;
     _y          = y;
     _width      = width;
     _height     = height;
     _clientRect = new Rectangle(_x, _y, _width, _height);
     _target     = _startGapAngle + _sweepAngle;
     _curAngle   = _target;
     if (_collection == null)
     {
         _collection         = new MeterLabelCollection();
         _collection.Insert += new OnInsert(_collection_Insert);
         _collection.Delete += new OnRemove(_collection_Delete);
         _collection.Set    += new OnSet(_collection_Set);
     }
     if (_timer == null)
     {
         _timer          = new Timer();
         _timer.Interval = 1;
         _timer.Tick    += new EventHandler(_timer_Tick);
     }
 }