public void IndexerTest() { INuGenControlImageDescriptor descriptor = _manager.CreateImageDescriptor(); Assert.IsNotNull(descriptor); Assert.IsNull(descriptor.Image); Assert.AreEqual(-1, descriptor.ImageIndex); Assert.IsNull(descriptor.ImageList); }
/// <summary> /// </summary> /// <param name="disposing"> /// <see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources. /// </param> protected override void Dispose(bool disposing) { if (disposing) { if (_imageDescriptor != null) { _imageDescriptor.ImageChanged -= _imageDescriptor_Updated; _imageDescriptor.ImageIndexChanged -= _imageDescriptor_Updated; _imageDescriptor.ImageListChanged -= _imageDescriptor_Updated; _imageDescriptor = null; } } base.Dispose(disposing); }
/// <summary> /// </summary> /// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (disposing) { if (_imageDescriptor != null) { _imageDescriptor.ImageChanged -= _imageDescriptor_Updated; _imageDescriptor.ImageIndexChanged -= _imageDescriptor_Updated; _imageDescriptor.ImageListChanged -= _imageDescriptor_Updated; _imageDescriptor = null; } if (_smoothAnimationTimer != null) { _smoothAnimationTimer.Tick -= _smoothAnimationTimer_Tick; _smoothAnimationTimer.Dispose(); _smoothAnimationTimer = null; } } base.Dispose(disposing); }