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); }
private IEnumerable <InkStroke> GetStrokesToConvert() { var selectedStrokes = _strokeService.GetSelectedStrokes(); if (selectedStrokes.Any()) { return(selectedStrokes); } return(_strokeService.GetStrokes()); }
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); }