public TabBaseViewModel() { //properties LineType = LineTypes.Geodesic; LineDistanceType = DistanceTypes.Meters; //commands SaveAsCommand = new RelayCommand(OnSaveAs); ClearGraphicsCommand = new RelayCommand(OnClearGraphics); ActivateToolCommand = new RelayCommand(OnActivateTool); EnterKeyCommand = new RelayCommand(OnEnterKeyCommand); EditPropertiesDialogCommand = new RelayCommand(OnEditPropertiesDialogCommand); // Mediator Mediator.Register(Constants.NEW_MAP_POINT, OnNewMapPointEvent); Mediator.Register(Constants.MOUSE_MOVE_POINT, OnMouseMoveEvent); Mediator.Register(Constants.TAB_ITEM_SELECTED, OnTabItemSelected); configObserver = new PropertyObserver<DistanceAndDirectionConfig>(DistanceAndDirectionConfig.AddInConfig) .RegisterHandler(n => n.DisplayCoordinateType, n => { RaisePropertyChanged(() => Point1Formatted); RaisePropertyChanged(() => Point2Formatted); }); }
public ProTabBaseViewModel() { //properties LineType = LineTypes.Geodesic; LineDistanceType = DistanceTypes.Meters; //commands SaveAsCommand = new ArcGIS.Desktop.Framework.RelayCommand(() => OnSaveAs()); ClearGraphicsCommand = new ArcGIS.Desktop.Framework.RelayCommand(() => OnClearGraphics()); //ActivateToolCommand = new RelayCommand(OnActivateTool); EnterKeyCommand = new DistanceAndDirectionLibrary.Helpers.RelayCommand(OnEnterKeyCommand); EditPropertiesDialogCommand = new ArcGIS.Desktop.Framework.RelayCommand(() => OnEditPropertiesDialog()); // Mediator Mediator.Register(DistanceAndDirectionLibrary.Constants.NEW_MAP_POINT, OnNewMapPointEvent); Mediator.Register(DistanceAndDirectionLibrary.Constants.MOUSE_MOVE_POINT, OnMouseMoveEvent); Mediator.Register(DistanceAndDirectionLibrary.Constants.TAB_ITEM_SELECTED, OnTabItemSelected); configObserver = new PropertyObserver <DistanceAndDirectionConfig>(DistanceAndDirectionConfig.AddInConfig) .RegisterHandler(n => n.DisplayCoordinateType, n => { RaisePropertyChanged(() => Point1Formatted); RaisePropertyChanged(() => Point2Formatted); }); }
public EditPropertiesViewModel() { SelectedCoordinateType = DistanceAndDirectionConfig.AddInConfig.DisplayCoordinateType; OKButtonPressedCommand = new RelayCommand(OnOkButtonPressedCommand); }