public void OpenPage(string name) { EditorBasePage page = Pages.Where(i => i.Name == name).FirstOrDefault(); if (page != null) { if (currentPage != null) { stackPage.Push(currentPage); } currentPage = page; currentPage.OnOpen(); } }
public void OpenPage(EditorBasePage page) { if (page != null) { page.Manager = this; if (currentPage != null) { stackPage.Push(currentPage); } currentPage = page; currentPage.OnOpen(); GUI.enabled = false; GUI.enabled = true; } }