Beispiel #1
0
        private void StartInking(NowPlayingState nowPlaying, byte[] imageBytes)
        {
            if (nowPlaying.HasItem && imageBytes != null)
            {
                BuildCast.DataModel.InkNote meme = new BuildCast.DataModel.InkNote(nowPlaying.CurrentEpisode.Key, PlayerService.Current.CurrentTime);

                InkNoteData            = new InkNoteData();
                InkNoteData.ImageBytes = imageBytes;

                ViewModel.GoToInkNote(meme);
            }
        }
Beispiel #2
0
        private async Task LoadExisting(BuildCast.DataModel.InkNote meme)
        {
            using (var db = new LocalStorageContext())
            {
                _data = db.MemeData.Where(l => l.InkMeme == meme.Id).FirstOrDefault();
                if (_data != null)
                {
                    var image = await _data.GetImage(Image_ImageOpened);

                    framergrab.Source = image;
                    await LoadInk(_data.Ink);
                }
            }
        }
Beispiel #3
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            CoreWindow.GetForCurrentThread().KeyDown += InkNote_KeyDown;

            _inkNote = e.Parameter as BuildCast.DataModel.InkNote;

            if (Player.InkNoteData != null)
            {
                framergrab.Source = await Player.InkNoteData.GetImage(Image_ImageOpened);
            }
            else
            {
                await LoadExisting(_inkNote);

                _editingExisting = true;
            }

            InkDrawingAttributes a = new InkDrawingAttributes();

            a.Color = Colors.White;
            inkingCanvas.InkPresenter.UpdateDefaultDrawingAttributes(a);

            base.OnNavigatedTo(e);
        }
        public async Task HandlePlayRequest(BuildCast.DataModel.InkNote i)
        {
            var shouldPlay = _nowPlayingState.HandlePlayRequest(i);

            await SetNewItem(new Uri(_nowPlayingState.CurrentEpisode.Key), _nowPlayingState.CurrentTime, shouldPlay, _nowPlayingState.CurrentEpisode.Id.ToString());
        }