Soqq自定义皮肤图片图片

CRichEditView或CRichEditCtrl设置自定义背景图片的方法
[问题点数:0分,结帖人conanwj]
CRichEditView或CRichEditCtrl设置自定义背景图片的方法
[问题点数:0分,结帖人conanwj]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
相关帖子推荐:
本帖子已过去太久远了,不再提供回复功能。SuperMap IS DOT NET FAQ-特别应用-自定义引擎实现外挂属性专题图
自定义引擎实现外挂属性专题图
问:前提说明
答:开发环境 is .net 5.0.2请先在自定义引擎开发文档里了解is .net 5 的引擎开发方式。在调好引擎开发环境后做下面工作。目前object支持单值和范围分段专题图的外挂属性
答:由于5.0.2还不能在服务器上自动保存CustomParam,所以需要事先设置提交参数,用hashtable保存。而在做其它生成图片前,取一下用户设置的参数,做相应操作。客户端测试代码MapParam mp = MapControl1.GetCurrentMapParam();mp.CustomParams = string.EMapControl1.CustomInvoke(mp);服务器端改写的代码private System.Collections.Hashtable m_mp = new System.Collections.Hashtable();public override MapImage CustomInvoke(MapParam mapParam){
if(!m_mp.ContainsKey(mapParam.UserToken.UserID))
& m_mp.Add(mapParam.UserToken.UserID,mapParam.CustomParams);
return base.CustomInvoke (mapParam);}protected override MapImage HandleBeforeCommand(ref MapParam mapParam, ref bool bCancel)//出图前做的事情{
if(m_mp.ContainsKey(mapParam.UserToken.UserID))
& SetMap(m_mp[mapParam.UserToken.UserID].ToString());
return base.HandleBeforeCommand (ref mapParam, ref bCancel);}private void SetMap(string str){//这里可以调用引擎里的supermap做相应的事了//this.m_axSuperMap &
& //this.m_axSuperWorkspace}把这些先调通再做下面的做专题图操作。
问:实现外挂属性表,首先要知道object是如何外挂属性表的。
答:可以用object示例程序先试一下如何外挂属性表以单值专题图为例,在SuperWkspManager的C#示例里加如下代码Code:
private void button2_Click(object sender, System.EventArgs e)
string str = &1:a,2:b,3:c,4:a,5:b,6:c,7:c&;
char[] split = new Char[] {','};
string[] strValue = str.Split(split);// &1:50,2:60,3:40&
SuperMapLib.soStyle themeStyle = new SuperMapLib.soStyleClass();
SuperMapLib.soLayer themeLayer = axSuperMap1.Layers[1];
SuperMapLib.soThemeUnique themeUnique = themeLayer.ThemeU
themeUnique.Field = &smid&;
themeUnique.IsForeignValue = 2;
themeUnique.ValueCount = 3;
for(i=0; i&strValue.L i++)
char[] splitNew = new Char[] {':'};
string[] strNewValue = strValue[i].Split(splitNew);
themeUnique.set_ForeignValue(strNewValue[0], strNewValue[1]);
themeUnique.set_Value(1, &a&);
themeUnique.set_Value(2, &b&);
themeUnique.set_Value(3, &c&);
themeStyle.PenColor
= ColorToRGB(System.Drawing.Color.Red);
themeStyle.SymbolSize=100;
themeUnique.set_Style(1, themeStyle);
themeStyle.PenColor
= ColorToRGB(System.Drawing.Color.Green);
themeStyle.SymbolSize=200;
themeUnique.set_Style(2, themeStyle);
themeStyle.PenColor
= ColorToRGB(System.Drawing.Color.Blue );
themeStyle.SymbolSize=300;
themeUnique.set_Style(3, themeStyle);
themeUnique.Enable =
axSuperMap1.CtlRefresh();
private uint ColorToRGB(Color mycolor)
uint tempcolor = (uint)(mycolor.R | (mycolor.G && 8) | (mycolor.B && 16));
根据这个string str = &1:a,2:b,3:c,4:a,5:b,6:c,7:c&;smid为1的对应外挂属性为a,2-&b,3-&c,4-&a...指定用外挂属性做专题.themeUnique.IsForeignValue = 2;
问:了解了以上过程,把两者结合一下,就可以实现题目的功能了。
答:客户端测试代码private void Button4_Click(object sender, System.EventArgs e){ &
MapParam mp = MapControl1.GetCurrentMapParam(); &
//外挂属性 &
mp.CustomParams = &1:a,2:b,3:c,4:a,5:b,6:c,7:c&; &
MapControl1.CustomInvoke(mp); &
MapControl1.ViewEntire();}服务器端改写的代码,把SetMap做如下修改Code:
private void SetMap(string str)
char[] split = new Char[] {','};
string[] strValue = str.Split(split);// &1:50,2:60,3:40&
//制作专题图
SuperMapLib.soStyle themeStyle = new SuperMapLib.soStyleClass();
SuperMapLib.soLayer themeLayer = m_axSuperMap.Layers[1];
SuperMapLib.soThemeUnique themeUnique = themeLayer.ThemeU
themeUnique.Field = &smid&;
themeUnique.IsForeignValue = 2;
themeUnique.ValueCount = 3;
for(i=0; i&strValue.L i++)
char[] splitNew = new Char[] {':'};
string[] strNewValue = strValue[i].Split(splitNew);// &1:50,2:60,3:40&
themeUnique.set_ForeignValue(strNewValue[0], strNewValue[1]);
themeUnique.set_Value(1, &a&);
themeUnique.set_Value(2, &b&);
themeUnique.set_Value(3, &c&);
themeStyle.PenColor
= ColorToRGB(System.Drawing.Color.Red);
themeStyle.SymbolSize=100;
themeUnique.set_Style(1, themeStyle);
themeStyle.PenColor
= ColorToRGB(System.Drawing.Color.Green);
themeStyle.SymbolSize=200;
themeUnique.set_Style(2, themeStyle);
themeStyle.PenColor
= ColorToRGB(System.Drawing.Color.Blue );
themeStyle.SymbolSize=300;
themeUnique.set_Style(3, themeStyle);
themeUnique.Enable =
问:结果截图
答:screen.width-460)this.width=screen.width-460'>
问:程序下载
答:自定义引擎,单值专题图引擎下载,只提供DownloadEngine.cs,覆盖原来的文件就可以了查看: 5334|回复: 64
【更新】新增自定义路径、停止下载、图片预览等】一键下载微软所有壁纸4.0
本帖最后由 hez2010 于
16:19 编辑
假如有一天你有一种下载壁纸的冲动,可是当你打开微软桌面背景下载页()时却发现竟然要一个一个点“立即获取”,而且不能批量下载的时候,我想你绝对要崩溃,,,
so,我写了这么一个程序,只需一键,等待下载完成即可,图片保存在你的用户文件夹中的“图片”文件夹中
新增自定义路径、停止下载、图片预览、下载模式调整等功能,完善进度显示,大幅度提高程序的实用性
注意:微软定期会添加背景图片,因此如果你想保持本地图片与微软图片库同步,每周启动本程序进行一次下载即可,已经下载过了的图片不会再次下载。
界面有些简陋哈,但是绝对能省很大一把时间,采用多线程下载技术,速度应该比较快
搜狗截图__16-18-53.png (100.23 KB, 下载次数: 3)
16:19 上传
(307.11 KB, 下载次数: 2339)
16:17 上传
点击文件名下载附件
实现原理:解析
页面,自动提取图片名称和下载链接,然后下载到本地。
版区有你更精彩: )
LZ好评。发米~
支持!!!!刚好微软最近发布了很多新背影。
不错,支持一个
这个工具 还是比较方便,谢谢楼主了。
honghuguyue
下到哪儿去了,我怎么找不到呢??
honghuguyue 发表于
下到哪儿去了,我怎么找不到呢??
c:\users\你的用户名\pictures
正在用,很好用感谢
honghuguyue
c:\users\你的用户名\pictures
没有这个文件夹啊????
honghuguyue
怎么都没有找到,好郁闷的哟~~~~~~~~~~~~~~~~~~~~~~~~~~~~
本帖最后由 hez2010 于
23:48 编辑
honghuguyue 发表于
怎么都没有找到,好郁闷的哟~~~~~~~~~~~~~~~~~~~~~~~~~~~~
在计算机(我的电脑)的地址栏里面输入%userprofile%试试,看看能不能找到,如果没有的话就新建一个叫“Pictures”的文件夹重新下载试试
Copyright & KaFan & All Rights Reserved.
Powered by Discuz! X3.1(

我要回帖

更多关于 qq自定义皮肤图片 的文章

 

随机推荐