private void InitializeSeekPreview(string seekPreviewPath) { _storyboardReader?.Dispose(); _storyboardReader = new StoryboardReader(Path.Combine(Application.Current.DirectoryInfo.Resource, seekPreviewPath)); _seekLogic.StoryboardReader = _storyboardReader; var size = _storyboardReader.FrameSize; SeekPreviewCanvas.WidthRequest = size.Width; SeekPreviewCanvas.HeightRequest = size.Height; }
public void SetSeekPreviewReader(StoryboardReader storyboardReader, SeekLogic seekLogic) { _seekPreviewReader?.Dispose(); _seekPreviewReader = storyboardReader; seekLogic.StoryboardReader = _seekPreviewReader; DllImports.SetSeekPreviewCallback(_getSeekPreviewStoryboardDelegate); _seekLogic = seekLogic; }
public void SetUnfocus() { _isFocused = false; this.AbortAnimation("Animation"); this.ScaleTo(1, 334); _storyboardReader?.Dispose(); _storyboardReader = null; _previewBitmap = null; InvalidateSurface(); }
private async void InitializeSeekPreview(string seekPreviewPath) { _storyboardReader?.Dispose(); _storyboardReader = new StoryboardReader(seekPreviewPath); _seekLogic.StoryboardReader = _storyboardReader; try { await _storyboardReader.LoadTask; var size = _storyboardReader.FrameSize; SeekPreviewCanvas.WidthRequest = size.Width; SeekPreviewCanvas.HeightRequest = size.Height; } catch (Exception ex) { Logger.Error(ex); } }
public void ResetFocus() { try { _animationCts?.Cancel(); } catch (ObjectDisposedException) { } _isFocused = false; this.AbortAnimation("ScaleTo"); this.AbortAnimation("Animation"); this.ScaleTo(1); _storyboardReader?.Dispose(); _storyboardReader = null; _previewBitmap = null; InvalidateSurface(); }
public void UnloadTilePreview() { _tilePreviewReaderId = -1; _tilePreviewReader?.Dispose(); _tilePreviewReader = null; }