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

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

                ViewModel.GoToInkNote(meme);
            }
        }
示例#2
0
        private async Task LoadExisting(NEM.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);
                }
            }
        }
示例#3
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            CoreWindow.GetForCurrentThread().KeyDown += InkNote_KeyDown;

            _inkNote = e.Parameter as NEM.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);
        }
示例#4
0
        public async Task HandlePlayRequest(NEM.DataModel.InkNote i)
        {
            var shouldPlay = _nowPlayingState.HandlePlayRequest(i);

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