有一种方法可以在后面的代码中创建 Ext.MessageBox.confirm 吗?
答案 0 :(得分:1)
尝试:
public void MyFunction()
{
X.Msg.Confirm("Message", "It'OK??", new MessageBoxButtonsConfig
{
Yes = new MessageBoxButtonConfig
{
Handler = "CompanyX.It_s_OK()",
Text = "OK"
},
No = new MessageBoxButtonConfig
{
Handler = "CompanyX.It_s_KO()",
Text = "KO"
}
}).Show();
}
[DirectMethod(Namespace = "CompanyX")]
public void It_s_OK()
{
//your OK function
}
[DirectMethod(Namespace = "CompanyX")]
public void It_s_KO()
{
//your KO function
}