public WizardForm(WixFiles editWixFiles) { wixFiles = editWixFiles; undoCountBefore = wixFiles.UndoManager.UndoCount; InitializeComponent(); string welcomeMessage = "The WixEdit wizard helps you to create or edit MSI files. The wizard allows you to easily add files and functionality to your MSI file.\r\n\r\nFor example:\r\nAdd files, Create shortcuts, Create virual directories, etc.\r\n\r\n\r\nClick \"Next\" to continue or \"Cancel\" to exit the WixEdit wizard."; if (!editWixFiles.IsNew) { welcomeMessage += "\r\n\r\nNote: Existing complex installers may give problems with the wizard."; } IntroductionSheet welcome = new IntroductionSheet("WixEdit wizard", welcomeMessage, this); AddSheet(welcome); FileSheet files = new FileSheet(this); AddSheet(files); SelectTemplatesSheet selectTemplates = new SelectTemplatesSheet(this); AddSheet(selectTemplates); endSheet = new FinishSheet(this); endSheet.Dock = DockStyle.Fill; contentPanel.Controls.Add(endSheet); endSheet.Visible = false; }
public void AddTemplate(XmlElement template) { IntroductionSheet intro = new IntroductionSheet(template, this); AddSheet(intro); for (int i = 1; ; i++) { XmlElement step = (XmlElement)template.SelectSingleNode(String.Format("Step[@Sequence={0}]", i)); if (step == null) { break; } StepSheet stepSheet = new StepSheet(step, this); AddSheet(stepSheet); } }