Ext.Net - 在后面的代码中创建 Ext.MessageBox.confirm
Ext.Net - Create Ext.MessageBox.confirm in code behind
有一种方法可以在代码隐藏中创建Ext.MessageBox.confirm吗?
尝试:
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
}
有一种方法可以在代码隐藏中创建Ext.MessageBox.confirm吗?
尝试:
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
}