예제 #1
0
        protected override void UpdateDrag()
        {
            if (!_isUpdateAllowed)
            {
                return;
            }

            _owaTool.Run();
            _owaResultDataTable = _owaTool.Data;

            if (_isSendToInMemoryWorkspaceCommand)
            {
                _mcdaExtension.JoinToolResultByOID(_owaTool, _owaTool.Data);
            }

            _isUpdateAllowed = false;
        }
예제 #2
0
        private void SelectedFeaturePropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (_isLocked)
            {
                return;
            }

            _owaTool = ToolFactory.NewOWATool();

            _toolParameter = new BindingList <IToolParameter>(_owaTool.ToolParameterContainer.ToolParameter);

            if (_selectedFeature != null)
            {
                foreach (var currentField in _selectedFeature.Fields)
                {
                    currentField.UnRegisterPropertyHandler(_listOfpropertyChangedEventHandlersForFieldIsSelected);
                }
            }

            _selectedFeature = _mcdaExtension.SelectedFeature;

            if (_selectedFeature != null)
            {
                foreach (var currentField in _selectedFeature.Fields)
                {
                    _listOfpropertyChangedEventHandlersForFieldIsSelected.Add(
                        currentField.RegisterPropertyHandler(f => f.IsSelected, FieldPropertyChanged));
                }

                if (_selectedFeature.Fields.Count(f => f.IsSelected) >= 1)
                {
                    _owaTool.Run();
                    _owaResultDataTable = _owaTool.Data;
                }
            }

            RegisterToolParameterEvents();

            PropertyChanged.Notify(() => OWAParameter);
            PropertyChanged.Notify(() => OWAResult);

            CommandManager.InvalidateRequerySuggested();
        }
예제 #3
0
        private void FieldPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (_isLocked)
            {
                return;
            }

            _owaTool = ToolFactory.NewOWATool();

            _toolParameter = new BindingList <IToolParameter>(_owaTool.ToolParameterContainer.ToolParameter);

            if (_selectedFeature.Fields.Count(f => f.IsSelected) >= 1)
            {
                _owaTool.Run();
                _owaResultDataTable = _owaTool.Data;
            }

            RegisterToolParameterEvents();

            PropertyChanged.Notify(() => OWAParameter);
            PropertyChanged.Notify(() => OWAResult);

            CommandManager.InvalidateRequerySuggested();
        }