Exemplo n.º 1
0
        //从UID得到快捷名字
        public static string GetShortNameFromKey(string sKey, ClsEditorMain clsEditorMain)
        {
            string  sXPath  = "//*[@Key='" + sKey + "']";
            XmlNode nodeXml = clsEditorMain.docEditCmdCollectionXml.SelectSingleNode(sXPath);

            if (nodeXml == null)
            {
                return("");
            }
            return(nodeXml.Attributes["ShortName"].Value);
        }
Exemplo n.º 2
0
        public override void OnClick()
        {
            Plugin.Application.IAppFormRef pAppFormRef = myHook as Plugin.Application.IAppFormRef;
            IToolbarControl pTC   = new ToolbarControlClass();
            ClsEditorMain   clsEM = new ClsEditorMain(pTC, myHook.ArcGisMapControl, pAppFormRef.MainForm);
            IHookHelper     pHH   = new HookHelperClass();

            pHH.Hook         = myHook.ArcGisMapControl.Object;
            clsEM.HookHelper = pHH;
            frmEditSnapAttri fmESA = new frmEditSnapAttri(clsEM);

            fmESA.ShowDialog(pAppFormRef.MainForm);
            ICommand createPolygon = new CreatePolygonTool();

            (createPolygon as CreatePolygonTool).setClsEditorMain(clsEM);
            createPolygon.OnCreate(myHook.ArcGisMapControl.Object);
            createPolygon.OnClick();
            myHook.ArcGisMapControl.CurrentTool = createPolygon as ITool;
        }
Exemplo n.º 3
0
 public void setClsEditorMain(ClsEditorMain clsEditorMain)
 {
     this.m_clsEditorMain = clsEditorMain;
 }
Exemplo n.º 4
0
 public frmEditSnapAttri(ClsEditorMain _clsEditorMain)
 {
     clsEditorMain = _clsEditorMain;
     InitializeComponent();
 }
Exemplo n.º 5
0
        //根据条件得到Tool操作分解得步骤
        public static bool GetToolStepInfo(string sToolShortName, string sCondition, ref string sIputType,
                                           ref string sInputTips, ref string sKeyWords, ClsEditorMain clsEditorMain)
        {
            ////sUserInput为用户的输入串,要检测该串是否是合法的命令名称,如果是则返回该命令的UID,否则返回空
            //string sXPath = "//*[@ShortName='" + sToolShortName.ToUpper () + "']";
            //XmlNode nodeXml = clsEditorMain.docEditCmdCollectionXml.SelectSingleNode ( sXPath );
            //if ( nodeXml == null ) return false;
            //if ( nodeXml.Name != "Tool" && nodeXml.Name != "Command" ) return false;

            //sXPath = ".//*[@conditons='" + sCondition + "']";
            //XmlNode nodeChildXml = nodeXml.SelectSingleNode ( sXPath );
            //if ( nodeChildXml == null ) return false;

            //sIputType = nodeChildXml.Attributes["Type"].Value;
            //sInputTips = nodeChildXml.Attributes["Text"].Value;
            //sKeyWords = nodeChildXml.Attributes["Keyword"].Value;

            return(true);
        }
Exemplo n.º 6
0
 public DrawVertex(IMap pMap, ClsEditorMain _clsEditorMain)
 {
     clsEditorMain = _clsEditorMain;
     m_pMap        = pMap;
     m_pAV         = m_pMap as IActiveView;
 }
Exemplo n.º 7
0
 public void setClsEditorMain(ClsEditorMain _clsEditorMain)
 {
     clsEditorMain = _clsEditorMain;
 }