private static extern UInt32 PTRobot_SetOpenCloseFunction( OpenCloseCallBack x);
public uint SetOpenCloseCallback(OpenCloseCallBack myOpenCloseCallback) { uint nValue = 0; try { nValue = PTRobot_SetOpenCloseFunction(myOpenCloseCallback); } catch (Exception e) { MessageBox.Show("PTRobot_SetRoboticDrive() failed:\n" + e.Message); } return nValue; }
public static PTRobotReturn SetOpenCloseCallback(OpenCloseCallBack myOpenCloseCallback) { uint nValue = 0; PTRobotReturn ret = PTRobotReturn.Ok; try { nValue = PTRobot_SetOpenCloseFunction(myOpenCloseCallback); ret = (PTRobotReturn)nValue; } catch { ret = PTRobotReturn.Internal; } return ret; }
//////////////////////////////////////////////////////////////////////// /// <summary> // Constructor /// </summary> public PTRobot_DLL() { m_OpenCloseCallBack = new OpenCloseCallBack(cbOpenCloseDrive); }