/// <summary>
        /// Adds dialog ids to the list.
        /// </summary>
        void AddDialogListItems(string fileName)
        {
            WorkbenchTextFileReader workbenchTextFileReader = new WorkbenchTextFileReader();

            using (TextReader reader = workbenchTextFileReader.Create(fileName)) {
                setupDialogListView.AddDialogs(fileName, WixDocument.GetDialogIds(reader));
            }
        }
		/// <summary>
		/// Gets the dialog element location given the filename and the dialog id.
		/// </summary>
		static Location GetDialogElementLocation(string fileName, string id)
		{
			try {
				WorkbenchTextFileReader workbenchTextFileReader = new WorkbenchTextFileReader();
				using (TextReader reader = workbenchTextFileReader.Create(fileName)) {
					return WixDocument.GetStartElementLocation(reader, "Dialog", id);
				}
			} catch (XmlException ex) {
				WixBindingService.ShowErrorInErrorList(fileName, ex);
			}
			return Location.Empty;
		}
 /// <summary>
 /// Gets the dialog element location given the filename and the dialog id.
 /// </summary>
 static Location GetDialogElementLocation(string fileName, string id)
 {
     try {
         WorkbenchTextFileReader workbenchTextFileReader = new WorkbenchTextFileReader();
         using (TextReader reader = workbenchTextFileReader.Create(fileName)) {
             return(WixDocument.GetStartElementLocation(reader, "Dialog", id));
         }
     } catch (XmlException ex) {
         WixBindingService.ShowErrorInErrorList(fileName, ex);
     }
     return(Location.Empty);
 }
		/// <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 ShowFilesMethodFileReaderParameterSaved()
		{
			WorkbenchTextFileReader fileReader = new WorkbenchTextFileReader();
			control.ShowFiles(null, fileReader, null);
			Assert.AreSame(fileReader, control.ShowFilesMethodFileReaderParameter);
		}