Example #1
0
 private void ShowIdleScreen()
 {
     // pictureBox1.BackgroundImage = aSlideShow[0];
     pictureBox1.Show();
     RightPanel.Hide();
     CustDGView.Hide();
 }
Example #2
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();
                }
            }
        }
Example #3
0
        public MembersForm(char Person)
        {
            InitializeComponent();
            PopulateGrid("SELECT * FROM Familia_MembersData");

            if (Person == 'M')
            {
                RightPanel.Hide();
                MemberGrid.Columns[7].Visible = false;  // Members Password Restrictions.
                HidenPanel.Size = new Size(17, 0);
            }
        }
Example #4
0
        private void Selection(string SubButton)
        {
            if (SubButton == "Show")
            {
                HeadingLable.Text = "List Of All Cases";
                HidenPanel.Size   = new Size(17, 0);
                RightPanel.Hide();

                if (Identity == "Admin")
                {
                    Query = "";
                }
                else if (Identity != "")
                {
                    Query = "";
                }
            }
            else if (SubButton == "Approve")
            {
                HeadingLable.Text = "List Of Approved Cases";
                CasesGrid.Columns[7].HeaderText = "Approval Date";

                if (Identity == "Admin")
                {
                    ApproveIconButton.Hide();
                    AddIconButton.Hide();
                    RejectIconButton.Location    = new Point(6, 18);
                    PendingIconButton.Location   = new Point(6, 68);
                    CompletedIconButton.Location = new Point(6, 118);
                    DeleteIconButton.Location    = new Point(6, 168);
                    Query = "";
                }
                else if (Identity != "")
                {
                    HidenPanel.Size = new Size(17, 0);
                    RightPanel.Hide();
                    Query = "";
                }
                else        // If no Team is Joined
                {
                    HidenPanel.Size = new Size(17, 0);
                    RightPanel.Hide();
                }
            }
            else if (SubButton == "Rejected")
            {
                HeadingLable.Text = "List Of Rejected Cases";
                CasesGrid.Columns[7].HeaderText = "Rejection Date";

                if (Identity == "Admin")
                {
                    RejectIconButton.Hide();
                    AddIconButton.Hide();
                    PendingIconButton.Location   = new Point(6, 68);
                    CompletedIconButton.Location = new Point(6, 118);
                    DeleteIconButton.Location    = new Point(6, 168);
                    Query = "";
                }
                else if (Identity != "")
                {
                    HidenPanel.Size = new Size(17, 0);
                    RightPanel.Hide();
                    Query = "";
                }
                else
                {
                    HidenPanel.Size = new Size(17, 0);
                    RightPanel.Hide();
                }
            }
            else if (SubButton == "Pending")
            {
                HeadingLable.Text = "List Of Pending Cases";
                CasesGrid.Columns[7].HeaderText = "Pending Date";

                PendingIconButton.Hide();
                CompletedIconButton.Hide();

                if (Identity == "Admin")
                {
                    AddIconButton.Hide();
                    DeleteIconButton.Location = new Point(6, 118);
                    Query = "";
                }
                else if (Identity != "")
                {
                    ApproveIconButton.Hide();
                    RejectIconButton.Hide();
                    // Relocating Buttons
                    AddIconButton.Location    = new Point(6, 18);
                    DeleteIconButton.Location = new Point(6, 68);
                    Query = "";
                }
                else
                {
                    HidenPanel.Size = new Size(17, 0);
                    RightPanel.Hide();
                }
            }
            else
            {
                HeadingLable.Text = "List Of Completed Cases";
                CasesGrid.Columns[7].HeaderText = "Approval Date";

                if (Identity == "Admin")
                {
                    ApproveIconButton.Hide();
                    RejectIconButton.Hide();
                    PendingIconButton.Hide();
                    CompletedIconButton.Hide();
                    AddIconButton.Hide();
                    DeleteIconButton.Location = new Point(6, 18);
                    Query = "";
                }
                else if (Identity != "")
                {
                    HidenPanel.Size = new Size(17, 0);
                    RightPanel.Hide();
                    Query = "";
                }
                else
                {
                    HidenPanel.Size = new Size(17, 0);
                    RightPanel.Hide();
                }
            }
        }