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); } }
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); } } }
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); }
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()); }