Dec 13, 2010, 11:57 PM
how add window close OnEvent?
protected void ButtonOK_Click(object sender, Ext.Net.DirectEventArgs e)
{
showWindow(Icon.ApplicationDouble, "winTmp", "测试窗口", "Child.aspx", 400, 500, true, true, false, true);
}
public void showWindow(Icon iconTemp, string strTmpID, string strTmpTitle, string strTmpUrl, int intTmpWidth, int intTmpHeight, bool boolTmpModal, bool boolTmpClosable, bool boolTmpMaximizable, bool boolTmpResizable)
{
var win = new Window
{
ID = strTmpID,
Icon = iconTemp,
Title = strTmpTitle,
Width = intTmpWidth,
Height = intTmpHeight,
Hidden = false,
Modal = boolTmpModal,
Collapsible = false,
Closable = boolTmpClosable,
Maximizable = boolTmpMaximizable,
Resizable = boolTmpResizable
};
// How to do "OnWindowTmpClose"
win.AutoLoad.Url = strTmpUrl;
win.AutoLoad.Mode = LoadMode.IFrame;
win.Render();
win.Show();
//return win;
}
protected void OnWindowTmpClose(object sender, Ext.Net.DirectEventArgs e)
{
X.Msg.Show(new MessageBoxConfig
{
Title = "信息",
Message = "关闭事件",
Width = 200,
Buttons = Ext.Net.MessageBox.Button.OK
});
}