示例#1
0
        /// <summary>
        /// 添加新的工具到组中
        /// </summary>
        /// <param name="item">需要添加的工具</param>
        public void Add(IGisTool item)
        {
            GisTool tool = item as GisTool;

            if (tool == null)
            {
                throw new InvalidCastException("Gis工具类必须通过调用GisTool.CreateTool来创建");
            }
            m_nodes.Add(tool.Node);
        }
示例#2
0
        /// <summary>
        /// 创建一个Gistool类的新实例
        /// </summary>
        public IGisTool CreateTool(string name, string key)
        {
            GisTool tool = new GisTool(name, key, "");

            return(tool);
        }