Пример #1
0
        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;
        }
Пример #2
0
 public void SetSeekPreviewReader(StoryboardReader storyboardReader, SeekLogic seekLogic)
 {
     _seekPreviewReader?.Dispose();
     _seekPreviewReader         = storyboardReader;
     seekLogic.StoryboardReader = _seekPreviewReader;
     DllImports.SetSeekPreviewCallback(_getSeekPreviewStoryboardDelegate);
     _seekLogic = seekLogic;
 }
Пример #3
0
 public void SetUnfocus()
 {
     _isFocused = false;
     this.AbortAnimation("Animation");
     this.ScaleTo(1, 334);
     _storyboardReader?.Dispose();
     _storyboardReader = null;
     _previewBitmap    = null;
     InvalidateSurface();
 }
Пример #4
0
        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);
            }
        }
Пример #5
0
        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();
        }
Пример #6
0
 public void UnloadTilePreview()
 {
     _tilePreviewReaderId = -1;
     _tilePreviewReader?.Dispose();
     _tilePreviewReader = null;
 }