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

2012年9月15日

自定义配置节与XML反序列化并用

摘要: web.config<?xml version="1.0"?><configuration> <configSections> <section name="menus" type="XmlSerializerPlus.MenuSectionHandler"/> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" 阅读全文

posted @ 2012-09-15 09:28 空明流光 阅读(318) 评论(0) 推荐(0)

2012年9月14日

XML反序列化一例

摘要: <?xml version="1.0" encoding="utf-8" ?><htmlPages> <htmlPage name="home"> <cssList> <css name ="base.css"></css> <css name ="font.css"></css> </cssList> <javascripts> <javascript name=&qu 阅读全文

posted @ 2012-09-14 10:22 空明流光 阅读(317) 评论(0) 推荐(0)

2012年8月3日

c#读取带命名空间的xml

摘要: boolean var doc = new XmlDocument(); var namespaceManager = new XmlNamespaceManager(doc.NameTable); namespaceManager.AddNamespace("xsi", "http://w... 阅读全文

posted @ 2012-08-03 17:41 空明流光 阅读(265) 评论(0) 推荐(0)

WindowService 执行命令

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Linq;using System.ServiceProcess;using System.Text;using System.Threading;using System.Net.Sockets;using System.Net;namespace WindowsService1{ public partial class Adm... 阅读全文

posted @ 2012-08-03 14:28 空明流光 阅读(255) 评论(0) 推荐(0)

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 空明流光 阅读(425) 评论(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 空明流光 阅读(956) 评论(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 空明流光 阅读(436) 评论(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 空明流光 阅读(509) 评论(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 空明流光 阅读(327) 评论(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 空明流光 阅读(254) 评论(0) 推荐(0)

2010年10月20日

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

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

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

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

导航