private async Task DeleteEntryIntoJsonAsync()
        {
            try
            {

                string content = String.Empty;
                List<string> ListCars = new List<string>();
                StorageFolder local = ApplicationData.Current.LocalFolder;
                // Create a new file named DataFile.txt.
                var file = await local.CreateFileAsync("DataFile.json", CreationCollisionOption.OpenIfExists);
                CultureInfo provider = new CultureInfo("es-ES");
                if (local != null)
                {
                    // var dataFolder = await local.GetFolderAsync("DataFolder");
                    var myStream = await local.OpenStreamForReadAsync("DataFile.json");
                    using (StreamReader reader = new StreamReader(myStream))
                    {
                        content = await reader.ReadToEndAsync();
                    }

                    if (content != "")
                    {
                        //Now add one more Entry.
                        ListCars = FavClass.ConvertToFavEvent(content);

                        foreach (var favEvent in ListCars)
                        {
                            if (String.Compare(favEvent, subitem.UniqueId) == 0)
                            {

                                //ListCars.Remove(favEvent);
                                int i = ListCars.FindIndex(f => f == subitem.UniqueId);
                                ListCars.RemoveAt(i);
                                break;
                                //ListCars.Remove(new FavClass() { UniqueId = subitem.UniqueId, Id = subitem.Id, Title = subitem.Title, Subtitle = subitem.Subtitle, Subtitle = subitem.Subtitle, Content = subitem.Content });
                            }
                        }
                        ListCars.TrimExcess();
                        var subitemDet = await SampleDataSource.GetGroupAsync("Schedule");
                        schedulednotif n = new schedulednotif();
                        n.schedulenotifrem(subitem.Title);
                        //int noOfItems = subitemDet.Items.Count;
                        //string date = "25/10/2015";
                        //for (int i = 0; i < noOfItems; i++)
                        //{
                        //    int noOfsubitems = subitemDet.Items[i].SubItems.Count;
                        //    MessageDialog msgbox4 = new MessageDialog(noOfsubitems.ToString());
                        //    await msgbox4.ShowAsync();
                        //    if (i == 0)
                        //    {
                        //        date = "26/10/2015";
                        //    }
                        //    else if (i == 1)
                        //    {
                        //        date = "26/10/2015";
                        //    }
                        //    else if (i == 2)
                        //    {
                        //        date = "30/10/2015";
                        //    }
                        //    else if (i == 3)
                        //    {
                        //        date = "31/10/2015";
                        //    }
                        //    else if (i == 4)
                        //    {
                        //        date = "01/11/2015";
                        //    }
                        //    for (int j = 0; j < noOfsubitems; j++)
                        //    {
                        //        if (subitemDet.Items[i].SubItems[j].UniqueId.CompareTo(subitem.UniqueId) == 0)
                        //        {
                        //            string date1 = date + " " + subitemDet.Items[i].SubItems[j].Subtitle;
                        //            MessageDialog msgbox5 = new MessageDialog(date1);
                        //            await msgbox5.ShowAsync();
                        //            //DateTime dt = Convert.ToDateTime(date + subitemDet.Items[0].SubItems[0].Subtitle);
                        //            DateTime dt = DateTime.ParseExact(date1, "g", provider);

                        //            DateTime ddt = DateTime.Now;
                        //            var diffInSeconds = (dt - ddt).TotalSeconds;
                        //            MessageDialog msgbox6 = new MessageDialog(diffInSeconds.ToString());
                        //            await msgbox6.ShowAsync();
                        //            diffInSeconds = diffInSeconds - 900;
                        //            if ((diffInSeconds + 10) > 0)

                        //            MessageDialog msgbox7 = new MessageDialog("conv");
                        //            await msgbox7.ShowAsync();
                        //        }
                        //    }
                        //}

                        //if (item != null)
                        //ListCars.Add(new FavClass() { UniqueId = item1.UniqueId, Id = item1.Id, Title = item1.Title, Subtitle = item1.Subtitle, Subtitle = item1.Subtitle, Content = item1.Content });
                        //else
                        //  ListCars.Add(new FavClass() { UniqueId = subitem.UniqueId, Id = subitem.Id, Title = subitem.Title, Subtitle = subitem.Subtitle, Subtitle = subitem.Subtitle, Content = subitem.Content });
                       
                            DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List<string>));
                            using (var stream = await local.OpenStreamForWriteAsync(
                                          "DataFile.json",
                                          CreationCollisionOption.ReplaceExisting))
                            {
                                serializer.WriteObject(stream, ListCars);
                            }
                        
                        
                    }

                }
            }
            catch
            { }
        }
        private async Task DeleteEntryIntoJsonAsync()
        {
            try
            {
                string content = String.Empty;
                List<string> ListCars = new List<string>();
                StorageFolder local = ApplicationData.Current.LocalFolder;
                // Create a new file named DataFile.txt.
                var file = await local.CreateFileAsync("DataFile.json",
                CreationCollisionOption.OpenIfExists);

                if (local != null)
                {
                    // var dataFolder = await local.GetFolderAsync("DataFolder");
                    var myStream = await local.OpenStreamForReadAsync("DataFile.json");
                    using (StreamReader reader = new StreamReader(myStream))
                    {
                        content = await reader.ReadToEndAsync();
                    }
                    if (content != "")
                    {
                        //Now add one more Entry.
                        ListCars = FavClass.ConvertToFavEvent(content);

                        foreach (var favEvent in ListCars)
                        {
                            if (String.Compare(favEvent, item.UniqueId) == 0)
                            {
                                //ListCars.Remove((string)favEvent);
                                int i = ListCars.FindIndex(f => f == item.UniqueId);
                                ListCars.RemoveAt(i);
                                break;
                            }
                        }
                        ListCars.TrimExcess();
                        var subitemDet = await SampleDataSource.GetGroupAsync("Schedule");
                        schedulednotif n = new schedulednotif();
                        n.schedulenotifrem(item.Title);


                        //if (item != null)
                        //ListCars.Add(new FavClass() { UniqueId = item1.UniqueId, Id = item1.Id, Title = item1.Title, Subtitle = item1.Subtitle, Subtitle = item1.Subtitle, Content = item1.Content });
                        //else
                        //  ListCars.Add(new FavClass() { UniqueId = subitem.UniqueId, Id = subitem.Id, Title = subitem.Title, Subtitle = subitem.Subtitle, Subtitle = subitem.Subtitle, Content = subitem.Content });
                       
                            DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List<string>));
                            using (var stream = await local.OpenStreamForWriteAsync(
                                          "DataFile.json",
                                          CreationCollisionOption.ReplaceExisting))
                            {
                                serializer.WriteObject(stream, ListCars);
                            }
                        
                       
                    }

                }
            }
            catch { }
            }