Exemple #1
0
 public static void addHistory(recognizedData data)
 {
     if (HistoryCollection == null)
     {
         HistoryCollection = new ObservableCollection <recognizedData>();
     }
     HistoryCollection.Add(data);
 }
Exemple #2
0
        public static async void deleteHistory(recognizedData data)
        {
            int i;

            for (i = 0; i < HistoryCollection.Count(); i++)
            {
                if (HistoryCollection.ElementAt(i).imageName == data.imageName && HistoryCollection.ElementAt(i).date == data.date)
                {
                    break;
                }
            }
            try {
                var cache = HistoryCollection.ElementAt(i).imageFile;
                HistoryCollection.RemoveAt(i);
                await cache.DeleteAsync();
            }catch (Exception e) {
                MainPage.Current.toNavigate(typeof(ErrorPage));
                ErrorPage.errorPage.showError(e.Message);
            }
            GC.Collect();
        }