void ReleaseDesignerOutlets()
        {
            if (DividerView != null)
            {
                DividerView.Dispose();
                DividerView = null;
            }

            if (RoomLabel != null)
            {
                RoomLabel.Dispose();
                RoomLabel = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (EndTimeLabel != null)
            {
                EndTimeLabel.Dispose();
                EndTimeLabel = null;
            }
        }
        private void prepareViews()
        {
            var width  = UIScreen.MainScreen.Bounds.Width;
            var height = width + additionalVerticalContentSize;

            PreferredContentSize = new CGSize
            {
                Width  = width,
                Height = height
            };

            EndTimeLabel.Font   = EndTimeLabel.Font.GetMonospacedDigitFont();
            StartTimeLabel.Font = StartTimeLabel.Font.GetMonospacedDigitFont();

            SetEndButton.TintColor = Color.EditDuration.SetButton.ToNativeColor();

            StackView.Spacing = stackViewSpacing;

            var backgroundTap = new UITapGestureRecognizer(onBackgroundTap);

            View.AddGestureRecognizer(backgroundTap);

            var editTimeTap = new UITapGestureRecognizer(onEditTimeTap);

            StartTimeLabel.AddGestureRecognizer(editTimeTap);
            EndTimeLabel.AddGestureRecognizer(editTimeTap);
        }
Example #3
0
        private void prepareViews()
        {
            if (UIDevice.CurrentDevice.UserInterfaceIdiom != UIUserInterfaceIdiom.Pad)
            {
                var width  = UIScreen.MainScreen.Bounds.Width;
                var height = width + additionalVerticalContentSize;
                PreferredContentSize = new CGSize(width, height);
            }

            EndTimeLabel.Font   = EndTimeLabel.Font.GetMonospacedDigitFont();
            StartTimeLabel.Font = StartTimeLabel.Font.GetMonospacedDigitFont();

            SetEndButton.TintColor = Colors.EditDuration.SetButton.ToNativeColor();

            StackView.Spacing = stackViewSpacing;

            var backgroundTap = new UITapGestureRecognizer(onBackgroundTap);

            backgroundTap.Delegate = this;
            View.AddGestureRecognizer(backgroundTap);

            var editTimeTap = new UITapGestureRecognizer(onEditTimeTap);

            StartTimeLabel.AddGestureRecognizer(editTimeTap);
            EndTimeLabel.AddGestureRecognizer(editTimeTap);
        }
Example #4
0
        private void UpdateVisibility(bool animated)
        {
            if (DataContext == null)
            {
                return;
            }

            ThumbImageView.SetHidden(!DataContext.IsLogoVisible, animated);
            ThumbLabel.SetHidden(IsExpanded || !DataContext.IsLogoVisible || DataContext.Show.HasPictures(), animated);

            StartTimeLabel.SetHidden(!DataContext.IsTimeVisible, animated);
            EndTimeLabel.SetHidden(!DataContext.IsTimeVisible, animated);

            EndTimeLabel.TextColor = IsExpanded ? ThemeColors.ContentLightTextPassive : ThemeColors.BorderLight;

            var isLocationHidden = !IsExpanded || !DataContext.IsLocationAvailable;

            NavigateOnMapButton.SetHidden(isLocationHidden, animated);
            LocationLabel.SetHidden(isLocationHidden, animated);

            var isDescriptionHidden = !IsExpanded || GetShowDescription(DataContext.Show, !DataContext.IsTimeVisible) == null;

            DescriptionLabel.SetHidden(isDescriptionHidden, animated);

            var isDetailsHidden = !IsExpanded || !DataContext.Show.HasDetailsUrl();

            DetailsLabel.SetHidden(isDetailsHidden, animated);
            DetailsButton.SetHidden(isDetailsHidden, animated);
        }
Example #5
0
        private void prepareViews()
        {
            EndTimeLabel.Font   = EndTimeLabel.Font.GetMonospacedDigitFont();
            StartTimeLabel.Font = StartTimeLabel.Font.GetMonospacedDigitFont();

            SetEndButton.TintColor = Color.EditDuration.SetButton.ToNativeColor();

            StackView.Spacing = stackViewSpacing;

            var backgroundTap = new UITapGestureRecognizer(onBackgroundTap);

            View.AddGestureRecognizer(backgroundTap);

            var editTimeTap = new UITapGestureRecognizer(onEditTimeTap);

            StartTimeLabel.AddGestureRecognizer(editTimeTap);
            EndTimeLabel.AddGestureRecognizer(editTimeTap);
        }
Example #6
0
        void ReleaseDesignerOutlets()
        {
            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

            if (DurationLabel != null)
            {
                DurationLabel.Dispose();
                DurationLabel = null;
            }

            if (DurationView != null)
            {
                DurationView.Dispose();
                DurationView = null;
            }

            if (EndTimeLabel != null)
            {
                EndTimeLabel.Dispose();
                EndTimeLabel = null;
            }

            if (SaveButton != null)
            {
                SaveButton.Dispose();
                SaveButton = null;
            }

            if (StartTimeLabel != null)
            {
                StartTimeLabel.Dispose();
                StartTimeLabel = null;
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            StartLabel.Text = Resources.Start;
            EndLabel.Text   = Resources.End;
            TitleLabel.Text = Resources.StartAndStopTime;
            SetEndButton.SetTitle(Resources.Stop, UIControlState.Normal);
            SaveButton.SetTitle(Resources.Save, UIControlState.Normal);

            prepareViews();

            // Actions
            SaveButton.Rx()
            .BindAction(ViewModel.Save)
            .DisposedBy(disposeBag);

            CloseButton.Rx()
            .BindAction(ViewModel.Close)
            .DisposedBy(disposeBag);

            // Start and stop date/time
            ViewModel.StartTimeString
            .Subscribe(StartTimeLabel.Rx().Text())
            .DisposedBy(disposeBag);

            ViewModel.StartDateString
            .Subscribe(StartDateLabel.Rx().Text())
            .DisposedBy(disposeBag);

            ViewModel.StopTimeString
            .Subscribe(EndTimeLabel.Rx().Text())
            .DisposedBy(disposeBag);

            ViewModel.StopDateString
            .Subscribe(EndDateLabel.Rx().Text())
            .DisposedBy(disposeBag);

            // Editing start and end time
            StartView.Rx()
            .BindAction(ViewModel.EditStartTime)
            .DisposedBy(disposeBag);

            EndView.Rx()
            .BindAction(ViewModel.EditStopTime)
            .DisposedBy(disposeBag);

            SetEndButton.Rx()
            .BindAction(ViewModel.EditStopTime)
            .DisposedBy(disposeBag);

            // Visibility
            ViewModel.IsRunning
            .Subscribe(running =>
            {
                SetEndButton.Hidden = !running;
                EndTimeLabel.Hidden = running;
                EndDateLabel.Hidden = running;
            })
            .DisposedBy(disposeBag);

            // Stard and end colors
            ViewModel.IsEditingStartTime
            .Select(editingStartTime => editingStartTime
                    ? Color.EditDuration.EditedTime.ToNativeColor()
                    : Color.EditDuration.NotEditedTime.ToNativeColor()
                    )
            .Subscribe(color =>
            {
                StartTimeLabel.TextColor = color;
                StartDateLabel.TextColor = color;
            })
            .DisposedBy(disposeBag);

            ViewModel.IsEditingStopTime
            .Select(editingStartTime => editingStartTime
                    ? Color.EditDuration.EditedTime.ToNativeColor()
                    : Color.EditDuration.NotEditedTime.ToNativeColor()
                    )
            .Subscribe(color =>
            {
                EndTimeLabel.TextColor = color;
                EndDateLabel.TextColor = color;
            })
            .DisposedBy(disposeBag);

            // Date picker
            ViewModel.IsEditingTime
            .Subscribe(DatePickerContainer.Rx().AnimatedIsVisible())
            .DisposedBy(disposeBag);

            DatePicker.Rx().Date()
            .Subscribe(ViewModel.ChangeActiveTime.Inputs)
            .DisposedBy(disposeBag);

            var startTime = ViewModel.IsEditingStartTime
                            .Where(CommonFunctions.Identity)
                            .SelectMany(_ => ViewModel.StartTime);

            var stopTime = ViewModel.IsEditingStopTime
                           .Where(CommonFunctions.Identity)
                           .SelectMany(_ => ViewModel.StopTime);

            Observable.Merge(startTime, stopTime)
            .Subscribe(v => DatePicker.SetDate(v.ToNSDate(), false))
            .DisposedBy(disposeBag);

            ViewModel.IsEditingStartTime
            .Where(CommonFunctions.Identity)
            .SelectMany(_ => ViewModel.StartTime)
            .Subscribe(v => DatePicker.SetDate(v.ToNSDate(), false))
            .DisposedBy(disposeBag);

            ViewModel.MinimumDateTime
            .Subscribe(v => DatePicker.MinimumDate = v.ToNSDate())
            .DisposedBy(disposeBag);

            ViewModel.MaximumDateTime
            .Subscribe(v => DatePicker.MaximumDate = v.ToNSDate())
            .DisposedBy(disposeBag);

            ViewModel.TimeFormat
            .Subscribe(v => DatePicker.Locale = v.IsTwentyFourHoursFormat ? new NSLocale("en_GB") : new NSLocale("en_US"))
            .DisposedBy(disposeBag);

            // DurationInput

            ViewModel.IsEditingTime
            .Invert()
            .Subscribe(DurationInput.Rx().Enabled())
            .DisposedBy(disposeBag);

            ViewModel.Duration
            .Subscribe(v => DurationInput.Duration = v)
            .DisposedBy(disposeBag);

            ViewModel.DurationString
            .Subscribe(v => DurationInput.FormattedDuration = v)
            .DisposedBy(disposeBag);

            DurationInput.Rx().Duration()
            .Subscribe(ViewModel.ChangeDuration.Inputs)
            .DisposedBy(disposeBag);

            // The wheel

            ViewModel.IsEditingTime
            .Invert()
            .Subscribe(v => WheelView.UserInteractionEnabled = v)
            .DisposedBy(disposeBag);

            ViewModel.MinimumStartTime
            .Subscribe(v => WheelView.MinimumStartTime = v)
            .DisposedBy(disposeBag);

            ViewModel.MaximumStartTime
            .Subscribe(v => WheelView.MaximumStartTime = v)
            .DisposedBy(disposeBag);

            ViewModel.MinimumStopTime
            .Subscribe(v => WheelView.MinimumEndTime = v)
            .DisposedBy(disposeBag);

            ViewModel.MaximumStopTime
            .Subscribe(v => WheelView.MaximumEndTime = v)
            .DisposedBy(disposeBag);

            ViewModel.StartTime
            .Subscribe(v => WheelView.StartTime = v)
            .DisposedBy(disposeBag);

            ViewModel.StopTime
            .Subscribe(v => WheelView.EndTime = v)
            .DisposedBy(disposeBag);

            ViewModel.IsRunning
            .Subscribe(v => WheelView.IsRunning = v)
            .DisposedBy(disposeBag);

            WheelView.Rx().StartTime()
            .Subscribe(ViewModel.ChangeStartTime.Inputs)
            .DisposedBy(disposeBag);

            WheelView.Rx().EndTime()
            .Subscribe(ViewModel.ChangeStopTime.Inputs)
            .DisposedBy(disposeBag);

            // Interaction observables for analytics

            var editingStart = Observable.Merge(
                StartView.Rx().Tap().SelectValue(true),
                EndView.Rx().Tap().SelectValue(false)
                );

            var dateComponentChanged = DatePicker.Rx().DateComponent()
                                       .WithLatestFrom(editingStart,
                                                       (_, isStart) => isStart ? EditTimeSource.BarrelStartDate : EditTimeSource.BarrelStopDate
                                                       );

            var timeComponentChanged = DatePicker.Rx().TimeComponent()
                                       .WithLatestFrom(editingStart,
                                                       (_, isStart) => isStart ? EditTimeSource.BarrelStartTime : EditTimeSource.BarrelStopTime
                                                       );

            var durationInputChanged = DurationInput.Rx().Duration()
                                       .SelectValue(EditTimeSource.NumpadDuration);

            Observable.Merge(
                dateComponentChanged,
                timeComponentChanged,
                WheelView.TimeEdited,
                durationInputChanged
                )
            .Distinct()
            .Subscribe(ViewModel.TimeEditedWithSource)
            .DisposedBy(disposeBag);
        }
Example #8
0
        void ReleaseDesignerOutlets()
        {
            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

            if (DatePicker != null)
            {
                DatePicker.Dispose();
                DatePicker = null;
            }

            if (DatePickerContainer != null)
            {
                DatePickerContainer.Dispose();
                DatePickerContainer = null;
            }

            if (DurationInput != null)
            {
                DurationInput.Dispose();
                DurationInput = null;
            }

            if (EndDateLabel != null)
            {
                EndDateLabel.Dispose();
                EndDateLabel = null;
            }

            if (EndLabel != null)
            {
                EndLabel.Dispose();
                EndLabel = null;
            }

            if (EndTimeLabel != null)
            {
                EndTimeLabel.Dispose();
                EndTimeLabel = null;
            }

            if (EndView != null)
            {
                EndView.Dispose();
                EndView = null;
            }

            if (SaveButton != null)
            {
                SaveButton.Dispose();
                SaveButton = null;
            }

            if (SetEndButton != null)
            {
                SetEndButton.Dispose();
                SetEndButton = null;
            }

            if (StackView != null)
            {
                StackView.Dispose();
                StackView = null;
            }

            if (StartDateLabel != null)
            {
                StartDateLabel.Dispose();
                StartDateLabel = null;
            }

            if (StartLabel != null)
            {
                StartLabel.Dispose();
                StartLabel = null;
            }

            if (StartTimeLabel != null)
            {
                StartTimeLabel.Dispose();
                StartTimeLabel = null;
            }

            if (StartView != null)
            {
                StartView.Dispose();
                StartView = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (WheelView != null)
            {
                WheelView.Dispose();
                WheelView = null;
            }

            if (startIcon != null)
            {
                startIcon.Dispose();
                startIcon = null;
            }

            if (endIcon != null)
            {
                endIcon.Dispose();
                endIcon = null;
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            projectTaskClientToAttributedString = new ProjectTaskClientToAttributedString(
                ProjectTaskClientLabel.Font.CapHeight,
                Colors.EditTimeEntry.ClientText.ToNativeColor());

            tagsListToAttributedString = new TagsListToAttributedString(TagsTextView);

            localizeLabels();
            prepareViews();
            prepareOnboarding();

            contentSizeChangedDisposable = ScrollViewContent.AddObserver(boundsKey, NSKeyValueObservingOptions.New, onContentSizeChanged);

            DescriptionTextView.Text = ViewModel.Description.Value;

            ViewModel.Preferences
            .Select(preferences => preferences.DurationFormat)
            .Select(format => ViewModel.GroupDuration.ToFormattedString(format))
            .Subscribe(GroupDuration.Rx().Text())
            .DisposedBy(DisposeBag);

            CloseButton.Rx().Tap()
            .Subscribe(ViewModel.CloseWithDefaultResult)
            .DisposedBy(DisposeBag);

            ConfirmButton.Rx()
            .BindAction(ViewModel.Save)
            .DisposedBy(DisposeBag);

            DescriptionTextView.TextObservable
            .Subscribe(ViewModel.Description.Accept)
            .DisposedBy(DisposeBag);

            DescriptionTextView.SizeChangedObservable
            .Subscribe(adjustHeight)
            .DisposedBy(DisposeBag);

            ViewModel.SyncErrorMessage
            .Subscribe(ErrorMessageLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.IsSyncErrorMessageVisible
            .Subscribe(ErrorView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ErrorView.Rx().Tap()
            .Subscribe(ViewModel.DismissSyncErrorMessage.Inputs)
            .DisposedBy(DisposeBag);

            ViewModel.ProjectClientTask
            .Select(info => projectTaskClientToAttributedString.Convert(
                        info.Project,
                        info.Task,
                        info.Client,
                        new Color(info.ProjectColor).ToNativeColor()))
            .Subscribe(ProjectTaskClientLabel.Rx().AttributedText())
            .DisposedBy(DisposeBag);

            ViewModel.ProjectClientTask
            .Select(info => info.HasProject)
            .Subscribe(ProjectTaskClientLabel.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.ProjectClientTask
            .Select(info => !info.HasProject)
            .Subscribe(AddProjectAndTaskView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            SelectProject.Rx()
            .BindAction(ViewModel.SelectProject)
            .DisposedBy(DisposeBag);

            TagsTextView.Rx()
            .BindAction(ViewModel.SelectTags)
            .DisposedBy(DisposeBag);

            AddTagsView.Rx()
            .BindAction(ViewModel.SelectTags)
            .DisposedBy(DisposeBag);

            var containsTags = ViewModel.Tags
                               .Select(tags => tags.Any());

            containsTags
            .Invert()
            .Subscribe(AddTagsView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            containsTags
            .Subscribe(TagsTextView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.IsBillable
            .Subscribe(BillableSwitch.Rx().CheckedObserver())
            .DisposedBy(DisposeBag);

            BillableSwitch.Rx().Changed()
            .Subscribe(ViewModel.ToggleBillable.Inputs)
            .DisposedBy(DisposeBag);

            ViewModel.IsBillableAvailable
            .Subscribe(BillableView.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.IsInaccessible
            .Subscribe(adjustUIForInaccessibleTimeEntry)
            .DisposedBy(DisposeBag);

            ViewModel.StartTime
            .WithLatestFrom(ViewModel.Preferences,
                            (startTime, preferences) => DateTimeToFormattedString.Convert(
                                startTime,
                                preferences.TimeOfDayFormat.Format))
            .Subscribe(StartTimeLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.StartTime
            .WithLatestFrom(ViewModel.Preferences,
                            (startTime, preferences) => DateTimeToFormattedString.Convert(
                                startTime,
                                preferences.DateFormat.Short))
            .Subscribe(StartDateLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            StartTimeView.Rx().Tap()
            .SelectValue(EditViewTapSource.StartTime)
            .Subscribe(ViewModel.EditTimes.Inputs)
            .DisposedBy(DisposeBag);

            StartDateView.Rx().Tap()
            .Subscribe(ViewModel.SelectStartDate.Inputs)
            .DisposedBy(DisposeBag);

            ViewModel.IsTimeEntryRunning
            .Subscribe(StopButton.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.IsTimeEntryRunning
            .Select(CommonFunctions.Invert)
            .Subscribe(EndTimeLabel.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.StopTime
            .Where(stopTime => stopTime.HasValue)
            .Select(stopTime => stopTime.Value)
            .WithLatestFrom(ViewModel.Preferences,
                            (stopTime, preferences) => DateTimeToFormattedString.Convert(
                                stopTime,
                                preferences.TimeOfDayFormat.Format))
            .Subscribe(EndTimeLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            EndTimeView.Rx().Tap()
            .SelectLatestFrom(ViewModel.IsTimeEntryRunning)
            .Invert()
            .Where(CommonFunctions.Identity)
            .SelectValue(EditViewTapSource.StopTime)
            .Subscribe(ViewModel.EditTimes.Inputs)
            .DisposedBy(DisposeBag);

            EndTimeView.Rx().Tap()
            .Merge(StopButton.Rx().Tap())
            .SelectLatestFrom(ViewModel.IsTimeEntryRunning)
            .Where(CommonFunctions.Identity)
            .SelectUnit()
            .Subscribe(ViewModel.StopTimeEntry.Inputs)
            .DisposedBy(DisposeBag);

            ViewModel.Duration
            .WithLatestFrom(ViewModel.Preferences,
                            (duration, preferences) => duration.ToFormattedString(preferences.DurationFormat))
            .Subscribe(DurationLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            DurationView.Rx().Tap()
            .SelectValue(EditViewTapSource.Duration)
            .Subscribe(ViewModel.EditTimes.Inputs)
            .DisposedBy(DisposeBag);

            DeleteButton.Rx()
            .BindAction(ViewModel.Delete)
            .DisposedBy(DisposeBag);
        }
Example #10
0
        void ReleaseDesignerOutlets()
        {
            if (BottomBorderLeftConstraint != null)
            {
                BottomBorderLeftConstraint.Dispose();
                BottomBorderLeftConstraint = null;
            }

            if (DescriptionAndDetailsSpaceConstraint != null)
            {
                DescriptionAndDetailsSpaceConstraint.Dispose();
                DescriptionAndDetailsSpaceConstraint = null;
            }

            if (DescriptionLabel != null)
            {
                DescriptionLabel.Dispose();
                DescriptionLabel = null;
            }

            if (DetailsButton != null)
            {
                DetailsButton.Dispose();
                DetailsButton = null;
            }

            if (DetailsLabel != null)
            {
                DetailsLabel.Dispose();
                DetailsLabel = null;
            }

            if (EndTimeLabel != null)
            {
                EndTimeLabel.Dispose();
                EndTimeLabel = null;
            }

            if (LocationAndDescriptionConstraint != null)
            {
                LocationAndDescriptionConstraint.Dispose();
                LocationAndDescriptionConstraint = null;
            }

            if (LocationLabel != null)
            {
                LocationLabel.Dispose();
                LocationLabel = null;
            }

            if (NavigateOnMapButton != null)
            {
                NavigateOnMapButton.Dispose();
                NavigateOnMapButton = null;
            }

            if (Separator != null)
            {
                Separator.Dispose();
                Separator = null;
            }

            if (StarButton != null)
            {
                StarButton.Dispose();
                StarButton = null;
            }

            if (StartTimeLabel != null)
            {
                StartTimeLabel.Dispose();
                StartTimeLabel = null;
            }

            if (ThumbHeightConstraint != null)
            {
                ThumbHeightConstraint.Dispose();
                ThumbHeightConstraint = null;
            }

            if (ThumbImageView != null)
            {
                ThumbImageView.Dispose();
                ThumbImageView = null;
            }

            if (ThumbLabel != null)
            {
                ThumbLabel.Dispose();
                ThumbLabel = null;
            }

            if (ThumbLabelView != null)
            {
                ThumbLabelView.Dispose();
                ThumbLabelView = null;
            }

            if (ThumbLeftConstraint != null)
            {
                ThumbLeftConstraint.Dispose();
                ThumbLeftConstraint = null;
            }

            if (ThumbTopConstraint != null)
            {
                ThumbTopConstraint.Dispose();
                ThumbTopConstraint = null;
            }

            if (ThumbWidthConstraint != null)
            {
                ThumbWidthConstraint.Dispose();
                ThumbWidthConstraint = null;
            }

            if (TimeBackgroundView != null)
            {
                TimeBackgroundView.Dispose();
                TimeBackgroundView = null;
            }

            if (TimeTopConstraint != null)
            {
                TimeTopConstraint.Dispose();
                TimeTopConstraint = null;
            }

            if (TitleAndLocationConstraint != null)
            {
                TitleAndLocationConstraint.Dispose();
                TitleAndLocationConstraint = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (TitleLeftConstraint != null)
            {
                TitleLeftConstraint.Dispose();
                TitleLeftConstraint = null;
            }
        }
Example #11
0
        void ReleaseDesignerOutlets()
        {
            if (AddProjectAndTaskView != null)
            {
                AddProjectAndTaskView.Dispose();
                AddProjectAndTaskView = null;
            }

            if (AddTagsView != null)
            {
                AddTagsView.Dispose();
                AddTagsView = null;
            }

            if (BillableSwitch != null)
            {
                BillableSwitch.Dispose();
                BillableSwitch = null;
            }

            if (BillableView != null)
            {
                BillableView.Dispose();
                BillableView = null;
            }

            if (CategorizeWithProjectsBubbleView != null)
            {
                CategorizeWithProjectsBubbleView.Dispose();
                CategorizeWithProjectsBubbleView = null;
            }

            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

            if (ConfirmButton != null)
            {
                ConfirmButton.Dispose();
                ConfirmButton = null;
            }

            if (ConfirmButtonBottomConstraint != null)
            {
                ConfirmButtonBottomConstraint.Dispose();
                ConfirmButtonBottomConstraint = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }

            if (DeleteButtonBottomConstraint != null)
            {
                DeleteButtonBottomConstraint.Dispose();
                DeleteButtonBottomConstraint = null;
            }

            if (DescriptionTextView != null)
            {
                DescriptionTextView.Dispose();
                DescriptionTextView = null;
            }

            if (DurationLabel != null)
            {
                DurationLabel.Dispose();
                DurationLabel = null;
            }

            if (DurationView != null)
            {
                DurationView.Dispose();
                DurationView = null;
            }

            if (EndTimeLabel != null)
            {
                EndTimeLabel.Dispose();
                EndTimeLabel = null;
            }

            if (EndTimeView != null)
            {
                EndTimeView.Dispose();
                EndTimeView = null;
            }

            if (ErrorMessageLabel != null)
            {
                ErrorMessageLabel.Dispose();
                ErrorMessageLabel = null;
            }

            if (ErrorView != null)
            {
                ErrorView.Dispose();
                ErrorView = null;
            }

            if (ProjectTaskClientLabel != null)
            {
                ProjectTaskClientLabel.Dispose();
                ProjectTaskClientLabel = null;
            }

            if (RemainingCharacterCount != null)
            {
                RemainingCharacterCount.Dispose();
                RemainingCharacterCount = null;
            }

            if (ScrollView != null)
            {
                ScrollView.Dispose();
                ScrollView = null;
            }

            if (ScrollViewContent != null)
            {
                ScrollViewContent.Dispose();
                ScrollViewContent = null;
            }

            if (StartDateLabel != null)
            {
                StartDateLabel.Dispose();
                StartDateLabel = null;
            }

            if (StartDateView != null)
            {
                StartDateView.Dispose();
                StartDateView = null;
            }

            if (StartTimeLabel != null)
            {
                StartTimeLabel.Dispose();
                StartTimeLabel = null;
            }

            if (StartTimeView != null)
            {
                StartTimeView.Dispose();
                StartTimeView = null;
            }

            if (StopButton != null)
            {
                StopButton.Dispose();
                StopButton = null;
            }

            if (TagsContainerView != null)
            {
                TagsContainerView.Dispose();
                TagsContainerView = null;
            }

            if (TagsSeparator != null)
            {
                TagsSeparator.Dispose();
                TagsSeparator = null;
            }

            if (TagsTextView != null)
            {
                TagsTextView.Dispose();
                TagsTextView = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (BillableLabel != null)
            {
                BillableLabel.Dispose();
                BillableLabel = null;
            }

            if (StartDateDescriptionLabel != null)
            {
                StartDateDescriptionLabel.Dispose();
                StartDateDescriptionLabel = null;
            }

            if (DurationDescriptionLabel != null)
            {
                DurationDescriptionLabel.Dispose();
                DurationDescriptionLabel = null;
            }

            if (StartDescriptionLabel != null)
            {
                StartDescriptionLabel.Dispose();
                StartDescriptionLabel = null;
            }

            if (EndDescriptionLabel != null)
            {
                EndDescriptionLabel.Dispose();
                EndDescriptionLabel = null;
            }

            if (ErrorMessageTitleLabel != null)
            {
                ErrorMessageTitleLabel.Dispose();
                ErrorMessageTitleLabel = null;
            }

            if (AddProjectTaskLabel != null)
            {
                AddProjectTaskLabel.Dispose();
                AddProjectTaskLabel = null;
            }

            if (CategorizeWithProjectsLabel != null)
            {
                CategorizeWithProjectsLabel.Dispose();
                CategorizeWithProjectsLabel = null;
            }

            if (AddTagsLabel != null)
            {
                AddTagsLabel.Dispose();
                AddTagsLabel = null;
            }
        }
Example #12
0
        void ReleaseDesignerOutlets()
        {
            if (AddProjectAndTaskView != null)
            {
                AddProjectAndTaskView.Dispose();
                AddProjectAndTaskView = null;
            }

            if (AddTagsView != null)
            {
                AddTagsView.Dispose();
                AddTagsView = null;
            }

            if (BillableSwitch != null)
            {
                BillableSwitch.Dispose();
                BillableSwitch = null;
            }

            if (BillableView != null)
            {
                BillableView.Dispose();
                BillableView = null;
            }

            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

            if (ConfirmButton != null)
            {
                ConfirmButton.Dispose();
                ConfirmButton = null;
            }

            if (ConfirmButtonBottomConstraint != null)
            {
                ConfirmButtonBottomConstraint.Dispose();
                ConfirmButtonBottomConstraint = null;
            }

            if (DeleteButton != null)
            {
                DeleteButton.Dispose();
                DeleteButton = null;
            }

            if (DeleteButtonBottomConstraint != null)
            {
                DeleteButtonBottomConstraint.Dispose();
                DeleteButtonBottomConstraint = null;
            }

            if (DescriptionTextView != null)
            {
                DescriptionTextView.Dispose();
                DescriptionTextView = null;
            }

            if (DurationLabel != null)
            {
                DurationLabel.Dispose();
                DurationLabel = null;
            }

            if (DurationView != null)
            {
                DurationView.Dispose();
                DurationView = null;
            }

            if (ProjectTaskClientLabel != null)
            {
                ProjectTaskClientLabel.Dispose();
                ProjectTaskClientLabel = null;
            }

            if (ScrollView != null)
            {
                ScrollView.Dispose();
                ScrollView = null;
            }

            if (ScrollViewContent != null)
            {
                ScrollViewContent.Dispose();
                ScrollViewContent = null;
            }

            if (ErrorMessageLabel != null)
            {
                ErrorMessageLabel.Dispose();
                ErrorMessageLabel = null;
            }

            if (ErrorView != null)
            {
                ErrorView.Dispose();
                ErrorView = null;
            }

            if (StartDateLabel != null)
            {
                StartDateLabel.Dispose();
                StartDateLabel = null;
            }

            if (StartDateView != null)
            {
                StartDateView.Dispose();
                StartDateView = null;
            }

            if (StartTimeLabel != null)
            {
                StartTimeLabel.Dispose();
                StartTimeLabel = null;
            }

            if (StartTimeView != null)
            {
                StartTimeView.Dispose();
                StartTimeView = null;
            }

            if (EndTimeLabel != null)
            {
                EndTimeLabel.Dispose();
                EndTimeLabel = null;
            }

            if (EndTimeView != null)
            {
                EndTimeView.Dispose();
                EndTimeView = null;
            }

            if (StopButton != null)
            {
                StopButton.Dispose();
                StopButton = null;
            }

            if (TagsTextView != null)
            {
                TagsTextView.Dispose();
                TagsTextView = null;
            }
        }