示例#1
0
            public override void OnReceive(Context context, Intent intent)
            {
                //When boot is complete
                ISettings AppSettings = CrossSettings.Current;

                bool pushStatus = AppSettings.GetValueOrDefault("pushRemindersCheckBox", true);

                WorkingWithFiles.SaveAndLoadDatabase temp = new WorkingWithFiles.SaveAndLoadDatabase();
                if (pushStatus)
                {
                    temp.startNotifications(false);
                }
            }
 public static string loadMyDatabase()
 {
     try
     {
         string filename      = "MyEventsDatabase";
         var    documentsPath = getEnvironmentPath();
         var    filePath      = Path.Combine(documentsPath, filename);
         var    temp          = new WorkingWithFiles.SaveAndLoadDatabase();
         string json          = Xamarin.Forms.DependencyService.Get <CrossPlatformUtility>().LoadText(filePath);
         return(json);
     }
     catch (Exception e) {
         var ee = e;
     }
     return(string.Empty);
 }