|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
注册程序大致如下,想请教下,为什么在菜单上选择第二次 或者重新在菜单上选择另一项 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;
}
|
|