Пример #1
0
        public DockPanelService(IAppContext context, IdentifierPresenter presenter, IdentifierPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }

            var panels = context.DockPanels;

            panels.Lock();
            var panel = panels.Add(presenter.GetInternalObject(), DockPanelKeys.Identifier, plugin.Identity);

            panel.Caption = "Identifier";
            panel.SetIcon(Resources.ico_identify);

            var preview = panels.Preview;

            if (preview != null && preview.Visible)
            {
                panel.DockTo(preview, DockPanelState.Tabbed, 150);
            }

            panels.Unlock();
        }
Пример #2
0
        public MapListener(IAppContext context, IdentifierPlugin plugin, IdentifierPresenter identifierPresenter,
                           IConfigService configService)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (identifierPresenter == null)
            {
                throw new ArgumentNullException("identifierPresenter");
            }
            if (configService == null)
            {
                throw new ArgumentNullException("configService");
            }

            _context             = context;
            _identifierPresenter = identifierPresenter;
            _configService       = configService;

            plugin.ShapeIdentified += plugin_ShapeIdentified;
            plugin.ProjectClosed   += plugin_ProjectClosed;
            plugin.LayerRemoved    += plugin_LayerRemoved;
            plugin.MouseMove       += plugin_MouseMove;
        }
Пример #3
0
 public CmdSelectByGraphics(IAppContext context, BasePlugin plugin)
 {
     this.m_bitmap   = Properties.Resources.icon_select_graphic;
     this.m_caption  = "用图形选择";
     this.m_category = "Query";
     this.m_message  = "用图形选择";
     this.m_name     = "Query_SelectionTools_Mouse_SelectByGraphics";
     this._key       = "Query_SelectionTools_Mouse_SelectByGraphics";
     this.m_toolTip  = "用图形选择";
     _context        = context;
     _plugin         = plugin as IdentifierPlugin;
 }
Пример #4
0
        public MenuListener(IAppContext context, IdentifierPlugin plugin) :
            base(context, plugin.Identity)
        {
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            _plugin = plugin;

            plugin.ItemClicked  += plugin_ItemClicked;
            plugin.ViewUpdating += ViewUpdating;
        }
Пример #5
0
 public CmdSelectAll(IAppContext context, BasePlugin plugin)
 {
     this.m_bitmap                    = Properties.Resources.icon_select_all;
     this.m_caption                   = "全部选择";
     this.m_category                  = "Query";
     this.m_message                   = "全部选择";
     this.m_name                      = "Query_SelectionTools_SelectAll";
     this._key                        = "Query_SelectionTools_SelectAll";
     this.m_toolTip                   = "全部选择";
     _context                         = context;
     base.DisplayStyleYT              = DisplayStyleYT.ImageAndText;
     base.TextImageRelationYT         = TextImageRelationYT.ImageAboveText;
     base.ToolStripItemImageScalingYT = ToolStripItemImageScalingYT.None;
     _plugin = plugin as IdentifierPlugin;
 }
Пример #6
0
        public MenuGenerator(IAppContext context, IdentifierPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            // if (pluginManager == null) throw new ArgumentNullException("pluginManager");

            _plugin  = plugin;
            _context = context;

            _menuManager     = _context.MainView.RibbonManager;
            _commands        = new YutaiCommands(_context, plugin.Identity);
            _commands.Plugin = plugin;
            InitMenus();
        }
Пример #7
0
        public MenuGenerator(IAppContext context, IdentifierPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }

            _commands = new MenuCommands(plugin.Identity);
            _context  = context;

            InitToolbar(context);
        }
Пример #8
0
        public IdentifierPresenter(IAppContext context, IIdentifierView view, IdentifierPlugin plugin)
            : base(view)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            _context = context;
            _map     = _context.MapControl.Map;
            _plugin  = plugin;

            view.ModeChanged         += OnIdentifierModeChanged;
            view.ItemSelected        += OnItemSelected;
            _plugin.MapIdentifying   += PluginOnMapIdentifying;
            _plugin.UnMapIdentify    += PluginOnUnMapIdentify;
            _plugin.StartMapIdentify += PluginOnStartMapIdentify;
        }
Пример #9
0
        public DockPanelService(IAppContext context, IdentifierPresenter presenter, IdentifierPlugin plugin)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            _context   = context;
            _presenter = presenter;
            _plugin    = plugin;
            var panels = context.DockPanels;

            //panels.Lock();
            //var panel = panels.Add(presenter.GetInternalObject() as IDockPanelView,  plugin.Identity);
            //panels.Unlock();
        }
Пример #10
0
 public CmdSetCurrentLayer(IAppContext context, BasePlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin as IdentifierPlugin;
 }
Пример #11
0
 public CmdViewIdentifier(IAppContext context, IdentifierPlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin;
 }
Пример #12
0
 public CmdSetSelectRelation(IAppContext context, BasePlugin plugin)
 {
     OnCreate(context);
     _plugin = plugin as IdentifierPlugin;
 }