private void initialize(List <Type> types = null) { if (null == mAssembly) { return; } if (null != types) { mTypes.Clear(); foreach (Type type in types) { this.addType(type, true); } } foreach (Type type in mAssembly.GetTypes()) { if (type.IsPublic && Utils.IsSupported(type)) { this.addType(type); } } if (mTypes.Values.All(v => v.binded)) { mSelectionType = BindingAssemblySelectionType.All; } else if (mTypes.Values.All(v => !v.binded)) { mSelectionType = BindingAssemblySelectionType.None; } else { mSelectionType = BindingAssemblySelectionType.Some; } }
private void drawHeader() { EditorGUILayout.BeginHorizontal(); switch (mSelectionType) { case BindingAssemblySelectionType.None: case BindingAssemblySelectionType.Some: if (EditorGUILayout.ToggleLeft("SelectAll", false)) { this.SelectAll(); mSelectionType = BindingAssemblySelectionType.All; } break; case BindingAssemblySelectionType.All: if (EditorGUILayout.ToggleLeft("UnselectAll", false)) { this.UnselectAll(); mSelectionType = BindingAssemblySelectionType.None; } break; } if (GUILayout.Button("Remove this")) { BindingWindow.Instance.RemoveAssembly(this); } EditorGUILayout.EndHorizontal(); }