惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
T
The Blog of Author Tim Ferriss
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
量子位
I
InfoQ
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
H
Help Net Security
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
J
Java Code Geeks
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
V
V2EX
腾讯CDC
P
Proofpoint News Feed
A
About on SuperTechFans
爱范儿
爱范儿
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI

博客园 - fatrick

媒体网关在OCS系统架构中的作用 图文详解配置ocs边缘服务器 实战部署UC平台(OCS VOIP GW and Exchange 2007) OCS服务器Ports and Protocols OCS发待办事宜 ActiveDirectory获取用户 增强SEO的div+css命名规则 WEB网站大数据量的性能解决方案 Mapxtreme2005 两点之间画直线 mapxtreme2005 创建各种样式 MapxTreme2005 画扇区 MapXtreme 2005 基础代码 MapXtreme创建本地TAB文件 - fatrick - 博客园 如何在DataGrid里面产生滚动条 [转载]关于项目管理的一点体会 [IE&FireFox兼容]JS对select操作 个人网站建设八部曲 帮助解决网页和JS文件中的中文编码问题的小工具 FLV Player下载
mapxtreme2005 改变选中的图元样式
fatrick · 2008-06-18 · via 博客园 - fatrick

MapInfo.Styles.CompositeStyle compositeStyle = GetOpaquesStyle(false, System.Drawing.Color.Blue);

            if (map != null)
            {
                if (map.Layers[SysCommon.TempTableAlias] != null)
                {
                    map.Layers.Remove(SysCommon.TempTableAlias);
                }
                if (map.Layers[SysCommon.TempLayerAlias] != null)
                {
                    map.Layers.Remove(SysCommon.TempLayerAlias);
                }
            }
            MapInfo.Engine.Session.Current.Catalog.CloseTable(SysCommon.TempTableAlias);

            MapInfo.Data.Table newtable = CreateCustomerTempTable(SysCommon.TempTableAlias, LayerAlias);
            MapInfo.Data.MIConnection conn = new MIConnection();
            conn.Open();
            MapInfo.Data.MICommand comm = conn.CreateCommand();
            comm.CommandText = "delete " + SysCommon.TempTableAlias;
            comm.Prepare();
            comm.ExecuteNonQuery();

            foreach (Feature ftr in irfc)
            {
                comm.CommandText = "insert into " + newtable.Alias + " select * from " + LayerAlias + " where MI_Key ='" + ftr.Key + "'";              
                comm.ExecuteNonQuery();              
            }                 
            conn.Close();
            (map.Layers[SysCommon.TempTableAlias] as FeatureLayer).Modifiers.Clear();
            MapInfo.Mapping.FeatureOverrideStyleModifier fsmtemp = new MapInfo.Mapping.FeatureOverrideStyleModifier(null, compositeStyle);
            (map.Layers[SysCommon.TempTableAlias] as FeatureLayer).Modifiers.Append(fsmtemp);