private IEnumerable <InkStroke> GetStrokesToConvert() { var selectedStrokes = _strokeService.GetSelectedStrokes(); if (selectedStrokes.Any()) { return(selectedStrokes); } return(_strokeService.GetStrokes()); }
public async Task SaveInkAsync() { if (!_strokesService.GetStrokes().Any()) { return; } var savePicker = new FileSavePicker { SuggestedStartLocation = PickerLocationId.PicturesLibrary }; savePicker.FileTypeChoices.Add("Gif with embedded ISF", new List <string> { ".gif" }); var file = await savePicker.PickSaveFileAsync(); await _strokesService.SaveInkFileAsync(file); }
public async Task<bool> AnalyzeAsync(bool clean = false) { StopTimer(); if (IsAnalyzing) { // Ink analyzer is busy. Wait a while and try again. StartTimer(); return false; } if (clean == true) { InkAnalyzer.ClearDataForAllStrokes(); InkAnalyzer.AddDataForStrokes(_strokesService.GetStrokes()); } var result = await InkAnalyzer.AnalyzeAsync(); return result.Status == InkAnalysisStatus.Updated; }