示例#1
0
    public static T OpenPanel <T>() where T : WsWindowEx
    {
        WsWindowEx obj = System.Activator.CreateInstance <T>();

        obj.Open();
        return((T)obj);
    }
示例#2
0
    public static T OpenSinglePanel <T>() where T : WsWindowEx
    {
        WsWindowEx obj = System.Activator.CreateInstance <T>();

        if (PanelList.ContainsKey(obj.strPrefab))
        {
            PanelList[obj.strPrefab].Close();
            PanelList.Remove(obj.strPrefab);
        }
        PanelList.Add(obj.strPrefab, obj);
        obj.Open();
        return((T)obj);
    }