public void UnregisterWindow(ManticoreWindow aWindow) { mWindows.Remove(aWindow.GetHashCode()); // If this is the last window of a specific type, remove it from the window list Hashtable windowsForType = mWindows[aWindow.Type] as Hashtable; IEnumerator e = windowsForType.GetEnumerator(); e.MoveNext(); ManticoreWindow window = e.Current as ManticoreWindow; if (window == null) { mWindows.Remove(aWindow.Type); } ManticoreWindow mostRecentWindow = GetMostRecentWindow(aWindow.Type); if (mostRecentWindow == window) { if (window != null) { SetMostRecentWindow(window); } else { mRecentWindows.Remove(aWindow.Type); } } }
public void RegisterWindow(ManticoreWindow aWindow) { if (!mWindows.ContainsKey(aWindow.Type)) { mWindows[aWindow.Type] = new Hashtable(); } Hashtable windowList = mWindows[aWindow.Type] as Hashtable; windowList.Add(aWindow.GetHashCode(), aWindow); }
public void SetMostRecentWindow(ManticoreWindow aWindow) { if (!mRecentWindows.ContainsKey(aWindow.Type)) { mRecentWindows.Add(aWindow.Type, aWindow); } else { mRecentWindows[aWindow.Type] = aWindow; } }