/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (tray != null) { DestroyIcon(tray.Icon.Handle); tray.Icon.Dispose(); tray.Dispose(); } if (service != null) { service.Dispose(); } if (components != null) { components.Dispose(); } } base.Dispose(disposing); }