public MenuUpdater(IAppContext context, ShapeEditor plugin, IGeoprocessingService geoprocessingService) : base(context, plugin.Identity) { if (plugin == null) { throw new ArgumentNullException("plugin"); } _plugin = plugin; _geoprocessingService = geoprocessingService; plugin.ViewUpdating += OnViewUpdating; plugin.MapCursorChanged += OnMapCursorChanged; plugin.HistoryChanged += (s, e) => { OnViewUpdating(null, null); // we need to trigger the update of status bar _context.View.Update(); }; var item = FindMenuItem(MenuKeys.MainMenuEditKey) as IDropDownMenuItem; if (item != null) { item.DropDownOpening += MenuDropDownOpening; item.DropDownClosed += MenuDropDownClosed; } }
public MenuListener(IAppContext context, ShapeEditor plugin, ILayerEditingService layerService, IGeoprocessingService geoprocessingService) { _plugin = plugin ?? throw new ArgumentNullException("plugin"); _layerService = layerService ?? throw new ArgumentNullException("layerService"); _geoprocessingService = geoprocessingService ?? throw new ArgumentNullException("geoprocessingService"); _context = context ?? throw new ArgumentNullException("context"); plugin.ItemClicked += Plugin_ItemClicked; }
public CopyOperation(IMuteMap map, IGeoprocessingService geoService) { if (map == null) { throw new ArgumentNullException("map"); } if (geoService == null) { throw new ArgumentNullException("geoService"); } _map = map; _geoService = geoService; }
public ContextMenuPresenter(IAppContext context, ILayerService layerService, IGeoprocessingService geoService, ContextMenuView view) : base(view) { if (context == null) { throw new ArgumentNullException("context"); } if (layerService == null) { throw new ArgumentNullException("layerService"); } if (geoService == null) { throw new ArgumentNullException("geoService"); } _context = context; _layerService = layerService; _geoService = geoService; }
public MenuListener(IAppContext context, ShapeEditor plugin, ILayerEditingService layerService, IGeoprocessingService geoprocessingService) { if (context == null) { throw new ArgumentNullException("context"); } if (layerService == null) { throw new ArgumentNullException("layerService"); } if (geoprocessingService == null) { throw new ArgumentNullException("geoprocessingService"); } _layerService = layerService; _geoprocessingService = geoprocessingService; _context = context; plugin.ItemClicked += Plugin_ItemClicked; }
public ContextMenuView(IAppContext context, IGeoprocessingService geoService) { if (context == null) { throw new ArgumentNullException("context"); } if (geoService == null) { throw new ArgumentNullException("geoService"); } _context = context; _geoService = geoService; InitializeComponent(); contextDigitizing.Opening += DigitizingMenuOpening; contextSelection.Opening += SelectionMenuOpening; contextVertex.Opening += VertexMenuOpening; }