/// <summary> /// Adds dialog ids to the list. /// </summary> void AddDialogListItems(string fileName) { WorkbenchTextFileReader workbenchTextFileReader = new WorkbenchTextFileReader(); using (TextReader reader = workbenchTextFileReader.Create(fileName)) { WixDocumentReader wixReader = new WixDocumentReader(reader); setupDialogListView.AddDialogs(fileName, wixReader.GetDialogIds()); } }
public void SetUpFixture() { WixDocumentReader wixReader = new WixDocumentReader(GetWixXml()); dialogIds = wixReader.GetDialogIds(); welcomeDialogId = dialogIds[0]; progressDialogId = dialogIds[1]; wixReader = new WixDocumentReader(GetWixXml()); welcomeDialogLocation = wixReader.GetStartElementLocation("Dialog", welcomeDialogId); wixReader = new WixDocumentReader(GetWixXml()); missingDialogLocation = wixReader.GetStartElementLocation("Dialog", "missingDialogId"); }
/// <summary> /// Gets the first dialog id in the file. /// </summary> string GetFirstDialogIdInTextEditor() { ITextEditor textEditor = ActiveTextEditor; if (textEditor != null) { WixDocumentReader wixReader = new WixDocumentReader(textEditor.Document.Text); ReadOnlyCollection <string> ids = wixReader.GetDialogIds(); if (ids.Count > 0) { return(ids[0]); } } return(null); }
/// <summary> /// Gets the first dialog id in the file. /// </summary> string GetFirstDialogIdInTextEditor() { ITextEditor textEditor = ActiveTextEditor; if (textEditor != null) { WixDocumentReader wixReader = new WixDocumentReader(textEditor.Document.Text); ReadOnlyCollection<string> ids = wixReader.GetDialogIds(); if (ids.Count > 0) { return ids[0]; } } return null; }