Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private IEnumerable <InkStroke> GetStrokesToConvert()
        {
            var selectedStrokes = _strokeService.GetSelectedStrokes();

            if (selectedStrokes.Any())
            {
                return(selectedStrokes);
            }

            return(_strokeService.GetStrokes());
        }
Exemplo n.º 3
0
        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);
        }