Exemplo n.º 1
0
        private void popOffUserControlStack(RentMeUserControl customerUserControl)
        {
            if (this.userControlStack.Count < 2)
            {
                return;
            }

            var previousUC = this.userControlStack[this.userControlStack.Count - 1];

            this.userControlStack.RemoveAt(this.userControlStack.Count - 1);

            var         newUcInterface = this.userControlStack[this.userControlStack.Count - 1];
            UserControl newUserControl = newUcInterface;

            newUserControl.Enabled  = true;
            newUserControl.Visible  = true;
            newUserControl.Location = this.userControlLocation;

            newUcInterface.ChildReturned = previousUC;

            this.swapDataGridView(newUcInterface.DataGrid);
            newUcInterface.StateChanged += this.StateChange;

            Controls.Add(newUserControl);

            newUcInterface.processChild();
        }
Exemplo n.º 2
0
        private void removeUCFromDisplay(RentMeUserControl userControl)
        {
            UserControl uc = userControl;

            uc.Enabled = false;
            uc.Visible = false;

            Controls.Remove(uc);

            userControl.StateChanged -= this.StateChange;
        }
Exemplo n.º 3
0
        private void addUCToDisplay(RentMeUserControl ucInterface)
        {
            UserControl userControl = ucInterface;

            userControl.Enabled  = true;
            userControl.Visible  = true;
            userControl.Location = this.userControlLocation;

            this.swapDataGridView(ucInterface.DataGrid);
            ucInterface.StateChanged += this.StateChange;

            Controls.Add(userControl);

            if (this.userControlStack.Count >= 2)
            {
                ucInterface.ParentParameter = this.userControlStack[this.userControlStack.Count - 2];
                ucInterface.processParentIntention();
            }
        }
Exemplo n.º 4
0
 private void displayNewUserControl(RentMeUserControl uc)
 {
     this.userControlStack.Add(uc);
     this.addUCToDisplay(uc);
 }
Exemplo n.º 5
0
        private void popOffUserControlStack(RentMeUserControl customerUserControl)
        {
            if (this.userControlStack.Count < 2)
            {
                return;
            }

            var previousUC = this.userControlStack[this.userControlStack.Count - 1];

            this.userControlStack.RemoveAt(this.userControlStack.Count - 1);

            var newUcInterface = this.userControlStack[this.userControlStack.Count - 1];
            UserControl newUserControl = newUcInterface;
            newUserControl.Enabled = true;
            newUserControl.Visible = true;
            newUserControl.Location = this.userControlLocation;

            newUcInterface.ChildReturned = previousUC;

            this.swapDataGridView(newUcInterface.DataGrid);
            newUcInterface.StateChanged += this.StateChange;

            Controls.Add(newUserControl);

            newUcInterface.processChild();
        }
Exemplo n.º 6
0
        private void addUCToDisplay(RentMeUserControl ucInterface)
        {
            UserControl userControl = ucInterface;
            userControl.Enabled = true;
            userControl.Visible = true;
            userControl.Location = this.userControlLocation;

            this.swapDataGridView(ucInterface.DataGrid);
            ucInterface.StateChanged += this.StateChange;

            Controls.Add(userControl);

            if (this.userControlStack.Count >= 2)
            {
                ucInterface.ParentParameter = this.userControlStack[this.userControlStack.Count - 2];
                ucInterface.processParentIntention();
            }
        }
Exemplo n.º 7
0
        private void removeUCFromDisplay(RentMeUserControl userControl)
        {
            UserControl uc = userControl;

            uc.Enabled = false;
            uc.Visible = false;

            Controls.Remove(uc);

            userControl.StateChanged -= this.StateChange;
        }
Exemplo n.º 8
0
 private void displayNewUserControl(RentMeUserControl uc)
 {
     this.userControlStack.Add(uc);
     this.addUCToDisplay(uc);
 }