コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="host">host</param>
        public MarginDockButtons(FormWrapper host)
        {
            _host = host;

            _leftButtonBounds.Size   = _dockLeftGuider.Size;
            _rightButtonBounds.Size  = _dockRightGuider.Size;
            _topButtonBounds.Size    = _dockTopGuider.Size;
            _bottomButtonBounds.Size = _dockBottomGuider.Size;

            _dockLeftGuider.Visible   = false;
            _dockRightGuider.Visible  = false;
            _dockTopGuider.Visible    = false;
            _dockBottomGuider.Visible = false;

            _dockLeftGuider.Text   = "outer left button";
            _dockRightGuider.Text  = "outer right button";
            _dockTopGuider.Text    = "outer top button";
            _dockBottomGuider.Text = "outer bottom button";

            _host.AddFirst(_dockLeftGuider);
            _host.AddFirst(_dockRightGuider);
            _host.AddFirst(_dockTopGuider);
            _host.AddFirst(_dockBottomGuider);

            _host.KeepFirst[0] = _dockLeftGuider;
            _host.KeepFirst[1] = _dockRightGuider;
            _host.KeepFirst[2] = _dockTopGuider;
            _host.KeepFirst[3] = _dockBottomGuider;

            _host.AddToIgnoreOnGetChildFromPoint(_dockLeftGuider);
            _host.AddToIgnoreOnGetChildFromPoint(_dockRightGuider);
            _host.AddToIgnoreOnGetChildFromPoint(_dockTopGuider);
            _host.AddToIgnoreOnGetChildFromPoint(_dockBottomGuider);
        }
コード例 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="host">host</param>
        public CenterDockButtons(FormWrapper host)
        {
            _host = host;

            _leftButtonBounds.Size   = _dockLeftGuider.Size;
            _rightButtonBounds.Size  = _dockRightGuider.Size;
            _topButtonBounds.Size    = _dockTopGuider.Size;
            _bottomButtonBounds.Size = _dockBottomGuider.Size;
            _fillButtonBounds.Size   = _dockFillGuider.FillSize;

            _dockLeftGuider.Visible   = false;
            _dockRightGuider.Visible  = false;
            _dockTopGuider.Visible    = false;
            _dockBottomGuider.Visible = false;
            _dockFillGuider.Visible   = false;

            _dockLeftGuider.Text   = "inner left button";
            _dockRightGuider.Text  = "inner right button";
            _dockTopGuider.Text    = "inner top button";
            _dockBottomGuider.Text = "inner bottom button";
            _dockFillGuider.Text   = "inner fill button";

            _host.AddFirst(_dockLeftGuider);
            _host.AddFirst(_dockRightGuider);
            _host.AddFirst(_dockTopGuider);
            _host.AddFirst(_dockBottomGuider);
            _host.AddFirst(_dockFillGuider);

            _host.KeepFirst[4] = _dockLeftGuider;
            _host.KeepFirst[5] = _dockRightGuider;
            _host.KeepFirst[6] = _dockTopGuider;
            _host.KeepFirst[7] = _dockBottomGuider;
            _host.KeepFirst[8] = _dockFillGuider;

            _host.AddToIgnoreOnGetChildFromPoint(_dockLeftGuider);
            _host.AddToIgnoreOnGetChildFromPoint(_dockRightGuider);
            _host.AddToIgnoreOnGetChildFromPoint(_dockTopGuider);
            _host.AddToIgnoreOnGetChildFromPoint(_dockBottomGuider);
            _host.AddToIgnoreOnGetChildFromPoint(_dockFillGuider);
        }