private void ReleaseGenericWindow(GenericWindow gen) { Tools.Remove(gen); if (Tools.Count == 0) { noLongerOpenInTools?.Invoke(this, EventArgs.Empty); } gen.Dispose(); }