示例#1
0
                public void PropertyChanged_ViewModel(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    SettingsPage_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::App1.ViewModels.SettingsViewModel obj = sender as global::App1.ViewModels.SettingsViewModel;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_ViewModel_VersionDescription(obj.VersionDescription, DATA_CHANGED);
                                bindings.Update_ViewModel_ElementTheme(obj.ElementTheme, DATA_CHANGED);
                                bindings.Update_ViewModel_ForecastProvider(obj.ForecastProvider, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "VersionDescription":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_ViewModel_VersionDescription(obj.VersionDescription, DATA_CHANGED);
                                }
                                break;
                            }

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

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

                            default:
                                break;
                            }
                        }
                    }
                }