Dialog类
要让Dialog像窗体一样的打开,就要继承RunBase,来自定义一个Dialog类。
然后写Main方法(一般类的主函数)
再来就Pack和unPack方法(容器函数)
还是上代码比较直观吧。
class MyDialogClass extends runbase
{
DialogField g_dlgFileName;
{
DialogField g_dlgFileName;
;
public container pack()
{
;
return connull();
}
{
;
return connull();
}
public Boolean unpack(container cont)
{
return true;
}
{
return true;
}
object dialog()
{
DialogRunBase dialog = super();
;
g_dlgFileName = dialog.addFieldValue(typeid(FileNameOpen),"");
return dialog;
}
static void main(Args args)
{
MyDialogClass m_myDialog;
;
m_myDialog = new MyDialogClass();
if(m_myDialog.prompt())
{
m_myDialog.doSomeThing();
}
}
void doSomeThing()
{
//something for dialog
;
info("success!");
}