Beispiel #1
0
        void ReleaseDesignerOutlets()
        {
            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

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

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

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

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

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

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

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

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

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

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

            if (TopSeparator != null)
            {
                TopSeparator.Dispose();
                TopSeparator = null;
            }
        }
Beispiel #4
0
        void ReleaseDesignerOutlets()
        {
            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (BottomSeparator != null)
            {
                BottomSeparator.Dispose();
                BottomSeparator = null;
            }
        }
Beispiel #5
0
 void ApplyBottomCellStyle()
 {
     if (HaveFullBottomSeparator)
     {
         BottomSeparator.Hidden = false;
         this.AddConstraints(
             BottomSeparator.AtBottomOf(this),
             BottomSeparator.AtLeftOf(this),
             BottomSeparator.WithSameWidth(this),
             BottomSeparator.Height().EqualTo(_hSeparator));
     }
     else
     {
         BottomSeparator.Hidden = true;
     }
 }
Beispiel #6
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            TitleLabel.Text           = Resources.NewProject;
            NameTextField.Placeholder = Resources.ProjectName;
            ErrorLabel.Text           = Resources.ProjectNameTakenError;
            DoneButton.SetTitle(Resources.Create, UIControlState.Normal);
            ProjectNameUsedErrorTextHeight.Constant = 0;
            PrivateProjectLabel.Text = Resources.PrivateProject;

            // Name
            NameTextField.Rx().Text()
            .Subscribe(ViewModel.Name.Accept)
            .DisposedBy(DisposeBag);

            ViewModel.Name
            .Subscribe(NameTextField.Rx().TextObserver())
            .DisposedBy(DisposeBag);

            // Color
            ColorPickerOpeningView.Rx()
            .BindAction(ViewModel.PickColor)
            .DisposedBy(DisposeBag);

            ViewModel.Color
            .Select(color => color.ToNativeColor())
            .Subscribe(ColorCircleView.Rx().BackgroundColor())
            .DisposedBy(DisposeBag);

            // Error
            ViewModel.Error
            .Subscribe(ErrorLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            ViewModel.Error
            .Select(e => string.IsNullOrEmpty(e) ? new nfloat(0) : errorVisibleHeight)
            .Subscribe(ProjectNameUsedErrorTextHeight.Rx().Constant())
            .DisposedBy(DisposeBag);

            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad)
            {
                ViewModel.Error
                .Select(e => string.IsNullOrEmpty(e) ? desiredIpadHeight : errorVisibleHeight + desiredIpadHeight)
                .Select(h => new CGSize(0, h))
                .Subscribe(this.Rx().PreferredContentSize())
                .DisposedBy(DisposeBag);
            }

            // Workspace
            WorkspaceLabel.Rx()
            .BindAction(ViewModel.PickWorkspace)
            .DisposedBy(DisposeBag);

            ViewModel.WorkspaceName
            .Subscribe(WorkspaceLabel.Rx().Text())
            .DisposedBy(DisposeBag);

            // Client
            ClientLabel.Rx()
            .BindAction(ViewModel.PickClient)
            .DisposedBy(DisposeBag);

            var emptyText = Resources.AddClient.PrependWithAddIcon(ClientLabel.Font.CapHeight);

            ViewModel.ClientName
            .Select(attributedClientName)
            .Subscribe(ClientLabel.Rx().AttributedText())
            .DisposedBy(DisposeBag);

            // Is Private
            PrivateProjectSwitch.Rx().Changed()
            .Select(_ => PrivateProjectSwitch.On)
            .Subscribe(ViewModel.IsPrivate.Accept)
            .DisposedBy(DisposeBag);

            ViewModel.CanCreatePublicProjects
            .Subscribe(PrivateProjectSwitchContainer.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            ViewModel.CanCreatePublicProjects
            .Subscribe(BottomSeparator.Rx().IsVisible())
            .DisposedBy(DisposeBag);

            // Save
            DoneButton.Rx()
            .BindAction(ViewModel.Save)
            .DisposedBy(DisposeBag);

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

            NSAttributedString attributedClientName(string clientName)
            {
                if (string.IsNullOrEmpty(clientName))
                {
                    return(emptyText);
                }

                return(new NSAttributedString(clientName));
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (ActionBar != null)
            {
                ActionBar.Dispose();
                ActionBar = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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