public static T OpenPanel <T>() where T : WsWindowEx { WsWindowEx obj = System.Activator.CreateInstance <T>(); obj.Open(); return((T)obj); }
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); }