public bool RemoveDynamicWindow <T>(T drawer) where T : SubWindowCustomDrawer { string id = null; if (drawer == null) { id = SubWindowObjectDrawer.GetDrawerID(null, true); } else { id = SubWindowObjectDrawer.GetDrawerID(drawer, true); } return(RemoveWindowByID(id)); }
public void AddDynamicWindow <T>(T drawer) where T : SubWindowCustomDrawer { if (drawer == null) { return; } string id = SubWindowObjectDrawer.GetDrawerID(drawer, true); if (ContainWindowID(id)) { return; } SubWindow window = new SubWindow(true, drawer); window.isDynamic = true; m_SubWindowList.Add(window); window.Open(); this.InsertWindow(window); }