Esempio n. 1
0
        public override void OnClick()
        {
            Plugin.Application.IAppGisUpdateRef phook = _AppHk as Plugin.Application.IAppGisUpdateRef;
            SysCommon.BottomQueryBar            pBar  = phook.QueryBar;
            if (pBar.m_WorkSpace == null)
            {
                pBar.m_WorkSpace = Plugin.ModuleCommon.TmpWorkSpace;
            }
            if (pBar.ListDataNodeKeys == null)
            {
                pBar.ListDataNodeKeys = Plugin.ModuleCommon.ListUserdataPriID;
            }
            ImportPolygonQueryToolClass pTool = _cmd as ImportPolygonQueryToolClass;

            pTool.GetQueryBar(pBar);
            _cmd.OnClick();
            //if (_AppHk.CurrentControl is IMapControl2)
            //{
            //    _AppHk.MapControl.CurrentTool = _tool;
            //}
            //else
            //{
            //    _AppHk.PageLayoutControl.CurrentTool = _tool;
            //}

            _AppHk.CurrentTool = this.Name;
        }
Esempio n. 2
0
        public override void OnCreate(Plugin.Application.IApplicationRef hook)
        {
            if (hook == null)
            {
                return;
            }
            _AppHk = hook as Plugin.Application.IAppArcGISRef;

            Plugin.Application.IAppFormRef pAppForm = hook as Plugin.Application.IAppFormRef;
            _tool = new ImportPolygonQueryToolClass(pAppForm.MainForm, _AppHk.MapControl.Map);
            ImportPolygonQueryToolClass tempTool = _tool as ImportPolygonQueryToolClass;

            tempTool.WriteLog = this.WriteLog;
            _cmd = tempTool as ICommand;
            _cmd.OnCreate(_AppHk.MapControl);
        }