private string LoadTemplate(string ItemId = "", string FolderId = "") { // Reads the XML template string sTemplateContent = ""; FormReplaceTemplateFields oForm = new FormReplaceTemplateFields(ItemId, FolderId); sTemplateContent = oForm.ReadTemplate(this); oForm.Dispose(); if (String.IsNullOrEmpty(sTemplateContent)) { return(xmlEditorRequest.Text); } return(sTemplateContent); }
private string LoadTemplate(string ItemId = "", string FolderId = "", string TemplateName = "", string ChangeKey = "") { // Reads the XML template string sTemplateContent = String.Empty; FormReplaceTemplateFields oForm = new FormReplaceTemplateFields(ItemId, FolderId, TemplateName, ChangeKey); sTemplateContent = oForm.ReadTemplate(this); oForm.Dispose(); if (String.IsNullOrEmpty(sTemplateContent)) { return(xmlEditorRequest.Text); } this.Activate(); // To stop the main window from disappearing behind other applications (Windows 10 z-order issues) return(sTemplateContent); }