- 博客(20)
- 资源 (6)
- 收藏
- 关注
原创 C# MsChart 类似十字光标/交叉线 跟随鼠标移动功能 的优化 [问题点数:88分]
@http://bbs.csdn.net/topics/390744105搜索了很多,自己也尝试了很多,目前还没很好的解决方法,发帖求助。想实现类似CAD制图那种十字光标跟随的效果,其实MsChart是带这功能的设置ChartAre属性: _chartArea.CursorX.IsUserEnabled = true; _chartArea.CursorY.IsUserEnab
2014-03-27 16:59:32 7242 1
转载 C#处理Json数据/Json数据转为对象
From:http://www.cnblogs.com/Gun-N-Rose/archive/2012/09/28/2707053.html 下面我将通过如何用c#的DataContractSerializer将这条记录反序列化。首先你得分析这条记录的结构,然后建出与结构相符的类出来。记得加上reference:using System.Runtime.Serialization.
2014-03-27 15:21:49 1405
原创 Http服务器并发访问压力测试工具(自己方便测试而编写)新附带源码
为了方便对自己的服务器进行一个简单的并发访问测试,自己coding了一个简单的http post/get 并发请求工具环境是基于VS2010 c# .net4框架,所以运行该exe需要设备上安装了 .net framework 4.0 才可以,安装包大约40多M 可以自己去下载一个。资源已上传到CSDN可以进行下载,免积分的,下载地址:http://download.csdn.net/detail/songqingwei1988/7102283
2014-03-26 16:19:58 10653 20
原创 C# Winform/Server 提交协议冲突 Section=ResponseStatusLine 的解决,可能是服务器引起的异常
把Http异步的操作改为同步操作后出现该异常,网上搜了一下,原因:微软没有容忍不符合RFC 822中的httpHeader必须以CRLF结束的规定的服务器响应所导致对于原因我是不明觉厉。尝试的解决方法:0.几个人都说要改webclient等来提交请求,没有改的想法1.有人说把客户端的KeepLive = false 立竿见影 尝试无效,2.看到这个帖子 http://h
2014-03-26 13:49:47 9618 4
原创 C# 计算时间差/运行耗时计算/时间计数器(非DateTime相减方法,Stopwatch类)及 与DateTime的对比测试
背景:C#写了个Http服务器,中间加一个简单的处理耗时功能,以前都是用两个Time转为标准UTC去相减得到时间差的方法,脑子记忆太差,实在记不住那么多的Time格式。今天搜到一个专门用于实现时间差的类,记录一下。using System.Diagnostics;var stopWatch = new Stopwatch();stopWatch.Start();//开始或继续某
2014-03-26 10:50:33 4279
原创 C# 生成html页面出现乱码的问题
C#服务器处理http请求,通过string方式拼接一个简单的html页面返回给客户端,如果string中有中文的话,可能会出现乱码的问题,原因是没有设置使用TF-8编码设置方式如下: StreamWriter sw = new StreamWriter(fs, Encoding.Default);
2014-03-25 15:19:53 2163
转载 C# Winform 开机自动启动
From:http://write.blog.csdn.net/postedit /// /// 设置开机自动启用 /// private void SetAutoStart() { try { string reg
2014-03-25 13:13:08 1136
转载 C# WINFORM判断程序是否运行,且只能运行一个实例
判断程序是否已经运行,使程序只能运行一个实例有很多方法,下面记录两种,From:http://www.cnblogs.com/JuneZhang/archive/2012/03/22/2412121.html 方法1:线程互斥static class Program { private static System.Threading.Mutex mute
2014-03-23 20:57:11 903
原创 C# 实现ZIP 压缩和解压
/// /// 创建ZIP压缩文件 /// /// 压缩文件的路径 /// 用户文件名 public static void CreateZipFile(string filePath,string userName) { if (false ==File.
2014-03-23 17:44:48 3255
转载 C#开源资源大汇总
From:http://www.cnblogs.com/MaxIE/archive/2008/04/11/1148745.html 一、AOP框架 Encase 是C#编写开发的为.NET平台提供的AOP框架。Encase 独特的提供了把方面(aspects)部署到运行时代码,而其它AOP框架依赖配置文件的方式。这种部署方面(aspects)的方法帮助缺少经验的开发人员提
2014-03-23 17:42:03 1406
原创 C# 多线程模式 关闭/退出全部线程
摘要:今天使用VS调试一个Http服务器,其中使用了多个Thread来多线程处理Request,发现在调试模式下,关闭程序时,VS还处于调试模式,猜测是因为有Thread没有结束 Google 一下, 得出以下解决方法Thread.IsBackground 属性:获取或设置一个值,该值指示某个线程是否为后台线程。http://msdn.microsoft.com/zh-cn/l
2014-03-22 23:03:24 11907
原创 续:Java Tomcat 中调用.net DLL的方法 导入文件gacutil 和 regasm
gacutil 64 C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64 32 C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools Reg
2014-03-21 17:27:37 859
转载 续:Java Tomcat 中调用.net DLL的方法 -- Can't get object clsid from progid
From:http://hi.baidu.com/uniqueness/item/d71912ccc7fd130ac610b235先使用以下测试代码,判断是否时自己的dll出现问题 ActiveXComponent xl = new ActiveXComponent("Excel.Application"); Dispatch xlo = (Dispatch)(xl.g
2014-03-21 11:28:20 26320 3
原创 续:Java Tomcat 中调用.net DLL的方法 - 实际部署中遇到的一些问题解决
项目中需要使用到 jacob, 我是从网上收集到的1.17版本 包含32和64位系统. 资源下载连接如下,免积分Jacob1.17 x86&x64连接失效的话在这里 - > http://download.csdn.net/detail/songqingwei1988/7075755 Exception 1: java.lang.UnsatisfiedLinkError:
2014-03-21 11:11:58 2819
转载 C#版 代码实现 数据拟合,可用于MsChart拟合绘图等
亲测可用,用于MsChart中绘图十分便利 From: http://www.cnblogs.com/cglNet/archive/2012/08/27/2659257.html /// ///用最小二乘法拟合二元多次曲线 ///例如y=ax+b ///其中MultiLine将返回a,b两个参数。 ///
2014-03-20 13:31:04 5942 4
转载 C#版本拉格朗日插值算法 — 用于MsChart 绘图控件进行插值算法绘图。
亲测整体可用,但是感觉结尾部分或有数据剧烈波动的地方,不是很准确。 From:http://www.cnblogs.com/technology/archive/2011/03/12/1982025.html 实际中有时需要对数据进行分析, 最近就遇到了这样一个情况: 有一系列横坐标是时间, 纵坐标是记录值的一些数据, 但横坐标却不是等距记录的. 就是说在第一分钟记录一
2014-03-20 09:23:34 3709
原创 C# 删除 或移动 文件夹及文件夹内的内容。
/// /// 复制文件夹(及文件夹下所有子文件夹和文件) /// /// 待移动的文件夹路径 /// 目标路径 public static void CopyDirectory(String sourcePath, String destinationPath) {
2014-03-19 23:46:24 1681
原创 使用C#开发ActiveX控件,封装到浏览器使用,出现找不到XXXX.dll的异常解决
背景:项目中使用C#开发一款组件,用于Tomcat+Jsp项目中,在浏览器中通过Active组件的方式调用,部分功能会出现找不到 XXX.dll的问题。 异常原因: 通过浏览器调用C# Active控件时,默认到IE浏览器的Bin目录下寻找 控件的dll文件,所以引发该异常。 解决方案: public XXXActive() {
2014-03-19 19:38:48 3232 1
转载 Java Tomcat 中调用.net DLL的方法
希望在Tomcat中调用C#开发的一个功能模块,网上大概搜了一下,先备份一下。 From:http://www.cnblogs.com/windsor/archive/2010/06/17/1759289.html 背景: 近日一个java的项目,客户要求项目中必须使用其提供的加密机制,扔给了两个.net写的DLL。网络上搜了一圈也没找到啥东西,甚至看到人扬言此事绝无可
2014-03-19 19:31:13 1358
原创 C# 设置文本框等控件只能输入 正负整数或小数
//摘要: C# 文本输入控件,通过KeyPress事件实现只能输入正负正数和小数的功能 private void Value_KeyPress(object sender, KeyPressEventArgs e) { var tb = sender as TextBox; if (null ==
2014-03-19 14:34:31 3399
Http服务器并发访问压力测试工具(修正版,免积分)
2014-03-26
MICROSOFT FOUNDATION CLASS LIBRARY : ThreadDemo
2012-07-25
基于MFC实现的远程视频监控系统源代码.rar
2012-04-19
学习VC MFC开发必须了解的常用宏和指令
2012-04-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人