Exemple #1
0
        } //Clave de Método: Principal-CM

        public void PictureClickMethod(object sender, EventArgs e)
        {
            ArrayPictureBox = new PictureBox[] { PictureMinimize, PictureClose };
            for (; Index < ArrayPictureBox.Length; Index++)
            {
                if (ArrayPictureBox[Index] == sender)
                {
                    break;
                }
            }
            switch (Index)
            {
            case 0:
            {
                if (WindowState == FormWindowState.Normal)
                {
                    WindowState = FormWindowState.Minimized;
                }
                else
                {
                    WindowState = FormWindowState.Normal;
                    Size        = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
                    MinimumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
                }
                break;
            }

            case 1:
            {
                if (ObjLogUser.Visible)
                {
                    ObjLogUser.Hide();
                }
                else
                {
                    ObjLogUser.Show();
                    ObjLogUser.BringToFront();
                }
                break;
            }

            default:
                throw new Exception("Excepción en Método: PCM", new IndexOutOfRangeException());
            }
            Index = 0;
        } //Clave de Método: Principal-PCM