Example #1
0
        /// <summary>
        /// Merges the changes made to the wix document by overwriting the dialog element.
        /// </summary>
        void IWixDialogDesignerGenerator.MergeFormChanges(string dialogId, XmlElement dialogElement)
        {
            DomRegion region = GetTextEditorRegionForDialogElement(dialogId);

            if (region.IsEmpty)
            {
                ThrowDialogElementCouldNotBeFoundError(dialogId);
            }

            WixTextWriter    writer           = new WixTextWriter(textEditor.Options);
            WixDialogElement wixDialogElement = (WixDialogElement)dialogElement;
            string           newDialogXml     = wixDialogElement.GetXml(writer);

            WixDocumentEditor editor = new WixDocumentEditor(textEditor);

            editor.Replace(region, newDialogXml);
        }