예제 #1
0
        public MapListener(TableEditorPlugin plugin, TableEditorPresenter presenter)
        {
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }

            _presenter = presenter;

            plugin.SelectionChanged += SelectionChanged;

            plugin.LayerFeatureCountChanged += OnLayerFeatureCountChanged;
        }
예제 #2
0
        public ProjectListener(IAppContext context, TableEditorPlugin plugin, TableEditorPresenter presenter)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }

            _context   = context;
            _presenter = presenter;

            plugin.BeforeRemoveLayer   += BeforeRemoveLayer;
            plugin.UpdateTableJoin     += OnUpdateTableJoin;
            plugin.LayerRemoved        += plugin_LayerRemoved;
            plugin.ProjectClosed       += OnProjectClosed;
            plugin.LayerEditingChanged += OnLayerEditingChanged;
        }