Esempio n. 1
0
        private void TeamsForm_SizeChanged(object sender, EventArgs e)
        {
            if ((this.Height > 640))        // Maximized
            {
                // Panels
                RightBackPanel.Size = new Size(118, 0);
                SearchPanel.Show();
                PartionPanel.Hide();
                MemberGrid.Show();

                if (Person == "Admin")
                {
                    TeamGrid.Dock = DockStyle.Left;  // Make TeamGrid Dock Left
                    PartionPanel.Show();
                    UpdateIconButton.Hide();
                    DeleteIconButton.Location = new Point(11, 62);
                }
                else if (ButtonPressed == 0) // Show all Teams Head/Non-Head Member
                {
                    RightPanel.Hide();
                }
                else if (ButtonPressed == 1)
                {
                    if (Person == "Head")  // Show My Team of Head-Member
                    {
                        RightPanel.Show();
                        UpdateIconButton.Hide();
                        DeleteIconButton.Location = new Point(11, 62);
                    }
                    else  // Show My Team of Non-Head-Member
                    {
                        RightPanel.Hide();
                    }
                }
            }
            else        // Restored
            {
                // Panels
                RightBackPanel.Size = new Size(136, 0);
                PartionPanel.Hide();
                SearchPanel.Hide();
                MemberGrid.Hide();
                TeamGrid.Dock = DockStyle.Fill; // Make TeamGrid Dock Fill so it occupy all remaining form

                if (Person == "Admin")          // Admin Case
                {
                    UpdateIconButton.Show();
                    DeleteIconButton.Location = new Point(11, 104);
                }
                else                    // All other Possible Cases
                {
                    RightPanel.Hide();
                }
            }
        }
Esempio n. 2
0
 private void HideIdleScreen()
 {
     pictureBox1.Hide();
     RightPanel.Show();
     CustDGView.Show();
 }