Exemple #1
0
 public iOSNotificationInterchange(string registerPath)
 {
     NotificationServices.RegisterForNotifications(
         NotificationType.Alert |
         NotificationType.Badge |
         NotificationType.Sound);
     this.registerPath = registerPath;
     this.register     = loadRegister();
 }
Exemple #2
0
 iOSNotificationRegister loadRegister()
 {
     try
     {
         BinaryFormatter         formatter = new BinaryFormatter();
         FileStream              file      = File.Open(getRegisterFilePath(), FileMode.Open);
         iOSNotificationRegister register  = (iOSNotificationRegister)formatter.Deserialize(file);
         file.Close();
         return(register);
     }
     catch
     {
         return(new iOSNotificationRegister());
     }
 }