Has anyone had success adding a second customized MES menu button? Have used the enclosed code successfully on one button, but my C# is not strong enough to know how I would add a second button.
// **************************************************
// Custom code for MESMenu
// Created: 3/12/2018 2:36:30 PM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.Adapters;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
public class Script
{
// ** Wizard Insert Location - Do Not Remove âBegin/End Wizard Added Module Level Variablesâ Comments! **
// Begin Wizard Added Module Level Variables **
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
EpiButton btnDash;
public void InitializeCustomCode()
{
//Launch first button
btnDash = (EpiButton)csm.GetNativeControlReference("83d9c21c-086c-4196-bce9-2e52fdd7b5de");
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
// End Wizard Added Custom Method Calls
this.btnDash.Click += new System.EventHandler(this.btnDash_Click);
}
public void DestroyCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
// Begin Wizard Added Object Disposal
// End Wizard Added Object Disposal
// Begin Custom Code Disposal
// End Custom Code Disposal
this.btnDash.Click -= new System.EventHandler(this.btnDash_Click);
}
private void MESMenu_Load(object sender, EventArgs args)
{
// Add Event Handler Code
btnDash.ReadOnly=false;
}
private void btnDash_Click(object sender,System.EventArgs args)
{
//First button
ProcessCaller.LaunchForm(this.oTrans, âJCGO3004â);
}
}