Exemplo n.º 1
0
        /// <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));
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the first dialog id in the file.
        /// </summary>
        string GetFirstDialogIdInTextEditor()
        {
            TextAreaControl textArea = ActiveTextAreaControl;

            if (textArea != null)
            {
                StringReader reader             = new StringReader(textArea.Document.TextContent);
                ReadOnlyCollection <string> ids = WixDocument.GetDialogIds(reader);
                if (ids.Count > 0)
                {
                    return(ids[0]);
                }
            }
            return(null);
        }