Exemple #1
0
        private void nextButton_Click(object sender, EventArgs e)
        {
            GlobalData.SelectedProductsList.Clear();

            InstallerControl newContentControl      = contentControls[0];
            CheckedListBox   productsCheckedListBox = (CheckedListBox)this.Controls.Find("productsCheckedListBox", true)[0];

            if (productsCheckedListBox.CheckedItems.Count > 0)
            {
                foreach (object itemChecked in productsCheckedListBox.CheckedItems)
                {
                    if (!GlobalData.SelectedProductsList.Contains(itemChecked.ToString()))
                    {
                        GlobalData.SelectedProductsList.Add(itemChecked.ToString());
                    }
                }
            }

            currentContentControlIndex++;
            ReplaceContentControl(currentContentControlIndex);
        }
Exemple #2
0
        private void ReplaceContentControl(int index)
        {
            if (currentContentControl != null)
            {
            }

            if (index == 0)
            {
                prevButton.Enabled = false;
                nextButton.Enabled = true;
            }
            else if (index == (contentControls.Count - 1))
            {
                prevButton.Enabled = true;
                nextButton.Enabled = false;
            }
            else
            {
                prevButton.Enabled = true;
                nextButton.Enabled = true;
            }

            InstallerControl newContentControl = contentControls[index];

            newContentControl.Dock = DockStyle.Fill;

            titleLabel.Text    = newContentControl.Title;
            subTitleLabel.Text = newContentControl.SubTitle;

            contentPanel.Controls.Clear();
            contentPanel.Controls.Add(newContentControl);

            newContentControl.Open();

            currentContentControl = newContentControl;
        }