1 Reply Latest reply on Jun 1, 2016 9:12 AM by Dmitry Zamoshnikov

    Quick EPDM Testing Environment

    Dmitry Zamoshnikov

      I've been making an add-in for EPDM.  Here's a quick testing environment for those of you starting out.  I've only added hooks, and didn't comment anything yet.  But you can use it for testing hooks if you wish:

       

      using Microsoft.VisualBasic;
      using System;
      using System.Collections;
      using System.Collections.Generic;
      using System.Data;
      using System.Diagnostics;
      using System.Windows.Forms;
      using EdmLib;
      
      
      namespace EPDM_Addin_Test
      {
      
      
      
      
      
      
          public abstract class swAddinEPDM_edmCmd
          {
      
      
              /// <summary>
              /// Called when .
              /// </summary>
              /// <param name="mlObjectID1">The ml object i d1.</param>
              /// <param name="mlObjectID2">The ml object i d2.</param>
              /// <param name="mlObjectID3">The ml object i d3.</param>
              /// <param name="mlObjectID4">The ml object i d4.</param>
              /// <param name="mbsStrData1">The MBS string data1.</param>
              /// <param name="mbsStrData2">The MBS string data2.</param>
              /// <param name="mbsStrData3">The MBS string data3.</param>
              /// <param name="mlLongData1">The ml long data1.</param>
              /// <param name="mlLongData2">The ml long data2.</param>
              /// <param name="mlLongData3">The ml long data3.</param>
              /// <param name="mpoExtra">The mpo extra.</param>
              public virtual void OnEdmCmd_Menu(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_CardButton(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_CardInput(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_CardListSrc(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreAdd(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostAdd(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreAddFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostAddFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreCopy(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostCopy(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreCopyFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostCopyFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreDelete(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostDelete(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreDeleteFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostDeleteFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreGet(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostGet(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreLock(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostLock(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreMove(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostMove(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreMoveFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostMoveFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreRename(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostRename(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreRenameFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostRenameFolder(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreShare(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostShare(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreState(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostState(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreUndoLock(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostUndoLock(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreUnlock(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostUnlock(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_SerialNo(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_TaskRun(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_TaskLaunch(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreLabel(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostLabel(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreLabelDelete(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostLabelDelete(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreLabelModify(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostLabelModify(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PreLabelAddItem(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
              public virtual void OnEdmCmd_PostLabelAddItem(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
      
      
              }
      
      
              public void OnEdmCmd_Switch(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
                  string stHookTriggered; // which hook was triggered?
                  string stDataMessage;   // message from each trigger
                  stDataMessage = "";
      
      
                  switch (poCmd.meCmdType)
                  {
                      case EdmCmdType.EdmCmd_Menu:
                          stHookTriggered = "EdmCmd_Menu";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_Menu(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_CardButton:
                          stHookTriggered = "EdmCmd_CardButton";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_CardButton(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_CardInput:
                          stHookTriggered = "EdmCmd_CardInput";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_CardInput(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_CardListSrc:
                          stHookTriggered = "EdmCmd_CardListSrc";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_CardListSrc(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreAdd:
                          stHookTriggered = "EdmCmd_PreAdd";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreAdd(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostAdd:
                          stHookTriggered = "EdmCmd_PostAdd";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostAdd(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreAddFolder:
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          stHookTriggered = "EdmcCmd_PreAddFolder";
                          OnEdmCmd_PreAddFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostAddFolder:
                          stHookTriggered = "EdmCmd_PostAddFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostAddFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreCopy:
                          stHookTriggered = "EdmCmd_PreCopy";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreCopy(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostCopy:
                          stHookTriggered = "EdmCmd_PostCopy";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostCopy(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreCopyFolder:
                          stHookTriggered = "EdmCmd_PreCopyFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreCopyFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostCopyFolder:
                          stHookTriggered = "EdmCmd_PostCopyFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostCopyFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreDelete:
                          stHookTriggered = "EdmCmd_PreDelete";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreDelete(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostDelete:
                          stHookTriggered = "EdmCmd_PostDelete";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostDelete(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreDeleteFolder:
                          stHookTriggered = "EdmCmd_PreDeleteFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreDeleteFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostDeleteFolder:
                          stHookTriggered = "EdmCmd_PostDeleteFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostDeleteFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreGet:
                          stHookTriggered = "EdmCmd_PreGet";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreGet(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostGet:
                          stHookTriggered = "EdmCmd_PostGet";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostGet(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreLock:
                          stHookTriggered = "EdmCmd_PreLock";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreLock(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostLock:
                          stHookTriggered = "EdmCmd_PostLock";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostLock(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreMove:
                          stHookTriggered = "EdmCmd_PreMove";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreMove(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostMove:
                          stHookTriggered = "EdmCmd_PostMove";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostMove(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreMoveFolder:
                          stHookTriggered = "EdmCmd_PreMoveFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreMoveFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostMoveFolder:
                          stHookTriggered = "EdmCmd_PostMoveFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostMoveFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreRename:
                          stHookTriggered = "EdmCmd_PreRename";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreRename(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostRename:
                          stHookTriggered = "EdmCmd_PostRename";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostRename(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreRenameFolder:
                          stHookTriggered = "EdmCmd_PreRenameFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreRenameFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostRenameFolder:
                          stHookTriggered = "EdmCmd_PostRenameFolder";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostRenameFolder(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreShare:
                          stHookTriggered = "EdmCmd_PreShare";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreShare(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostShare:
                          stHookTriggered = "EdmCmd_PostShare";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostShare(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreState:
                          stHookTriggered = "EdmCmd_PreState";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreState(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostState:
                          stHookTriggered = "EdmCmd_PostState";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostState(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreUndoLock:
                          stHookTriggered = "EdmCmd_PreUndoLock";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreUndoLock(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostUndoLock:
                          stHookTriggered = "EdmCmd_PostUndoLock";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostUndoLock(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreUnlock:
                          stHookTriggered = "EdmCmd_PreUnlock";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreUnlock(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostUnlock:
                          stHookTriggered = "EdmCmd_PostUnlock";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostUnlock(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_SerialNo:
                          stHookTriggered = "EdmCmd_SerialNo";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_SerialNo(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_TaskRun:
                          stHookTriggered = "EdmCmd_TaskRun";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_TaskRun(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_TaskLaunch:
                          stHookTriggered = "EdmCmd_TaskLaunch";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_TaskLaunch(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreLabel:
                          stHookTriggered = "EdmCmd_PreLabel";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreLabel(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostLabel:
                          stHookTriggered = "EdmCmd_PostLabel";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostLabel(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreLabelDelete:
                          stHookTriggered = "EdmCmd_PreLabelDelete";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreLabelDelete(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostLabelDelete:
                          stHookTriggered = "EdmCmd_PostLabelDelete";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostLabelDelete(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreLabelModify:
                          stHookTriggered = "EdmCmd_PreLabelModify";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreLabelModify(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostLabelModify:
                          stHookTriggered = "EdmCmd_PostLabelModify";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostLabelModify(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PreLabelAddItem:
                          stHookTriggered = "EdmCmd_PreLabelAddItem";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PreLabelAddItem(ref poCmd, ref ppoCmdData);
                          break;
                      case EdmCmdType.EdmCmd_PostLabelAddItem:
                          stHookTriggered = "EdmCmd_PostLabelAddItem";
                          stDataMessage = EPDMCmd_Data(ref poCmd, ref ppoCmdData);
                          OnEdmCmd_PostLabelAddItem(ref poCmd, ref ppoCmdData);
                          break;
                      default:
                          stHookTriggered = "Default";
                          stDataMessage = "";
                          break;
                  }
      
      
                  EdmVault5 vault = default(EdmVault5);
                  vault = (EdmVault5)poCmd.mpoVault;
                  //vault.MsgBox(poCmd.mlParentWnd, "Data: " + stDataMessage);
                  vault.MsgBox(poCmd.mlParentWnd, "Event Triggered: " + stHookTriggered + Constants.vbLf + stDataMessage);
      
      
      
      
              }
      
      
              public virtual string EPDMCmd_Data(ref EdmCmd poCmd, ref Array ppoCmdData)
              {
                  string message; // stores the values of the data in the array
                  message = "";
      
      
                  int index = 0;
                  index = Information.LBound(ppoCmdData);
                  int last = 0;
                  last = Information.UBound(ppoCmdData);
      
      
                  message = message + "Item count: " + last + Constants.vbLf;
                  while (index <= last)
                  {
                      message = message + "mlObjectID1: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mlObjectID1+ Constants.vbLf;
                      message = message + "mlObjectID2: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mlObjectID2 + Constants.vbLf;
                      message = message + "mlObjectID3: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mlObjectID3 + Constants.vbLf;
                      message = message + "mlObjectID4: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mlObjectID4 + Constants.vbLf;
                      message = message + "mbsStrData1: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mbsStrData1 + Constants.vbLf;
                      message = message + "mbsStrData2: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mbsStrData2 + Constants.vbLf;
                      message = message + "mbsStrData3: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mbsStrData3 + Constants.vbLf;
                      message = message + "mlLongData1: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mlLongData1 + Constants.vbLf;
                      message = message + "mlLongData2: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mlLongData2 + Constants.vbLf;
                      message = message + "mlLongData3: " + ((EdmCmdData)(ppoCmdData.GetValue(index))).mlLongData3 + Constants.vbLf;
                      message = message + Constants.vbLf + "***Next Item***" + Constants.vbLf + Constants.vbLf;
      
      
                      index = index + 1;
                  }
      
      
                  
                  return message;
              }
          }
      
      
          public class swAddin_EPDM : swAddinEPDM_edmCmd, IEdmAddIn5 
          {
      
      
      
      
              public void GetAddInInfo(ref EdmAddInInfo poInfo, IEdmVault5 poVault, IEdmCmdMgr5 poCmdMgr)
              {
                  //Specify information to display in the add-in's Properties dialog box
                  poInfo.mbsAddInName = "C# Add-in";
                  poInfo.mbsCompany = "My Company";
                  poInfo.mbsDescription = "Menu add-in that shows a message box.";
                  poInfo.mlAddInVersion = 1;
      
      
                  //Specify the minimum required version of SolidWorks Enterprise PDM
                  poInfo.mlRequiredVersionMajor = 5;
                  poInfo.mlRequiredVersionMinor = 2;
      
      
                  // Register a menu command
                  poCmdMgr.AddCmd(1, "C# Add-in", (int)EdmMenuFlags.EdmMenu_Nothing);
      
      
                  // set up hooks
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_Menu);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_CardButton);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_CardListSrc);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostAdd);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostAddFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostCopy);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostCopyFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostDelete);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostDeleteFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostGet);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostLabel);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostLabelAddItem);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostLabelDelete);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostLabelModify);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostLock);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostMove);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostMoveFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostRename);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostRenameFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostShare);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostState);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostUndoLock);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PostUnlock);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreAdd);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreAddFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreCopy);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreCopyFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreDelete);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreDeleteFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreGet);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreLabel);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreLabelAddItem);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreLabelDelete);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreLabelModify);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreLock);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreMove);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreMoveFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreRename);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreRenameFolder);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreShare);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreState);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreUndoLock);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_PreUnlock);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_SerialNo);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_TaskLaunch);
                  poCmdMgr.AddHook(EdmCmdType.EdmCmd_TaskRun);
      
      
              }
      
      
              public void OnCmd(ref EdmCmd poCmd, ref Array ppoData)
              {
                  // Handle the menu command
                  if (poCmd.meCmdType == EdmCmdType.EdmCmd_Menu)
                  {
                      if (poCmd.mlCmdID == 1)
                          System.Windows.Forms.MessageBox.Show("C# Add-in");
                  }
      
      
                  OnEdmCmd_Switch(ref poCmd, ref ppoData);
              }
          }
      }