void Setup(PrivacyDetailViewController vc, DataClass type)
		{
			IPrivacyManager manager = null;
			switch (type) {
				case DataClass.Reminders:
					manager = new EKEntityPrivacyManager (EKEntityType.Reminder);
					break;

				case DataClass.Calendars:
					manager = new EKEntityPrivacyManager (EKEntityType.Event);
					break;

				case DataClass.Facebook:
					manager = new SocialNetworkPrivacyManager (ACAccountType.Facebook);
					break;

				case DataClass.Twitter:
					manager = new SocialNetworkPrivacyManager (ACAccountType.Twitter);
					break;

				case DataClass.SinaWeibo:
					manager = new SocialNetworkPrivacyManager (ACAccountType.SinaWeibo);
					break;

				case DataClass.TencentWeibo:
					manager = new SocialNetworkPrivacyManager (ACAccountType.TencentWeibo);
					break;

				case DataClass.Notifications:
					manager = new NotificationsPrivacyManager ((AppDelegate)UIApplication.SharedApplication.Delegate);
					break;

				case DataClass.Contacts:
					manager = new AddressBookPrivacyManager ();
					break;

				case DataClass.Photos:
					manager = new PhotoPrivacyManager ();
					break;

				case DataClass.Video:
					manager = new VideoCapturePrivacyManager ();
					break;

				case DataClass.Microphone:
					manager = new MicrophonePrivacyManager ();
					break;

				case DataClass.Bluetooth:
					manager = new BluetoothPrivacyManager ();
					break;

				case DataClass.Advertising:
					manager = new AdvertisingPrivacyManager ();
					break;

				default:
					throw new NotImplementedException ();
			}

			vc.PrivacyManager = manager;
		}
Exemplo n.º 2
0
        void Setup(PrivacyDetailViewController vc, DataClass type)
        {
            IPrivacyManager manager = null;

            switch (type)
            {
            case DataClass.Reminders:
                manager = new EKEntityPrivacyManager(EKEntityType.Reminder);
                break;

            case DataClass.Calendars:
                manager = new EKEntityPrivacyManager(EKEntityType.Event);
                break;

            case DataClass.Facebook:
                manager = new SocialNetworkPrivacyManager(ACAccountType.Facebook);
                break;

            case DataClass.Twitter:
                manager = new SocialNetworkPrivacyManager(ACAccountType.Twitter);
                break;

            case DataClass.SinaWeibo:
                manager = new SocialNetworkPrivacyManager(ACAccountType.SinaWeibo);
                break;

            case DataClass.TencentWeibo:
                manager = new SocialNetworkPrivacyManager(ACAccountType.TencentWeibo);
                break;

            case DataClass.Notifications:
                manager = new NotificationsPrivacyManager((AppDelegate)UIApplication.SharedApplication.Delegate);
                break;

            case DataClass.Contacts:
                manager = new AddressBookPrivacyManager();
                break;

            case DataClass.Photos:
                manager = new PhotoPrivacyManager();
                break;

            case DataClass.Video:
                manager = new VideoCapturePrivacyManager();
                break;

            case DataClass.Microphone:
                manager = new MicrophonePrivacyManager();
                break;

            case DataClass.Bluetooth:
                manager = new BluetoothPrivacyManager();
                break;

            case DataClass.Advertising:
                manager = new AdvertisingPrivacyManager();
                break;

            default:
                throw new NotImplementedException();
            }

            vc.PrivacyManager = manager;
        }