Exemple #1
0
        private void synBox1_DoubleClick(object sender, EventArgs e)
        {
            if (_isFullScreen)
            {
                var height = this.Size.Height - (6 + 17);
                var widht  = this.Size.Width - (6 + 17);

                synBox1.Size     = new Size(widht, height);
                synBox1.Location = new Point(3, 3);
                synBox1.BringToFront();

                pictureBox1.BringToFront();
                pictureBox1.Location = new Point(3, Size.Height - 20);

                pictureBox2.BringToFront();
                pictureBox2.Height   = Size.Height - (6 + 17);
                pictureBox2.Location = new Point(Size.Width - 20, 3);

                pictureBox3.BringToFront();
                pictureBox3.Location = new Point(Size.Width - 18, 3);

                pictureBox4.BringToFront();
                pictureBox4.Location = new Point(Size.Width - 18, Size.Height - (16 + 17));

                pictureBox5.BringToFront();
                pictureBox5.Location = new Point(pictureBox5.Location.X, Size.Height - 18);

                pictureBox6.BringToFront();
                pictureBox6.Location = new Point(pictureBox6.Location.X, Size.Height - 18);

                vMyScrollBar.BringToFront();
                vMyScrollBar.Height   = Size.Height - (6 + 17 + 13 * 2);
                vMyScrollBar.Location = new Point(Size.Width - 18, 16);

                hMyScrollBar.BringToFront();
                hMyScrollBar.Location = new Point(hMyScrollBar.Location.X, Size.Height - 17);

                currentCol.BringToFront();
                currentCol.Location = new Point(currentCol.Location.X, Size.Height - 18);

                CurrentLine.BringToFront();
                CurrentLine.Location = new Point(CurrentLine.Location.X, Size.Height - 18);

                ZoomIn.BringToFront();
                ZoomIn.Location = new Point(ZoomIn.Location.X, Size.Height - 18);

                ZoomOut.BringToFront();
                ZoomOut.Location = new Point(ZoomOut.Location.X, Size.Height - 18);

                _isFullScreen = false;
            }
            else
            {
                synBox1.Location = new Point(4, 89);
                synBox1.Size     = new Size(Size.Width - 27, Size.Height - 153);
                synBox1.SendToBack();

                pictureBox1.Location = new Point(3, Size.Height - 63);

                pictureBox2.Height   = Size.Height - (63 + 89);
                pictureBox2.Location = new Point(Size.Width - 20, 89);

                pictureBox3.Location = new Point(Size.Width - 18, 89);
                pictureBox4.Location = new Point(Size.Width - 18, Size.Height - (17 + 63));

                pictureBox5.Location = new Point(pictureBox5.Location.X, Size.Height - 61);
                pictureBox6.Location = new Point(pictureBox6.Location.X, Size.Height - 61);

                vMyScrollBar.Height   = Size.Height - (6 + 17 + 13 * 2);
                vMyScrollBar.Location = new Point(Size.Width - 18, 16);
                hMyScrollBar.Location = new Point(hMyScrollBar.Location.X, Size.Height - 60);

                currentCol.Location  = new Point(currentCol.Location.X, Size.Height - 61);
                CurrentLine.Location = new Point(CurrentLine.Location.X, Size.Height - 61);

                ZoomIn.Location  = new Point(ZoomIn.Location.X, Size.Height - 61);
                ZoomOut.Location = new Point(ZoomOut.Location.X, Size.Height - 61);

                vScrollBar.SendToBack();
                hScrollBar.SendToBack();
                _isFullScreen = true;
            }
        }