// ================================================================================= // Window management // --------------------------------------------------------------------------------- // FIXME: The relationship between proxy type and editor name needs to be cleaned up. public static void Add(iCS_EditorBase editor) { if (FindIndexOf(editor) == -1) { myEditors.Add(editor); } }
public static void Remove(iCS_EditorBase editor) { int idx = FindIndexOf(editor); if (idx >= 0) { myEditors.RemoveAt(idx); } }
// ================================================================================= // Search/Iterations // --------------------------------------------------------------------------------- static int FindIndexOf(iCS_EditorBase editor) { for (int i = 0; i < myEditors.Count; ++i) { if (myEditors[i] == editor) { return(i); } } return(-1); }