上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页
摘要: using System; using System.Collections.Generic; using System.Text; using System.IO.Ports; using System.Windows.Forms; namespace TestSerialPort { /// /// 串口开发辅助类 /// public class Ser... 阅读全文
posted @ 2014-06-27 16:02 深南大道 阅读(216) 评论(0) 推荐(0)
摘要: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts... 阅读全文
posted @ 2014-06-26 14:17 深南大道 阅读(204) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Runt... 阅读全文
posted @ 2014-06-24 11:00 深南大道 阅读(512) 评论(0) 推荐(0)
摘要: private void button2_Click(object sender, EventArgs e) { Bitmap image = new Bitmap(200, 200); Graphics g = Graphics.FromImage(image); //使绘图质量最高,即消除锯... 阅读全文
posted @ 2014-06-12 15:49 深南大道 阅读(360) 评论(0) 推荐(1)
摘要: namespace SerialPort { public partial class Form3 : Form { delegate void UpdateTextEventHandler(string text); //委托,此为重点 public static readonly string connStr = AppHelper.Get... 阅读全文
posted @ 2014-05-27 15:29 深南大道 阅读(355) 评论(0) 推荐(0)
摘要: CREATE PROCEDURE [dbo].[GetNameById] @studentid varchar(8), @studentname nvarchar(50) OUTPUT AS BEGIN SELECT @studentname=studentname FROM student WHERE studentid=@studentid if @@Error0 RETU... 阅读全文
posted @ 2014-05-26 14:02 深南大道 阅读(365) 评论(0) 推荐(0)
摘要: <?xml version="1.0"?> <!--先引用URLRewriter.dll,放置于Bin目录--> <configuration> <configSections> <!--配置重写规则节点--> <section name="RewriterConfig" type="URLRewr 阅读全文
posted @ 2014-05-22 17:24 深南大道 阅读(172) 评论(0) 推荐(0)
摘要: /// /// 判断手机用户UserAgent /// /// private bool IsMobile() { HttpContext context = HttpContext.Current; if (context != null) { HttpRequest request = context.Request; i... 阅读全文
posted @ 2014-05-21 15:02 深南大道 阅读(205) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2014-05-19 09:14 深南大道 阅读(500) 评论(0) 推荐(0)
摘要: 将文件放在一个确定的位置,不要放在桌面这些临时位置。然后在 EditPlus 的菜单栏选择 工具(T) -> 配置用户工具(C) 选择左边“类别”中的 文件 -> 设置&语法 ,点击右边“添加”按钮。类型名称用 SQL ,还需要填写扩展名和语法文件。其中扩展名就写 sql ,不要加点;语法文件通过 阅读全文
posted @ 2014-05-12 13:30 深南大道 阅读(261) 评论(0) 推荐(0)
摘要: 触发器是一种特殊类型的存储过程,它不同于之前的我们介绍的存储过程。触发器主要是通过事件进行触发被自动调用执行的。而存储过程可以通过存储过程的名称被调用。 Ø 什么是触发器 触发器对表进行插入、更新、删除的时候会自动执行的特殊存储过程。触发器一般用在check约束更加复杂的约束上面。触发器和普通的存储 阅读全文
posted @ 2014-05-10 11:55 深南大道 阅读(311) 评论(0) 推荐(0)
摘要: void Application_Error(object sender, EventArgs e) { // 在出现未处理的错误时运行的代码 Exception objErr = Server.GetLastError().GetBaseException(); //获取错误 string err 阅读全文
posted @ 2014-05-08 14:59 深南大道 阅读(363) 评论(0) 推荐(0)
摘要: using System; using System.Text; using System.Runtime.InteropServices; using System.Reflection; using System.Windows.Forms; namespace MouseKeyboardLibrary { /// /// Abstract base class for ... 阅读全文
posted @ 2014-05-07 10:39 深南大道 阅读(1180) 评论(0) 推荐(0)
摘要: SqlConnection conn = new SqlConnection('Server=(local);DataBase=test;User=sa;Pwd=sa');SqlDataAdapter da = new SqlDataAdapter('select * from test', c... 阅读全文
posted @ 2014-04-25 16:15 深南大道 阅读(185) 评论(0) 推荐(0)
摘要: 通常,在C#中实现串口通信,我们有四种方法: 第一:通过MSCOMM控件这是最简单的,最方便的方法。可功能上很难做到控制自如,同时这个控件并不是系统本身所带,所以还得注册,不在本文讨论范围。可以访问http://www.devhood.com/tutorials/tutorial_details.a 阅读全文
posted @ 2014-04-22 17:28 深南大道 阅读(1165) 评论(0) 推荐(0)
摘要: 我们经常会遇到在Winform或是WPF中点击链接或按钮打开某个指定的网址, 或者是需要打开电脑中某个指定的硬盘分区及文件夹, 甚至是"控制面板"相关的东西, 那么如何做呢? 答案是使用System.Diagnostics.Process.Start()。它的作用是调用外部的命令。 先来看看它的调用 阅读全文
posted @ 2014-04-14 11:04 深南大道 阅读(213) 评论(0) 推荐(0)
摘要: //Image转换Bitmap //1. Bitmap img = new Bitmap(imgSelect.Image); //2. Bitmap bmp = (Bitmap)pictureBox1.Image; /// <summary> /// 将图片Image转换成Byte[] /// </ 阅读全文
posted @ 2014-04-11 16:16 深南大道 阅读(271) 评论(0) 推荐(0)
摘要: MS-DOS命令范例 要将当前目录中的 Report.txt 发送到连上本地计算机的 LPT2,请键入: print /d:LPT2 report.txt 要将 c:\Accounting 目录中的 Report.txt 文件发送到服务器 \\CopyRoom 上的 Printer1 打印队列,请键 阅读全文
posted @ 2014-04-02 18:08 深南大道 阅读(1872) 评论(0) 推荐(0)
摘要: #region progressBar实时显示进度 private void button1_Click(object sender, EventArgs e) { int i = 10000; progressBar1.Minimum = 0; progressBar1.Maximum = i; 阅读全文
posted @ 2014-04-01 12:02 深南大道 阅读(241) 评论(0) 推荐(0)
摘要: #region 接口返回的Xml转换成DataSet /// <summary> /// 返回的Xml转换成DataSet /// </summary> /// <param name="text">Xml字符</param> /// <returns></returns> private Data 阅读全文
posted @ 2014-03-28 17:01 深南大道 阅读(240) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Data; using System.Drawing; namespace Code { class BarCode { public class Code128 { priva 阅读全文
posted @ 2014-03-28 12:08 深南大道 阅读(524) 评论(0) 推荐(0)
摘要: 在实际的工作需要中,我们有时候需将大量的数据导入到数据库中。这时候我们不得不考虑的就是效率问题。本文我们就介绍了一种将大量数据高效地导入SQL Server数据库的方法,该方法是使用BULK INSERT来实现的,接下来就让我们来一起了解一下这部分内容。 源数据(文本文件) 下载了大量的股票历史数据 阅读全文
posted @ 2014-03-27 16:34 深南大道 阅读(233) 评论(0) 推荐(0)
摘要: SQLite包含了如下时间/日期函数: datetime().......................产生日期和时间 date()...........................产生日期 time()...........................产生时间 strftime()... 阅读全文
posted @ 2014-03-27 15:32 深南大道 阅读(565) 评论(0) 推荐(0)
摘要: (1)自定义纸张设置 控制面板->打印机和传真->右键->服务器属性->创建新的格式 (2)自定义纸张使用 this.printDocument1.DefaultPageSettings.PaperSize = new System.Drawing.Printing.PaperSize("NewPrint", iWidth, iHeight); NewPrint:制... 阅读全文
posted @ 2014-03-27 15:06 深南大道 阅读(1791) 评论(0) 推荐(0)
摘要: //write txt StringBuilder builder = new StringBuilder(); FileStream fs = new FileStream(saveFileName, FileMode.Create); StreamWriter sw = new StreamWr 阅读全文
posted @ 2014-03-27 14:47 深南大道 阅读(238) 评论(0) 推荐(0)
摘要: //C# 的串口通信,是采用serialPort控件,下面是对serialPort控件(也是串口通信必备信息)的配置如下代码: serialPort1.PortName = commcomboBox1.Text; serialPort1.BaudRate = int.Parse(baudcomboBox2.Text); serialPort1.Parity = (Parity)Enum.Par... 阅读全文
posted @ 2014-03-27 14:05 深南大道 阅读(3159) 评论(0) 推荐(0)
摘要: //重启主程序 //System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().Location); #region 读存app.config字段值 public static string G 阅读全文
posted @ 2014-03-27 10:18 深南大道 阅读(314) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Text; namespace MacPrinter { public class ZPL_Command { /// (^EF)<summary> /// 清除设定 (已包含起 阅读全文
posted @ 2014-03-26 17:54 深南大道 阅读(834) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; namespace BarCodeLibrary { public class Zebra 阅读全文
posted @ 2014-03-26 15:17 深南大道 阅读(3409) 评论(0) 推荐(0)
摘要: //读配置文件 方法(1) //ConfigurationManager.RefreshSection("appSettings"); //强制重新载入 string settingValue = ConfigurationManager.AppSettings.Get("setting1"); / 阅读全文
posted @ 2014-03-26 15:04 深南大道 阅读(243) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 18 下一页