private void AddAwesomeAxiomTaskPaneSFEdit(Word.Document doc, string Id, string FileName, string ParentType, string ParentId) { this.SetRibbon(); System.Windows.Forms.Integration.ElementHost elHost = new System.Windows.Forms.Integration.ElementHost(); ContractEdit.SForceEditSideBar2 ssb = new ContractEdit.SForceEditSideBar2(Id, FileName, ParentType, ParentId); elHost.Child = ssb; elHost.Dock = System.Windows.Forms.DockStyle.Fill; System.Windows.Forms.UserControl u = new System.Windows.Forms.UserControl(); u.Controls.Add(elHost); Microsoft.Office.Tools.CustomTaskPane taskPaneValue = Globals.ThisAddIn.CustomTaskPanes.Add(u, "Axiom IRIS Edit", doc.ActiveWindow); taskPaneValue.Visible = true; taskPaneValue.Width = 300; }
private void AddAwesomeAxiomTaskPane(Word.Document doc) { this.SetRibbon(); // WPF Form if (isTemplate() || isExportTemplate() || isClause()) { System.Windows.Forms.Integration.ElementHost elHost = new System.Windows.Forms.Integration.ElementHost(); TemplateEdit.TEditSidebar tsb = new TemplateEdit.TEditSidebar(doc); elHost.Child = tsb; elHost.Dock = System.Windows.Forms.DockStyle.Fill; System.Windows.Forms.UserControl u = new System.Windows.Forms.UserControl(); u.Controls.Add(elHost); Microsoft.Office.Tools.CustomTaskPane taskPaneValue = Globals.ThisAddIn.CustomTaskPanes.Add(u, "Axiom IRIS Template", doc.ActiveWindow); taskPaneValue.Visible = true; taskPaneValue.Width = 300; taskPaneValue.VisibleChanged += new EventHandler(taskPaneValue_VisibleChanged); } else if (isContract() || isUnAttachedContract()) { ElementHost elHost = new ElementHost(); ContractEdit.SForceEditSideBar2 csb = new ContractEdit.SForceEditSideBar2(); elHost.Child = csb; elHost.Dock = DockStyle.Fill; System.Windows.Forms.UserControl u = new System.Windows.Forms.UserControl(); u.Controls.Add(elHost); Microsoft.Office.Tools.CustomTaskPane taskPaneValue = this.CustomTaskPanes.Add(u, "Axiom IRIS Contract", doc.ActiveWindow); taskPaneValue.Visible = true; taskPaneValue.Width = 400; taskPaneValue.VisibleChanged += new EventHandler(taskPaneValue_VisibleChanged); } }