コード例 #1
0
        public AddDataViewModel()
        {
            _mcdaExtension = MCDAExtension.GetExtension();

            _mcdaExtension.AvailableFeatures.CollectionChanged += AvailableFeaturesCollectionChanged;

            Features = new ObservableCollection <Feature>();

            //call because the extension could already have a selected feature and thus fields
            AvailableFeaturesCollectionChanged(this, null);
        }
コード例 #2
0
        public WLCToolViewModel()
        {
            _mcdaExtension = MCDAExtension.GetExtension();

            _wlcTool = ToolFactory.NewWLCTool();

            _wlcResultDataTable = _wlcTool.Data;

            _selectedFeaturePropertyChangedEventHandler = _mcdaExtension.RegisterPropertyHandler(x => x.SelectedFeature, SelectedFeaturePropertyChanged);

            //we have to call our own update method to make sure we have a result column
            SelectedFeaturePropertyChanged(this, null);
        }
コード例 #3
0
        public OWAToolViewModel()
        {
            _mcdaExtension = MCDAExtension.GetExtension();

            _owaTool = ToolFactory.NewOWATool();

            _owaResultDataTable = _owaTool.Data;

            _selectedFeaturePropertyChangedEventHandler = _mcdaExtension.RegisterPropertyHandler(x => x.SelectedFeature, SelectedFeaturePropertyChanged);

            //we have to call our own update method to make sure we have a result column
            SelectedFeaturePropertyChanged(this, null);

            // init stuff for the alpha selection
            // all commands are defined in this class and set here
            _alphaSelectionViewModel.CancelCommand = CancelAlphaSelectionCommand;
            _alphaSelectionViewModel.ApplyCommand  = ApplyAlphaSelectionCommand;
            _alphaSelectionViewModel.OkayCommand   = OkayAlphaSelectionCommand;
        }
コード例 #4
0
        public LWLCToolViewModel()
        {
            _mcdaExtension = MCDAExtension.GetExtension();

            _lwlcTool = ToolFactory.NewLWLCTool();

            _lwlcResultDataTable = _lwlcTool.Data;

            _selectedFeaturePropertyChangedEventHandler = _mcdaExtension.RegisterPropertyHandler(x => x.SelectedFeature, SelectedFeaturePropertyChanged);

            //we have to call our own update method to make sure we have a result column
            SelectedFeaturePropertyChanged(this, null);

            // init stuff for the neighborhood selection
            // all commands are defined in this class and set here
            _neighborhoodSelectionViewModel.OkayCommand   = OkayNeighborhoodSelectionCommand;
            _neighborhoodSelectionViewModel.CancelCommand = CancelNeighborhoodSelectionCommand;
            _neighborhoodSelectionViewModel.ApplyCommand  = ApplyNeighborhoodSelectionCommand;

            _neighborhoodSelectionViewModel.SelectedNumberOfKNearestNeighbors             = 3;
            _neighborhoodSelectionViewModel.SelectedNumberOfKNearestNeighborsForAutomatic = 3;
        }