Пример #1
0
 private void ResetApp()
 {
     foreach (GeneralDataPanel gdp in this.kitboxData)
     {
         gdp.Clear();
         this.Controls.Remove(gdp);
     }
     this.Controls.Remove(this.confirmOrderLayout);
     this.confirmOrderLayout = new ConfirmOrderLayout(this.ResetApp, this.BackFromConfirmOrder);
     kitboxData.Clear();
     selectedGeneralDataPanel = null;
     this.kitBoxToOrderTabs.TabPages.Clear();
     this.AddKitbox_Click(null, null);
 }
Пример #2
0
        private void AddKitbox_Click(object sender, EventArgs e)
        {
            /*
             * Add a new kitbox
             */
            GeneralDataPanel generalDataPanel = new GeneralDataPanel(this.AvailableKitboxDimension, this.availableAngleHeight, this.availableAngleColor, this.availablePanelColor, this.availbleDoorPanelColor);

            this.kitboxData.Add(generalDataPanel);
            this.selectedGeneralDataPanel = generalDataPanel;
            this.Controls.Add(generalDataPanel);

            this.kitBoxToOrderTabs.TabPages.Add(generalDataPanel.GetKitBoxTab());
            this.kitBoxToOrderTabs.SelectedTab = generalDataPanel.GetKitBoxTab();
        }
Пример #3
0
        private void removeKitBoxButton_Click(object sender, EventArgs e)
        {
            if (this.kitboxData.Count() > 1)
            {
                this.Controls.Remove(this.selectedGeneralDataPanel);
                this.kitboxData.Remove(this.selectedGeneralDataPanel);
                this.kitBoxToOrderTabs.TabPages.Remove(this.selectedGeneralDataPanel.GetKitBoxTab());

                this.selectedGeneralDataPanel      = this.kitboxData.Last();
                this.kitBoxToOrderTabs.SelectedTab = this.selectedGeneralDataPanel.GetKitBoxTab();
                try
                {
                    this.Controls.Add(this.selectedGeneralDataPanel);
                }
                catch { }
            }
        }
Пример #4
0
 private void SetKitBoxData(object sender, EventArgs e)
 {
     /*
      * Used to remove current KitBox data layout and display the selected one.
      */
     try
     {
         foreach (GeneralDataPanel kitBox in this.kitboxData)
         {
             this.Controls.Remove(kitBox);
         }
         this.selectedGeneralDataPanel = this.kitboxData[this.kitBoxToOrderTabs.SelectedIndex];
         this.Controls.Add(this.selectedGeneralDataPanel);
     }
     catch (ArgumentOutOfRangeException)
     {
     }
 }