Beispiel #1
0
        private void UpdateTrackedInfo()
        {
            boundsTextBox.Text          = Bounds.ToString();
            maximizedCheckBox.Checked   = WindowState == FormWindowState.Maximized;
            minimizedCheckBox.Checked   = WindowState == FormWindowState.Minimized;
            clientRectangleTextBox.Text = ClientRectangle.ToString();
            clientRectangleInScreenCoordinatesTextBox.Text = RectangleToScreen(ClientRectangle).ToString();

            currentScreenTextBox.Text = Screen.FromControl(this).DeviceName;
        }
Beispiel #2
0
        protected override void OnPaint(PaintEventArgs pevent)
        {
            Rectangle r = new Rectangle(ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width - 1, ClientRectangle.Height - 1);

            DrawRoundedBox(pevent.Graphics, r, _Corners, _Radius, _FillColor, _BorderColor);

            //log.Debug("RoundedPanel::Paint " + Convert.ToString(++cnt) + " " + ClientRectangle.ToString());
            if (lbl != null)
            {
                lbl.Text = Convert.ToString(++cnt) + " " + ClientRectangle.ToString();
            }
        }
        protected override void OnMouseDown(MouseEventArgs e)
        {
            SetMouseLocation(e.X, e.Y);
            InitSplitter();

            if (this._currentSplitter != EmptyPoint)
            {
                Trace.WriteLine("Window: " + ClientRectangle.ToString() + ", " + DisplayRectangle.ToString());
                Trace.WriteLine("Mouse Down: " + e.Button + ", " + e.X + ":" + e.Y + ", " + e.Location.ToString() + ", " + this._currentSplitter.ToString());

                SetMouseCaptureAndLimits();
                SetKeyboardFilter();
                CalcSplitterRect();
                DrawSplitterRect(SplitBarDrawMode.Start);
            }

            base.OnMouseDown(e);
        }