public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.Title = Resources.NotificationSettingsTitle; NotificationDisabledLabel.Text = Resources.NotificationDisabledNotice; OpenSettingsButton.SetTitle(Resources.OpenSettingsApp, UIControlState.Normal); RowLabel.Text = Resources.UpcomingEvent; ExplainationLabel.Text = Resources.NotificationSettingExplaination; ViewModel.PermissionGranted .Invert() .Subscribe(OpenSettingsContainer.Rx().IsVisible()) .DisposedBy(DisposeBag); ViewModel.PermissionGranted .Subscribe(CalendarNotificationsContainer.Rx().IsVisible()) .DisposedBy(DisposeBag); OpenSettingsButton.Rx() .BindAction(ViewModel.RequestAccess) .DisposedBy(DisposeBag); CalendarNotificationsRow.Rx().Tap() .Subscribe(ViewModel.OpenUpcomingEvents.Inputs) .DisposedBy(DisposeBag); ViewModel.UpcomingEvents .Subscribe(CalendarNotificationsValue.Rx().Text()) .DisposedBy(DisposeBag); }
void ReleaseDesignerOutlets() { if (CalendarNotificationsContainer != null) { CalendarNotificationsContainer.Dispose(); CalendarNotificationsContainer = null; } if (CalendarNotificationsRow != null) { CalendarNotificationsRow.Dispose(); CalendarNotificationsRow = null; } if (CalendarNotificationsValue != null) { CalendarNotificationsValue.Dispose(); CalendarNotificationsValue = null; } if (OpenSettingsButton != null) { OpenSettingsButton.Dispose(); OpenSettingsButton = null; } if (OpenSettingsContainer != null) { OpenSettingsContainer.Dispose(); OpenSettingsContainer = null; } }
void ReleaseDesignerOutlets() { if (CalendarNotificationsContainer != null) { CalendarNotificationsContainer.Dispose(); CalendarNotificationsContainer = null; } if (CalendarNotificationsRow != null) { CalendarNotificationsRow.Dispose(); CalendarNotificationsRow = null; } if (CalendarNotificationsValue != null) { CalendarNotificationsValue.Dispose(); CalendarNotificationsValue = null; } if (OpenSettingsButton != null) { OpenSettingsButton.Dispose(); OpenSettingsButton = null; } if (OpenSettingsContainer != null) { OpenSettingsContainer.Dispose(); OpenSettingsContainer = null; } if (NotificationDisabledLabel != null) { NotificationDisabledLabel.Dispose(); NotificationDisabledLabel = null; } if (ExplainationLabel != null) { ExplainationLabel.Dispose(); ExplainationLabel = null; } if (RowLabel != null) { RowLabel.Dispose(); RowLabel = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); NavigationItem.Title = FoundationResources.NotificationSettingsTitle; this.Bind(ViewModel.PermissionGranted.Invert(), OpenSettingsContainer.Rx().IsVisible()); this.Bind(ViewModel.PermissionGranted, CalendarNotificationsContainer.Rx().IsVisible()); this.Bind(OpenSettingsButton.Rx().Tap(), ViewModel.RequestAccessAction); this.Bind(CalendarNotificationsRow.Rx().Tap(), ViewModel.OpenUpcomingEvents); this.Bind(ViewModel.UpcomingEvents, CalendarNotificationsValue.Rx().Text()); }