2015年7月14日

摘要: RSA算法是第一个能同时用于加密和数字签名的算法,也易于理解和操作。 RSA是被研究得最广泛的公钥算法,从提出到现在已近二十年,经历了各种攻击的考验,逐渐为人们接受,普遍认为是目前最优秀的公钥方案之一。RSA的安全性依赖于大数的因子分解,但并没有从理论上证明破译RSA的难度与大数分解难度等价。.NE... 阅读全文
posted @ 2015-07-14 09:29 zrSoldier 阅读(6403) 评论(0) 推荐(0) 编辑

2015年7月1日

摘要: // 执行创建数据库操作this.GetExecute(G_Con, "create database if not exists NEWDB");this.sqlAddress = " -h " + IP + " -u" + User + " -p" + Password + " NEWDB ";... 阅读全文
posted @ 2015-07-01 14:37 zrSoldier 阅读(1257) 评论(0) 推荐(0) 编辑

2015年6月29日

摘要: 12345678910111213141516171819202122232425262728293031323334#region 常用数据验证的封装,数字字符的验证/// /// 常用数据验证的封装,数字字符的验证/// /// 需要验证的数值【字符串,或者数字】/// 类型为哪一个验证/// ... 阅读全文
posted @ 2015-06-29 10:32 zrSoldier 阅读(856) 评论(0) 推荐(0) 编辑

2015年6月19日

摘要: 生成条形码和二维码并实现打印的功能 开篇:平台下编解条形码和二维码的工具。 下载地址:http://pan.baidu.com/s/1kTr3VufStep1:使用VS2010新建一个窗体程序项目:Step2:添加三个类:分别是BarCodeClass.cs、DocementBase.cs、imag... 阅读全文
posted @ 2015-06-19 16:08 zrSoldier 阅读(5545) 评论(0) 推荐(0) 编辑

2015年6月15日

摘要: public Byte[] Tupian() 获取一张图片的字节数组 { FileStream fs = new FileStream(@"G:\smartrt\bin\Debug\Data\tpl\111.jpg", FileMode.Open); int filelength = 0; fi... 阅读全文
posted @ 2015-06-15 15:30 zrSoldier 阅读(705) 评论(0) 推荐(0) 编辑

2015年5月7日

摘要: public partial class CameraFrm : Form { //private IOrderSyncServices orderBE = AccessOrderSync.GetOrderSyncServices(); //private string sysCode = ""; 阅读全文
posted @ 2015-05-07 16:22 zrSoldier 阅读(267) 评论(0) 推荐(0) 编辑

2015年5月3日

摘要: 在写程序的时候,我们经常需要对页面进行传参数,比如page?id=1234,那么在page这个页面中就直接可以使用string id = Request.QueryString["id"];来获取参数id的值1234了。这是一个人人都知道的基础知识。 上面的方法:Request.QueryStrin... 阅读全文
posted @ 2015-05-03 18:22 zrSoldier 阅读(3013) 评论(0) 推荐(0) 编辑

2015年3月11日

摘要: /*使用排序字典,默认只支持升序SortedDictionarydd=newSortedDictionary();DateTimedt=DateTime.Now;dd.Add(dt,"bbb");dd.Add(dt.AddDays(-1),"ccc");dd.Add(dt.AddDays(1),"a... 阅读全文
posted @ 2015-03-11 11:55 zrSoldier 阅读(234) 评论(0) 推荐(0) 编辑

2015年2月12日

摘要: 1、去重select * from daydata where wtid||rectime in (select wtid||rectime from daydata group by wtid||rectime having count(wtid||rectime) > 1) and ctid n... 阅读全文
posted @ 2015-02-12 15:25 zrSoldier 阅读(614) 评论(0) 推荐(0) 编辑

2015年2月9日

摘要: public class SystemInfo { public int[] intCode = new int[127];//存储密钥 public int[] intNumber = new int[25];//存机器码的Ascii值 public char[] Charcode = n... 阅读全文
posted @ 2015-02-09 20:54 zrSoldier 阅读(3211) 评论(0) 推荐(0) 编辑

2015年2月6日

摘要: public string Md5Encrypt(string str, string str2) { byte[] result = Encoding.Default.GetBytes((str+str2).Trim()); //tbPass为输入密码的... 阅读全文
posted @ 2015-02-06 20:28 zrSoldier 阅读(308) 评论(0) 推荐(0) 编辑
摘要: public string HttpPost(string postDataStr) { try { HttpWebRequest request = (HttpWebRequest)System.Net.WebReq... 阅读全文
posted @ 2015-02-06 18:30 zrSoldier 阅读(251) 评论(0) 推荐(0) 编辑

2015年2月4日

摘要: private void mypicbox_Click(object sender, EventArgs e) { try { OpenFileDialog ofdPic = new OpenFileDialo... 阅读全文
posted @ 2015-02-04 17:01 zrSoldier 阅读(440) 评论(0) 推荐(0) 编辑

2015年2月3日

摘要: 接触通用权限已经一年,现在使用已经很熟练,分享通用权限管理下面的一些好的开发思想。 安全漏洞对于一个小项目来说,可能不是特别的重视,对于一个大项目来说,这是特别重要需要注意的,特别是在项目开发中的就要警惕,下面我列举一些项目开发中需要注意的安全页面文本框的检查,每个文本框填写的内容是什么类型就是... 阅读全文
posted @ 2015-02-03 14:32 zrSoldier 阅读(1117) 评论(0) 推荐(0) 编辑
摘要: 这是我发了不少时间整理的C#的正则表达式,新手朋友注意一定要手册一下哦,这样可以节省很多写代码的时间。下面进行了简单总结。 只能输入数字:"^[0-9]*$"。 只能输入n位的数字:"^\d{n}$"。 只能输入至少n位的数字:"^\d{n,}$"。 只能输入m~n位的数字:。"^\d{m... 阅读全文
posted @ 2015-02-03 14:31 zrSoldier 阅读(139) 评论(0) 推荐(0) 编辑

2015年1月26日

摘要: AccessibilityObject取得指定給控制項的AccessibleObject。(繼承自Control)。AccessibleDefaultActionDescription取得或設定協助工具用戶端應用程式所使用的控制項的預設動作描述。(繼承自Control)。AccessibleDesc... 阅读全文
posted @ 2015-01-26 19:12 zrSoldier 阅读(494) 评论(0) 推荐(0) 编辑

2015年1月24日

摘要: 1.DevExpress控件组中的GridControl控件不能使横向滚动条有效。现象:控件中的好多列都挤在一起,列宽都变的很小,根本无法正常浏览控件单元格中的内容。解决:gridView1.OptionsView.ColumnAutoWidth属性是true,即各列的宽度自动调整,你把它设成fal... 阅读全文
posted @ 2015-01-24 22:56 zrSoldier 阅读(1695) 评论(0) 推荐(0) 编辑

2015年1月22日

摘要: 在这里使用GridView的MouseDown事件。这里同样使用的是GridHitInfo来获取点击位置的信息,来判断是否在列标题上。GridHitInfo根据鼠标点击的x、y坐标获取该点的相关信息,判断是否点击在列标题行内。private void gridView_MouseDown(objec... 阅读全文
posted @ 2015-01-22 19:07 zrSoldier 阅读(3755) 评论(1) 推荐(1) 编辑
摘要: 1)DevExpress控件的GridView的实现多选操作 先讲DevExpress控件的GridView的实现,要实现的功能基本上是处理单击全选操作、重新绘制表头等操作,首先在加载第一步实现相关的事件和操作,如下所示。this.gridView1.Click+=newSystem.Event... 阅读全文
posted @ 2015-01-22 17:50 zrSoldier 阅读(1766) 评论(0) 推荐(0) 编辑

2015年1月21日

摘要: 一、如何解决单击记录整行选中的问题View->OptionsBehavior->EditorShowMode 设置为:Click二、如何新增一条记录(1)、gridView.AddNewRow()(2)、实现gridView_InitNewRow事件三、如何解决GridControl记录能获取而没有... 阅读全文
posted @ 2015-01-21 14:46 zrSoldier 阅读(201) 评论(0) 推荐(0) 编辑

2015年1月20日

摘要: DevExpress 的帮助文档是在太缺乏了,他自己的帮助只有简单描述,没有样例,而它的网站上的在线帮助只有利用它的设计器设计的ToolBar、PopupMenu,没有利用代码开发的。虽然要利用代码开发,可以参照它设计器背后的代码,但还是有些区别的。我最近就碰见了问题:我通过反射初始化BarButt... 阅读全文
posted @ 2015-01-20 18:27 zrSoldier 阅读(4539) 评论(0) 推荐(0) 编辑

2015年1月19日

摘要: 在安装mysql数据库时,如果重新安装,很容易遇见apply security setting error(access denied for user'root@localhost'(usingpassword: YES)),即在配置mysql启动服务时,在启动apply security set... 阅读全文
posted @ 2015-01-19 11:41 zrSoldier 阅读(2033) 评论(0) 推荐(0) 编辑

2015年1月18日

摘要: DevExpress是一个比较有名的界面控件套件,提供了一系列的界面控件套件的DotNet界面控件。本文主要介绍我在使用DevExpress控件过程中,遇到或者发现的一些问题解决方案,或者也可以所示一些小的经验总结。总体来讲,使用DevExpress控件,可以获得更高效的界面设计以及更美观的效果。本... 阅读全文
posted @ 2015-01-18 21:33 zrSoldier 阅读(1624) 评论(0) 推荐(0) 编辑

2015年1月17日

摘要: /// /// 基于.NET 3.5的Chart工具类;对应的DevExpress版本:12.1.7; /// public static class ChartUtilsV3 { /// /// 添加基本的Series ///... 阅读全文
posted @ 2015-01-17 18:19 zrSoldier 阅读(820) 评论(0) 推荐(0) 编辑

2015年1月16日

摘要: 隐藏菜单栏左边的竖线和右边的箭头?1、隐藏菜单栏上右边的箭头属性设置:OptionsBar=>>AllowQuickCustomization=False2、隐藏菜单栏左边的竖线属性设置:OptionsBar=>>DrawDragBorder=False3、工具栏和状态栏上右边的箭头隐藏设置,和菜单... 阅读全文
posted @ 2015-01-16 17:45 zrSoldier 阅读(5200) 评论(0) 推荐(0) 编辑

2015年1月15日

摘要: 一、控制ChartControl的Y轴范围使用Devexpress中的CharControl控件,需要控制AxisY轴的显示范围,需要使用该控件的BoundDataChanged事件,具体代码如下:该代码实现的效果如下:参考文献:【1】AxisY Range Autohttps://www.deve... 阅读全文
posted @ 2015-01-15 22:20 zrSoldier 阅读(1716) 评论(0) 推荐(0) 编辑
摘要: WinForms Controls>Controls>Chart Control>Concepts>Creating Charts>2D Chart TypesThe XtraCharts suite provides a wide variety of different 2Dchart type... 阅读全文
posted @ 2015-01-15 22:03 zrSoldier 阅读(1123) 评论(0) 推荐(0) 编辑
摘要: WinForms Controls>Controls>Chart Control>Fundamentals>Charting Basics>Understanding Data Point, Its Argument and ValueThis topic provides general info... 阅读全文
posted @ 2015-01-15 21:59 zrSoldier 阅读(1495) 评论(0) 推荐(0) 编辑
摘要: Short DescriptionThePie Chartis represented by thePie3DSeriesViewobject, which belongs toPie, Doughnut and Funnel Series Views. This view is useful wh... 阅读全文
posted @ 2015-01-15 21:57 zrSoldier 阅读(2639) 评论(0) 推荐(0) 编辑
摘要: WinForms ControlsThe links below provide comprehensive information on using DevExpress WinForms products. They contain a detailed description of the p... 阅读全文
posted @ 2015-01-15 21:45 zrSoldier 阅读(3289) 评论(0) 推荐(0) 编辑
摘要: WinForms Controls>Controls>Chart Control>Getting StartedThis document gives you a quick overview of what resources you need to review first to get sta... 阅读全文
posted @ 2015-01-15 21:40 zrSoldier 阅读(1572) 评论(0) 推荐(0) 编辑
摘要: 我的数据代码如下:1234567891011121314151617181920212223chartControl1.Series.Clear();// 柱状图里的第一个柱Series Series1 =new Series("当年数据", ViewType.Bar);Series1.DataSo... 阅读全文
posted @ 2015-01-15 21:28 zrSoldier 阅读(6588) 评论(0) 推荐(0) 编辑
摘要: 在界面中拖入一个ChartControl控件,然后添加一个simplebutton控件。在simplebutton控件的click事件中加入如下代码:private void button1_Click(object sender, EventArgs e){//数据源chartControl1.D... 阅读全文
posted @ 2015-01-15 21:26 zrSoldier 阅读(1255) 评论(0) 推荐(0) 编辑
摘要: 我X轴设置的是时间,类型是DatetimeY轴设置的是数量,类型是Numerical当日期不一样时显示曲线正常,但是如果是同一天的话就成了下面的效果怎么做才能让全部是同一天的时候显示小时为单位的曲线呢?还有一个问题是,我的数据库的时间是string类型,而X轴是DateTime。能不能在不改变数据库... 阅读全文
posted @ 2015-01-15 21:21 zrSoldier 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 最近在用devexpress 第三方软件做项目。devexpress 的控件使用简单、功能强大、类型丰富、界面优美、扩展性强。今天主要是动态生成了一条StepLine。生成后的效果(能力不强,所以做的比较简单。):首先,建立一个form(普通的或ribbonform均可),然后拖拽一个chartCo... 阅读全文
posted @ 2015-01-15 21:02 zrSoldier 阅读(2901) 评论(0) 推荐(0) 编辑
摘要: 一、总体概述这个控件包含3层,最外面的chartControl层、中间的XYDiagram层、最里面的Series层。功能非常强大,但同时使用起来也相对复杂,需要各个层之间相互协调设置才能达到自己想要的效果。二、chartControl层像DEV的其它控件一样,这一层之相当于是一个壳子,我们平时在这... 阅读全文
posted @ 2015-01-15 20:50 zrSoldier 阅读(632) 评论(0) 推荐(0) 编辑
摘要: 关键代码: /// /// 创建Drill-Down样式的Title /// /// ChartControl /// title文字 /// 是否可见 public static void Add... 阅读全文
posted @ 2015-01-15 18:38 zrSoldier 阅读(399) 评论(0) 推荐(0) 编辑
摘要: /全选privatevoidbutton3_Click(objectsender, EventArgs e){for(inti = 0; i <this.checkedListBox1.Items.Count; i++){this.checkedListBox1.SetItemChecked(i,t... 阅读全文
posted @ 2015-01-15 18:29 zrSoldier 阅读(3727) 评论(0) 推荐(0) 编辑
摘要: winform 配置文件的加密解密Visual Studio 命令提示(2010) 窗口下直接输入 :解密aspnet_regiis -pdf connectionStrings 程序文件夹全目录加密aspnet_regiis -pef connectionStrings 程序文件夹全目录注意:加密... 阅读全文
posted @ 2015-01-15 18:27 zrSoldier 阅读(603) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.... 阅读全文
posted @ 2015-01-15 18:26 zrSoldier 阅读(682) 评论(0) 推荐(0) 编辑