Пример #1
0
        private void UpdateViewState(bool animated)
        {
            switch (CurrentMode)
            {
            case OrgEventViewMode.Combo:
                _modeButton.Hidden        = false;
                _modeButton.VerticalIcon  = ThemeIcons.List;
                _modeButton.LandscapeIcon = ThemeIcons.ListLandscape;
                _modeButton.UpdateState();

                MapFullscreenButton.VerticalIcon  = ThemeIcons.Fullscreen;
                MapFullscreenButton.LandscapeIcon = ThemeIcons.FullscreenLandscape;
                MapFullscreenButton.UpdateState();

                VenuesAndShowsTableView.Hidden = false;
                MapPanel.Hidden = false;
                MapFullscreenButton.SetHidden(false, animated);
                ListSettingsView.Hidden       = true;
                _scrollToHideManager.IsActive = false;
                InitializeMapView();
                break;

            case OrgEventViewMode.Map:
                _modeButton.Hidden        = false;
                _modeButton.VerticalIcon  = ThemeIcons.List;
                _modeButton.LandscapeIcon = ThemeIcons.ListLandscape;
                _modeButton.UpdateState();

                MapFullscreenButton.VerticalIcon  = ThemeIcons.ExitFullscreen;
                MapFullscreenButton.LandscapeIcon = ThemeIcons.ExitFullscreenLandscape;
                MapFullscreenButton.UpdateState();

                VenuesAndShowsTableView.SetHidden(true, animated);
                MapPanel.Hidden = false;
                MapFullscreenButton.SetHidden(false, animated);
                ListSettingsView.Hidden       = true;
                _scrollToHideManager.IsActive = false;
                InitializeMapView();
                break;

            case OrgEventViewMode.List:
                _modeButton.Hidden        = !HasData;
                _modeButton.VerticalIcon  = ThemeIcons.Map;
                _modeButton.LandscapeIcon = ThemeIcons.MapLandscape;
                _modeButton.UpdateState();

                if (HasData)
                {
                    VenuesAndShowsTableView.Hidden = false;
                }

                MapPanel.SetHidden(true, animated);
                MapFullscreenButton.SetHidden(true, animated);
                var listSettingsHidden = !HasData || IsInSearch;
                ListSettingsView.SetHidden(listSettingsHidden, animated && !listSettingsHidden);
                _scrollToHideManager.IsActive = !IsInSearch && HasData;
                break;
            }

            UpdateNavBarState(animated);
            UpdateNavBarItemsState();
            UpdateDayButtonState();
            UpdateTableViewInset();
            UpdateViewConstraints(animated);
            UpdateSearchTableViewState();
            UpdateFavoritesUnavailableState();

            SearchBar.Hidden = !HasData;
            SearchTableView.SetHidden(!IsInSearch, animated);
            SearchTableView.ScrollsToTop          = IsInSearch;
            VenuesAndShowsTableView.ScrollsToTop  = !IsInSearch;
            VenuesAndShowsTableView.ScrollEnabled = !IsInSearch;
            View.BackgroundColor = IsInSearch
                ? ThemeColors.PanelBackground
                : ThemeColors.ContentLightBackground;

            SetNeedStatusBarUpdate(animated);
        }
Пример #2
0
        void ReleaseDesignerOutlets()
        {
            if (ProgressView != null)
            {
                ProgressView.Dispose();
                ProgressView = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (VenuesMapView != null)
            {
                VenuesMapView.Dispose();
                VenuesMapView = null;
            }
        }
Пример #3
0
 private void DisposeListSettingsView()
 {
     ListSettingsView.SortByCommand            = null;
     ListSettingsView.ShowOnlyFavoritesCommand = null;
     ListSettingsView.Dispose();
 }