iCAx开思网
标题:
C#二次开发的菜单问题
[打印本页]
作者:
玉壶儿
时间:
2013-6-19 22:51
标题:
C#二次开发的菜单问题
注册程序大致如下,想请教下,为什么在菜单上选择第二次 或者重新在菜单上选择另一项 UG便会直接崩溃退出!!十分棘手啊!!
NXOpen.UF.UFMb.Action[] uaActions = new NXOpen.UF.UFMb.Action[7];
uaActions[0].action_name = "ABOUT";
uaActions[0].action_cb.cb = new UFMb.CallbackT(ABOUT);
uaActions[1].action_name = "CONFIGURATION";
uaActions[1].action_cb.cb = new UFMb.CallbackT(CONFIGURATION);
uaActions[2].action_name = "CREATE_PART_CODE";
uaActions[2].action_cb.cb = new UFMb.CallbackT(CREATE_PART_CODE);
uaActions[3].action_name = "NEW_PART";
uaActions[3].action_cb.cb = new UFMb.CallbackT(NEW_PART);
uaActions[4].action_name = "DEL_PART";
uaActions[4].action_cb.cb = new UFMb.CallbackT(DEL_PART);
uaActions[5].action_name = "OPEN_PART";
uaActions[5].action_cb.cb = new UFMb.CallbackT(OPEN_PART);
uaActions[6].action_name = null;
uaActions[6].action_cb = new NXOpen.UF.UFMb.Cb();
uaActions[6].action_cb.cb = null;
uaActions[6].action_cb.cb_data = System.IntPtr.Zero;
ufs.Mb.AddActions(uaActions);
--------------------------------------------------------------
static NXOpen.UF.UFMb.CbStatus ABOUT(IntPtr w, IntPtr client_data, IntPtr button)
{
Class.Class1.About();
return UFMb.CbStatus.CbContinue;
}
static NXOpen.UF.UFMb.CbStatus CONFIGURATION(IntPtr w, IntPtr client_data, IntPtr button)
{
Class.Class1.thedialog();
return UFMb.CbStatus.CbContinue;
}
static NXOpen.UF.UFMb.CbStatus CREATE_PART_CODE(IntPtr w, IntPtr client_data, IntPtr button)
{
Class.Class1.theCreatPartCode();
return UFMb.CbStatus.CbContinue;
}
static NXOpen.UF.UFMb.CbStatus NEW_PART(IntPtr w, IntPtr client_data, IntPtr button)
{
Class.Class1.prt_new();
return UFMb.CbStatus.CbContinue;
}
static NXOpen.UF.UFMb.CbStatus DEL_PART(IntPtr w, IntPtr client_data, IntPtr button)
{
Class.Class1.deletePart();
return UFMb.CbStatus.CbContinue;
}
static NXOpen.UF.UFMb.CbStatus OPEN_PART(IntPtr w, IntPtr client_data, IntPtr button)
{
Class.Class1.openPart();
return UFMb.CbStatus.CbContinue;
}
作者:
四川梁江
时间:
2013-8-25 09:52
能否贴出整个源码啊!
作者:
ScmTools
时间:
2014-5-18 12:19
别人不支持,我先支持了
欢迎光临 iCAx开思网 (https://www.icax.org/)
Powered by Discuz! X3.3