If memory serve correct there is already a sample plugin in version 7 already called
Sales Order Custom Email that shows how to customise the email from a sales order.
As for the other one Jiwa 6 used to let you add custom menu items and then react to them being clicked you can achieve the same thing by adding buttons to the ribbon the code below is a fairly simple example of doing it
- Code: Select all
public class FormPlugin : System.MarshalByRefObject, JiwaFinancials.Jiwa.JiwaApplication.IJiwaFormPlugin
{
public override object InitializeLifetimeService()
{
// returning null here will prevent the lease manager
// from deleting the Object.
return null;
}
public void SetupBeforeHandlers(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
}
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
if(JiwaForm is JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)
{
JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm uiform = (JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.SalesOrderEntryForm)JiwaForm;
Infragistics.Win.UltraWinToolbars.RibbonGroup bgroup = new Infragistics.Win.UltraWinToolbars.RibbonGroup("Hello");
bgroup.Caption = "Hello";
uiform.UltraToolbarsManager1.Ribbon.Tabs["Main"].Groups.Add(bgroup);
Infragistics.Win.UltraWinToolbars.ButtonTool btnImport = new Infragistics.Win.UltraWinToolbars.ButtonTool("Say Hello");
btnImport.SharedProps.Caption = "Say Hello";
btnImport.ToolClick += uiForm_Toolbar_ToolClick;
uiform.UltraToolbarsManager1.Tools.Add(btnImport);
bgroup = uiform.UltraToolbarsManager1.Ribbon.Tabs["Main"].Groups["Hello"];
bgroup.Tools.AddTool("Say Hello");
bgroup.Tools["Say Hello"].InstanceProps.MinimumSizeOnRibbon = Infragistics.Win.UltraWinToolbars.RibbonToolSize.Large;
}
}
private void uiForm_Toolbar_ToolClick(object sender, EventArgs args)
{
System.Windows.Forms.MessageBox.Show("Hello World");
}
}
#