public override void Dispose() { if (!disposed) { disposed = true; setupDialogListView.Dispose(); setupDialogListView = null; ProjectService.CurrentProjectChanged -= CurrentProjectChanged; } }
public SetupDialogListPad() { instance = this; setupDialogListView = new SetupDialogListView(); setupDialogListView.ContextMenuStrip = MenuService.CreateContextMenu(setupDialogListView, "/SharpDevelop/Pads/WixSetupDialogListPad/ContextMenu"); setupDialogListView.ItemActivate += SetupDialogListViewItemActivate; setupDialogListView.Enter += SetupDialogListViewEnter; // Show dialogs in currently open wix project. ShowDialogList(); ProjectService.CurrentProjectChanged += CurrentProjectChanged; }
public void SetUpFixture() { List<string> dialogs = new List<string>(); dialogs.Add("WelcomeDialog"); dialogs.Add("ProgressDialog"); wixDocumentFileName = @"C:\Projects\Test\setup.wxs"; using (SetupDialogListView control = new SetupDialogListView()) { control.AddDialogs(wixDocumentFileName, new ReadOnlyCollection<string>(dialogs)); hasErrorsAtStart = control.HasErrors; XmlException xmlEx = new XmlException("Error occurred", null, 10, 5); control.AddError(wixDocumentFileName, xmlEx); Exception ex = new Exception("Error"); control.AddError(wixDocumentFileName); nodesAdded = control.Items.Count; SetupDialogListViewItem welcomeDialogListItem = (SetupDialogListViewItem)control.Items[0]; welcomeDialogText = welcomeDialogListItem.Text; welcomeDialogId = welcomeDialogListItem.Id; welcomeDialogFileName = welcomeDialogListItem.FileName; SetupDialogListViewItem progressDialogListItem = (SetupDialogListViewItem)control.Items[1]; progressDialogText = progressDialogListItem.Text; progressDialogId = progressDialogListItem.Id; progressDialogFileName = progressDialogListItem.FileName; SetupDialogErrorListViewItem xmlErrorDialogListItem = (SetupDialogErrorListViewItem)control.Items[2]; xmlErrorDialogText = xmlErrorDialogListItem.Text; xmlErrorDialogErrorLine = xmlErrorDialogListItem.Line; xmlErrorDialogErrorColumn = xmlErrorDialogListItem.Column; xmlErrorDialogTextColour = xmlErrorDialogListItem.ForeColor; xmlErrorDialogTextBackColour = xmlErrorDialogListItem.BackColor; SetupDialogErrorListViewItem errorDialogListItem = (SetupDialogErrorListViewItem)control.Items[3]; errorDialogText = errorDialogListItem.Text; errorDialogErrorLine = errorDialogListItem.Line; errorDialogErrorColumn = errorDialogListItem.Column; errorDialogTextColour = errorDialogListItem.ForeColor; errorDialogTextBackColour = errorDialogListItem.BackColor; hasErrors = control.HasErrors; } }