Exemplo n.º 1
0
        private void UpdateWeatherUI()
        {
            WeekDayLabel.Text      = dayViewViewModel.Date;
            TimeLabel.Text         = dayViewViewModel.Time;
            TimezoneInfoLabel.Text = dayViewViewModel.TimezoneInfo;
            Temp1Label.Text        = dayViewViewModel.Temperature;
            Humid1Label.Text       = dayViewViewModel.Humidity;
            Speed1Label.Text       = dayViewViewModel.WindSpeed;
            SummaryLabel.Text      = dayViewViewModel.Summary;
            IconImage.Image        = dayViewViewModel.Image;
            CurrentLocationButton.SetTitle(dayViewViewModel.CurrentLocation, UIControlState.Normal);

            Debug.WriteLine("RootViewController: Weather data UI updated.");
            Debug.WriteLine("Weather Time: {0}, Timezone: {1}, UnixTime: {2}",
                            dayViewViewModel.Time, dayViewViewModel.TimeZone, dayViewViewModel.UnixTime);
            Debug.WriteLine(String.Format("(Weather Timezone Time: {0})", dayViewViewModel.TimezoneTime));

            //update cached Weather Day Data array
            if (weekViewViewModel.NumberOfDays > 0)
            {
                // update table view
                WeekTableView.Source = new RootTableSource(weatherDayDataArray);
                WeekTableView.ReloadData();
                ScrollToRow(0, 0, false);
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (CurrentLocationButton != null)
            {
                CurrentLocationButton.Dispose();
                CurrentLocationButton = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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