Пример #1
0
        public void CreateUserInterface(TableLayoutPanel layoutPanel, InstallSequence installers)
        {
            layoutPanel.RowCount = installers.Count;
            int vertScrollWidth = SystemInformation.VerticalScrollBarWidth;

            layoutPanel.Padding = new Padding(0, 0, vertScrollWidth, 0);

            int rowIndex = 0;

            foreach (var installer in installers)
            {
                var checkBox = new CheckBox
                {
                    Tag       = installer,
                    Checked   = installer.Enabled,
                    Text      = installer.Name,
                    TextAlign = ContentAlignment.MiddleLeft,
                    Width     = 200
                };
                checkBox.CheckedChanged += CheckBox_CheckedChanged;

                layoutPanel.Controls.Add(checkBox, 0, rowIndex++);
                layoutPanel.RowStyles.Add(new RowStyle());
            }
            layoutPanel.Controls.Add(new Label(), 0, rowIndex);
        }
Пример #2
0
        public SelectComponentsForm(InstallSequence installSequence, HashSet <string> installerGroups)
        {
            InitializeComponent();

            InstallSequence = installSequence;
            foreach (var group in installerGroups)
            {
                ComboBox.Items.Add(group);
            }

            Lng.Translate(this);
            Text = Text.Replace(InstallerConstants.InstallerTitle, InstallerProperties.InstallerTitle);
            ComboBox.SelectedIndex = 0;
        }
        public PrerequisitesForm(InstallSequence installers)
        {
            Prerequisites = installers.Where(installer => installer.Enabled && installer.InstallerType == InstallerType.Prerequisite).ToList();
            if (!Prerequisites.Any())
            {
                DialogResult = DialogResult.OK;
                Close();
            }

            InitializeComponent();

            foreach (var prerequisite in Prerequisites)
            {
                LvPrerequisites.Items.Add(new ListViewItem(prerequisite.ToString()));
            }

            Lng.Translate(this);
            Text                   = Text.Replace(InstallerConstants.InstallerTitle, InstallerProperties.InstallerTitle);
            LblWelcome.Text        = LblWelcome.Text.Replace(InstallerConstants.ProductName, InstallerProperties.ProductName);
            LblChooseLanguage.Text = LblChooseLanguage.Text.Replace(InstallerConstants.ProductName, InstallerProperties.ProductName);
        }