public iOSNotificationInterchange(string registerPath) { NotificationServices.RegisterForNotifications( NotificationType.Alert | NotificationType.Badge | NotificationType.Sound); this.registerPath = registerPath; this.register = loadRegister(); }
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()); } }