谷歌地球二次开发代码
摘要:之前因为公司有一个三维GIS项目,所以花了点时间来研究,但后来因为项目的特殊性和GE的局限性,项目改成ArcGlobe,虽然项目上没进一步发展,但还是有很大的收获,所以决定将之前GE研究的成果共享,主要功能点有(GE:Google Earth): 1)GE的二次开发,实现模型导入,基本的点、线、面图
阅读全文
posted @
2016-07-03 22:25
WangAnuo
阅读(1149)
推荐(0)
System.Timers.Timer 嵌套 System.Windows.Forms.Timer的问题
摘要:如题“System.Timers.Timer 嵌套 System.Windows.Forms.Timer的问题”,最近在项目中在类uc_Map中启用了System.Timers.Timer,并在Timer的Timer_Elapsed方法中需要启动或停止GMapMarkerDirection mark
阅读全文
posted @
2016-03-26 10:14
WangAnuo
阅读(282)
推荐(0)
winform wpf 同时使用log4net出错处理
摘要:最近有个项目,主要是Winform开发,但其中会使用wpf的用户控件,其都要使用log4net进行日志记录,在编译的过程中会报如下错误: error MC1000: 未知的生成错误“因为没有预加载,所以无法解析程序集“log4net, Version=1.2.15.0, Culture=neutra
阅读全文
posted @
2016-02-28 09:31
WangAnuo
阅读(969)
推荐(0)
WPF控件到图片的转换
摘要:在实际的项目开发中,经常需要将信息保存成图片的形式,如屏幕截图、地图快照等操作,我中最近一个项目中便有这样的需求,项目(WPF)中用到GMap.NET控件,中地图上展示一些信息,过程中可能用户需要将地图信息保存下来,也就是地图快照,我的界面如下所示:网上查了GMap相关的资料,没有找到GMap怎么截...
阅读全文
posted @
2015-11-07 23:16
WangAnuo
阅读(1398)
推荐(0)
WCF添加服务失败。服务元数据可能无法访问。请确保服务正在运行并且正在公开元数据。
摘要:最近学习WCF,在学习的过程中,新建一个WCF服务应用程序,按F5启动客户端调试,弹出一个错误,如下图所示:折腾了半天,再对比自动生成的配置文件,发现web.config配置文件多了下图红色的一句,删除即可正常运行:aspNetCompatibilityEnabled是一个属性值,该值指示此服务是否...
阅读全文
posted @
2015-03-10 21:42
WangAnuo
阅读(2152)
推荐(0)
【C#】 实现WinForm中只能启动一个实例
摘要:如代码所示:方法一:using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;using System.Diagnostics;using System.Reflection;using System.Runtime.InteropServices;namespace ProcessBarTest{ static class Program { private const int SW_SHOW = 5; [DllImport("U...
阅读全文
posted @
2013-07-23 14:38
WangAnuo
阅读(483)
推荐(0)
C# 自定义箭头组件
摘要:C#自定义箭头组件,效果如图:实现的功能: 1) 箭头方向属性左、右、上、下; 2) 颜色渐变,且颜色任意调整; 3) 箭头大小位置任意调整; 4) 其他。主要代码如下: 1 using System; 2 using System.Collections; 3 using System.ComponentModel; 4 using System.Drawing; 5 using System.Drawing.Drawing2D; 6 using System.Data; 7 using System.Windows.Forms; 8 using System.Com...
阅读全文
posted @
2013-06-06 22:04
WangAnuo
阅读(2548)
推荐(0)
C# 将系统时间转换成农历时间
摘要:直接上代码: 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 5 namespace RSMISClient 6 { 7 using System.Globalization; 8 public static class ChineseDate 9 { 10 private static ChineseLunisolarCalendar cCalendar = new ChineseLunisolarCalendar(); 11 ...
阅读全文
posted @
2013-06-06 21:33
WangAnuo
阅读(433)
推荐(0)
验证数字的正则表达式集
摘要:验证数字的正则表达式集验证数字:^[0-9]*$验证n位的数字:^\d{n}$验证至少n位数字:^\d{n,}$验证m-n位的数字:^\d{m,n}$验证零和非零开头的数字:^(0|[1-9][0-9]*)$验证有两位小数的正实数:^[0-9]+(.[0-9]{2})?$验证有1-3位小数的正实数:^[0-9]+(.[0-9]{1,3})?$验证非零的正整数:^\+?[1-9][0-9]*$验证非零的负整数:^\-[1-9][0-9]*$验证非负整数(正整数 + 0):^\d+$验证非正整数(负整数 + 0): ^((-\d+)|(0+))$验证中文的正则表达式集合验证所有东亚区的语言:^[\
阅读全文
posted @
2012-06-06 08:16
WangAnuo
阅读(601)
推荐(0)
C#正则表达式的简单用法
摘要:using System; using System.Text.RegularExpressions; namespace bobomousecom.crm { /// <summary> /// Regexlib 的摘要说明。 /// </summary> public class Regexlib { public Regexlib() { // // TODO: 在此处添加构造函数逻辑 // } //搜索输入字符串并返回所有 href=“...”值 string DumpHrefs(String inputString) { Regex r; Match m; r
阅读全文
posted @
2012-06-05 17:51
WangAnuo
阅读(403)
推荐(0)