private void Dispose(bool disposing) { ReleaseUnmanagedResources(); if (disposing) { _cancellationTokenSource?.Dispose(); IsVisible = false; _buttonFace?.Dispose(); _buttonActionForPress?.Dispose(); _buttonActionForRelease?.Dispose(); } }
private void Dispose(bool disposing) { ReleaseUnmanagedResources(); if (disposing) { _cancellationTokenSource?.Dispose(); _staticStreamDeckButtons.Remove(this); IsVisible = false; _buttonFace?.Dispose(); _buttonActionForPress = null; _buttonActionForRelease = null; _staticStreamDeckButtons.Remove(this); } }