示例#1
0
        public FlowDeviationViewModel(Action <NavigationViewModel> navigate, NavigationViewModel back)
            : base(navigate, back)
        {
            EditorCommand = new RelayCommand(Editor);
            RemoveCommand = new RelayCommand(Remove);
            ImportCommand = new RelayCommand(Import);
            ExportCommand = new RelayCommand(Export);

            FlowDeviation.Stations.CollectionChanged += async(sender, args) => await BasinMapViewModel.Refresh();
        }
        public SpatialUnitsViewModel(EcosystemServicesIndicator esi, Action <NavigationViewModel> navigate, NavigationViewModel back)
            : base(navigate, back)
        {
            Indicator     = esi;
            EditorCommand = new RelayCommand(Editor);
            RemoveCommand = new RelayCommand(Remove);
            ImportCommand = new RelayCommand(Import);
            ExportCommand = new RelayCommand(Export);

            Indicator.SpatialUnits.CollectionChanged +=
                (sender, args) =>
            {
                RaisePropertyChanged(nameof(CanChangeConfidence));
                Task.Factory.StartNew(() => { Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.DataBind, (Action)(async() => await BasinMapViewModel.Refresh())); });
            };
        }
        public WaterQualitySummaryViewModel(Action <NavigationViewModel> navigate, NavigationViewModel back)
            : base(navigate, back)
        {
            _navigate = navigate;

            EditorCommand = new RelayCommand(Editor);
            ImportCommand = new RelayCommand(Import);
            ExportCommand = new RelayCommand(Export);

            Indicator.Gauges.CollectionChanged += (sender, args) => Task.Factory.StartNew(() => { Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.DataBind, (Action)(async() => await BasinMapViewModel.Refresh())); });
        }