示例#1
0
 public void UpdateChildListeners_weatherViewModels_current_item(global::MyWeather.Models.CurrentWeatherItem obj)
 {
     if (obj != cache_weatherViewModels_current_item)
     {
         if (cache_weatherViewModels_current_item != null)
         {
             ((global::System.ComponentModel.INotifyPropertyChanged)cache_weatherViewModels_current_item).PropertyChanged -= PropertyChanged_weatherViewModels_current_item;
             cache_weatherViewModels_current_item = null;
         }
         if (obj != null)
         {
             cache_weatherViewModels_current_item = obj;
             ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_weatherViewModels_current_item;
         }
     }
 }
示例#2
0
 private void Update_weatherViewModels_current_item(global::MyWeather.Models.CurrentWeatherItem obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_weatherViewModels_current_item(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_weatherViewModels_current_item_Area(obj.Area, phase);
             this.Update_weatherViewModels_current_item_Weather_pic(obj.Weather_pic, phase);
             this.Update_weatherViewModels_current_item_Temperature(obj.Temperature, phase);
             this.Update_weatherViewModels_current_item_Weather(obj.Weather, phase);
             this.Update_weatherViewModels_current_item_Temperature_time(obj.Temperature_time, phase);
             this.Update_weatherViewModels_current_item_Api(obj.Api, phase);
             this.Update_weatherViewModels_current_item_Wind(obj.Wind, phase);
             this.Update_weatherViewModels_current_item_Sd(obj.Sd, phase);
         }
     }
 }
示例#3
0
                public void PropertyChanged_weatherViewModels_current_item(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    MainPage_obj1_Bindings bindings;

                    if (WeakRefToBindingObj.TryGetTarget(out bindings))
                    {
                        string propName = e.PropertyName;
                        global::MyWeather.Models.CurrentWeatherItem obj = sender as global::MyWeather.Models.CurrentWeatherItem;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_weatherViewModels_current_item_Area(obj.Area, DATA_CHANGED);
                                bindings.Update_weatherViewModels_current_item_Weather_pic(obj.Weather_pic, DATA_CHANGED);
                                bindings.Update_weatherViewModels_current_item_Temperature(obj.Temperature, DATA_CHANGED);
                                bindings.Update_weatherViewModels_current_item_Weather(obj.Weather, DATA_CHANGED);
                                bindings.Update_weatherViewModels_current_item_Temperature_time(obj.Temperature_time, DATA_CHANGED);
                                bindings.Update_weatherViewModels_current_item_Api(obj.Api, DATA_CHANGED);
                                bindings.Update_weatherViewModels_current_item_Wind(obj.Wind, DATA_CHANGED);
                                bindings.Update_weatherViewModels_current_item_Sd(obj.Sd, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "Area":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_weatherViewModels_current_item_Area(obj.Area, DATA_CHANGED);
                                }
                                break;
                            }

                            case "Weather_pic":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_weatherViewModels_current_item_Weather_pic(obj.Weather_pic, DATA_CHANGED);
                                }
                                break;
                            }

                            case "Temperature":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_weatherViewModels_current_item_Temperature(obj.Temperature, DATA_CHANGED);
                                }
                                break;
                            }

                            case "Weather":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_weatherViewModels_current_item_Weather(obj.Weather, DATA_CHANGED);
                                }
                                break;
                            }

                            case "Temperature_time":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_weatherViewModels_current_item_Temperature_time(obj.Temperature_time, DATA_CHANGED);
                                }
                                break;
                            }

                            case "Api":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_weatherViewModels_current_item_Api(obj.Api, DATA_CHANGED);
                                }
                                break;
                            }

                            case "Wind":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_weatherViewModels_current_item_Wind(obj.Wind, DATA_CHANGED);
                                }
                                break;
                            }

                            case "Sd":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_weatherViewModels_current_item_Sd(obj.Sd, DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                    }
                }