ax2012弹出框
1.消息提示 (Info)
Box::info("Here is message.", "Title");2.警告提示 (warning)
Box::warning("Here is message.", "Title");3.错误提示 (Error)
Box::stop("Here is message.", "Title");4.不要再次提醒
Box::infoOnce("Here is message.","Title","helpURL","Owner")5.Yes/No
DialogButton diagBut;
str strMessage = "Here is message";
str strTitle = "Title";
;
diagBut = Box::yesNo(
strMessage,
DialogButton::No, // Initial focus is on the No button.
strTitle);
if (diagBut == DialogButton::No)
{
print "The No button was clicked.";
pause;
}
else
{
print "The button that was clicked was: ", diagBut;
pause;
}效果:

6.YesNoCancel
static void JobBoxDemo(Args _args)
{
DialogButton diagBut;
str strMessage = "The No button should have initial focus.";
str strTitle = "Title";
;
diagBut = Box::yesNoCancel(
strMessage,
DialogButton::No, // Initial focus is on the No button.
strTitle);
if (diagBut == DialogButton::No)
{
print "The No button was clicked.";
}
else
{
print "The button that was clicked was: ", diagBut;
}
pause;
}7.Yes And All Option
DialogButton diagBut;
;
diagBut = Box::yesAllNoAllCancel("Hellow Microsoft Dynamics AX." ,DialogButton::Yes,"Title");
switch (diagBut)
{
case DialogButton::Cancel :
box::info("You selected the 'Cancel' button.");
break;
case DialogButton::No :
box::info("You selected the 'No' button.");
break;
case DialogButton::NoToAll:
box::info("You selected the 'NoToAll' button.");
break;
case DialogButton::Yes :
box::info("You selected the 'Yes' button.");
break;
case DialogButton::YesToAll:
box::info("You selected the 'YesToAll' button.");
break;
}https://docs.microsoft.com/en-us/dynamicsax-2012/developer/displaying-a-message-box


留言评论
暂无留言