public void SetMessageRead(string id)
{
try
{
lock (this)
{
if (!File.Exists(Windows.Storage.ApplicationData.Current.LocalFolder.Path + "bgtaskMessages.txt"))
{
File.CreateText(Windows.Storage.ApplicationData.Current.LocalFolder.Path + "bgtaskMessages.txt").Close();
}
using (var bgTaskToastedMessages = File.AppendText(Windows.Storage.ApplicationData.Current.LocalFolder.Path + "bgtaskMessages.txt"))
{
bgTaskToastedMessages.WriteLine(id);
}
}
}
catch { }
}