Exemplo n.º 1
0
 public ImageBox()
 {
     this._drawgingMode = this._drawArgs.DrawingMode;
     this._backColorBrush = new SolidBrush(this.BackColor);
     this._cropPen = new Pen(Color.WhiteSmoke);
     this._cropBrush = new SolidBrush(Color.WhiteSmoke);
     this._vScrollBar = new VScrollBar();
     this._vScrollBar.Visible = false;
     this._vScrollBar.Bounds = new Rectangle(base.Width - this._scrollBarWidth, 0, this._scrollBarWidth, (base.Height - this._scrollBarWidth) + 1);
     this._vScrollBar.Anchor = AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top;
     this._vScrollBar.ValueChanged += new EventHandler(this._vScrollBar_ValueChanged);
     base.Controls.Add(this._vScrollBar);
     this._hScrollBar = new HScrollBar();
     this._hScrollBar.Visible = false;
     this._hScrollBar.Bounds = new Rectangle(0, base.Height - this._scrollBarWidth, base.Width, this._scrollBarWidth);
     this._hScrollBar.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
     this._hScrollBar.ValueChanged += new EventHandler(this._hScrollBar_ValueChanged);
     base.Controls.Add(this._hScrollBar);
     this.UpdateScrollBars();
     this._drawArgs.BackgroundColor = this.BackColor;
 }
Exemplo n.º 2
0
 public ImageBox()
 {
     this._drawgingMode             = this._drawArgs.DrawingMode;
     this._backColorBrush           = new SolidBrush(this.BackColor);
     this._cropPen                  = new Pen(Color.WhiteSmoke);
     this._cropBrush                = new SolidBrush(Color.WhiteSmoke);
     this._vScrollBar               = new VScrollBar();
     this._vScrollBar.Visible       = false;
     this._vScrollBar.Bounds        = new Rectangle(base.Width - this._scrollBarWidth, 0, this._scrollBarWidth, (base.Height - this._scrollBarWidth) + 1);
     this._vScrollBar.Anchor        = AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top;
     this._vScrollBar.ValueChanged += new EventHandler(this._vScrollBar_ValueChanged);
     base.Controls.Add(this._vScrollBar);
     this._hScrollBar               = new HScrollBar();
     this._hScrollBar.Visible       = false;
     this._hScrollBar.Bounds        = new Rectangle(0, base.Height - this._scrollBarWidth, base.Width, this._scrollBarWidth);
     this._hScrollBar.Anchor        = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
     this._hScrollBar.ValueChanged += new EventHandler(this._hScrollBar_ValueChanged);
     base.Controls.Add(this._hScrollBar);
     this.UpdateScrollBars();
     this._drawArgs.BackgroundColor = this.BackColor;
 }