Exemple #1
0
 public void RestoreBeforeExit()
 {
     // _attributeViewModel is set to null after this, so no need to restore its settings
     SketchType = SketchGeometryType.Rectangle;
     if (_attributeViewModel != null)
     {
         _attributeViewModel.PickControlButtonClicked   -= SwitchToPointSketch;
         _attributeViewModel.ShiftAndScaleButtonClicked -= ShiftAndScaleFeatures;
         _attributeViewModel = null;
     }
 }
Exemple #2
0
        /// <summary>
        /// prepares the content for the embeddable control when this tool is activated (i.e. when this tool is clicked). This is the ENTRY POINT!
        /// </summary>
        protected override Task OnToolActivateAsync(bool active)
        {
            if (_attributeViewModel == null)
            {
                _attributeViewModel = this.EmbeddableControl as AttributeControlViewModel;
                _attributeViewModel.PickControlButtonClicked   += SwitchToPointSketch;
                _attributeViewModel.ShiftAndScaleButtonClicked += ShiftAndScaleFeatures;
            }

            _attributeViewModel.UserPromptText          = "Make a selection";
            _attributeViewModel.HasUserSelectedFeatures = false;

            return(base.OnToolActivateAsync(active));
        }
 public AttributeControlView()
 {
     InitializeComponent();
     _viewModel = this.DataContext as AttributeControlViewModel;
 }