public override void ViewDidLoad() { base.ViewDidLoad(); _vm = new PomodoroViewModel(SelectedTodoItem, new IosNavigation(this)); PomodoroLengthPicker.Model = new PomodoroLengthPickerDataSource(_vm); Title = "Pomodoro"; TimeRemainingLabel.Text = _vm.TimeLeftText; StartPomodoroButton.TitleLabel.Text = _vm.StartStopButtonText; _vm.PropertyChanged += (sender, e) => { switch (e.PropertyName) { case nameof(_vm.TimeLeftText): TimeRemainingLabel.Text = _vm.TimeLeftText; break; case nameof(_vm.StartStopButtonText): StartPomodoroButton.SetTitle(_vm.StartStopButtonText, UIControlState.Normal); break; default: break; } }; }
void ReleaseDesignerOutlets() { if (PomodoroLengthPicker != null) { PomodoroLengthPicker.Dispose(); PomodoroLengthPicker = null; } if (StartPomodoroButton != null) { StartPomodoroButton.Dispose(); StartPomodoroButton = null; } if (TimeRemainingLabel != null) { TimeRemainingLabel.Dispose(); TimeRemainingLabel = null; } }
void ReleaseDesignerOutlets() { if (CreatedDateLabel != null) { CreatedDateLabel.Dispose(); CreatedDateLabel = null; } if (DescriptionTextView != null) { DescriptionTextView.Dispose(); DescriptionTextView = null; } if (DoneButton != null) { DoneButton.Dispose(); DoneButton = null; } if (FinishedLabel != null) { FinishedLabel.Dispose(); FinishedLabel = null; } if (FinishedValueLabel != null) { FinishedValueLabel.Dispose(); FinishedValueLabel = null; } if (NumberOfMinutesValueLabel != null) { NumberOfMinutesValueLabel.Dispose(); NumberOfMinutesValueLabel = null; } if (NumberOfPomodorosValueLable != null) { NumberOfPomodorosValueLable.Dispose(); NumberOfPomodorosValueLable = null; } if (ScheduleButton != null) { ScheduleButton.Dispose(); ScheduleButton = null; } if (ScheduledForLabel != null) { ScheduledForLabel.Dispose(); ScheduledForLabel = null; } if (ScheduledForValueLabel != null) { ScheduledForValueLabel.Dispose(); ScheduledForValueLabel = null; } if (StartPomodoroButton != null) { StartPomodoroButton.Dispose(); StartPomodoroButton = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } }