上一页 1 ··· 15 16 17 18 19

2012年8月2日

C#执行DOS命令(CMD命令) (转)

摘要: 在c#程序中,有时会用到调用cmd命令完成一些功能,于是在网上查到了如下方法,实现了 c#执行DOS命令,并返回结果。[csharp] view plaincopyprint? //dosCommand Dos命令语句 publicstring Execute(string dosCommand) { return Execute(dosCommand, 10); } /// <summary> /// 执行DOS命令,返回DOS命令的输出 /// </summary> /// <param name="dosCommand">dos命令 阅读全文

posted @ 2012-08-02 21:27 空明流光 阅读(411) 评论(0) 推荐(0)

C#中winform隐藏启动窗体及this.invoke匿名函数

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;namespace CommandService{ public partial class Form1 : Form { public Form1() { ... 阅读全文

posted @ 2012-08-02 21:11 空明流光 阅读(937) 评论(0) 推荐(0)

C#UDP通信最简单一例

摘要: 接收端:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Net.Sockets;namespace Server{ class Program { static void Main(string[] args) { var udpReceiver = new UdpClient(8112, AddressFamily.InterNetwork); ... 阅读全文

posted @ 2012-08-02 19:49 空明流光 阅读(415) 评论(1) 推荐(1)

2012年7月25日

自动查找并关闭窗口

摘要: Form1界面及VS生成代码:View Code namespace WindowCloser{ partial class Form1 { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if mana... 阅读全文

posted @ 2012-07-25 17:34 空明流光 阅读(498) 评论(0) 推荐(0)

2012年6月28日

简易类生成工具

摘要: namespace ClassGenerator{ partial class Form1 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /... 阅读全文

posted @ 2012-06-28 16:44 空明流光 阅读(315) 评论(0) 推荐(0)

2012年5月23日

自定义配置节备忘

摘要: View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Configuration;namespace ClassGenerator.ConfigSection{ public class MyKeyValuePair : ConfigurationElement { public MyKeyValuePair() { } public MyKeyValuePair(string key, string... 阅读全文

posted @ 2012-05-23 17:53 空明流光 阅读(241) 评论(0) 推荐(0)

2010年10月20日

再谈 asp.net 客户端调用服务器端事件并传递参数

摘要: 之前在网上找了很久,也没有找到比较好的方法,大都说是通过后台接收 Request["__EventTarget"] 和 Request["__EventArgument"]来实现,可我总觉得上面的方法有点别扭。再或者就是在前端放置一个runat="server"的button控件,然后将控件的Vi... 阅读全文

posted @ 2010-10-20 16:51 空明流光 阅读(663) 评论(0) 推荐(0)

上一页 1 ··· 15 16 17 18 19

导航