public static PrivacyDetailViewController CreateFor(DataClass selected) { PrivacyDetailViewController viewController = null; switch (selected) { case DataClass.Location: viewController = new LocationPrivacyViewController(); break; case DataClass.Notifications: viewController = new NotificationsPrivacyController(); break; case DataClass.Calendars: viewController = new EKEntityPrivacyController(EKEntityType.Event); break; case DataClass.Reminders: viewController = new EKEntityPrivacyController(EKEntityType.Reminder); break; case DataClass.Contacts: viewController = new AddressBookPrivacyController(); break; case DataClass.Photos: viewController = new PhotoPrivacyController(); break; case DataClass.Video: viewController = new VideoCapturePrivacyController(); break; case DataClass.Microphone: viewController = new MicrophonePrivacyController(); break; case DataClass.Bluetooth: viewController = new BluetoothPrivacyController(); break; case DataClass.Motion: viewController = new MotionPrivacyController(); break; case DataClass.Facebook: viewController = new SocialNetworkPrivacyController(ACAccountType.Facebook); break; case DataClass.Twitter: viewController = new SocialNetworkPrivacyController(ACAccountType.Twitter); break; case DataClass.SinaWeibo: viewController = new SocialNetworkPrivacyController(ACAccountType.SinaWeibo); break; case DataClass.TencentWeibo: viewController = new SocialNetworkPrivacyController(ACAccountType.TencentWeibo); break; case DataClass.Advertising: viewController = new AdvertisingPrivacyController(); break; default: throw new ArgumentOutOfRangeException(); } viewController.Title = selected.ToString(); return(viewController); }
void Setup(MotionPrivacyController vc) { vc.PrivacyManager = new MotionPrivacyManager (); }
void Setup(MotionPrivacyController vc) { vc.PrivacyManager = new MotionPrivacyManager(); }