Exemplo n.º 1
0
        public MainViewModel()
        {
            Config.Instance.PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == "UUID")
                {
                    EmitPropertyChanged("DataReport");
                }

                if (e.PropertyName == "Language")
                {
                    var ne = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);
                    Regions.EmitCollectionChanged(ne);
                    Fates.EmitCollectionChanged(ne);
                    Templates.EmitCollectionChanged(ne);
                }
            };

            Data.Instance.DataLoaded += (sender, e) =>
            {
                Templates = new ListBindingTarget <Models.Template>(Data.Instance.Templates);
                EmitPropertyChanged("World");
            };

            Network.State.Instance.PropertyChanged += (sender, e) =>
            {
                if (e.PropertyName == "WorldId")
                {
                    EmitPropertyChanged("World");
                }
            };
        }