110,536
社区成员
发帖
与我相关
我的任务
分享
public BaseWindow CreateWindow(int nIndex)
{
BaseWindow win= null;
string sWindowClassName = GetWindowType(nIndex); //索引对应的子类名称
try
{
Type type = Type.GetType(sWindowClassName , true);
win= (BaseWindow )Activator.CreateInstance(type);
}
catch (Exception e)
{
}
return win;
}