2013年4月13日

asp.net 自定义tab控件实现

摘要: 已经完成了tab控件的必要的设计时支持和运行时输出,控件完整代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web.UI.WebControls;using System.Web.UI;using System.ComponentModel;using System.Web.UI.Design.WebControls;using System.Web.UI.Design;using System.Security.Permissions;usi 阅读全文

posted @ 2013-04-13 14:38 空明流光 阅读(753) 评论(0) 推荐(0)

2013年4月12日

Tab控件css样式布局

摘要: ... 阅读全文

posted @ 2013-04-12 18:58 空明流光 阅读(462) 评论(0) 推荐(0)

2013年4月10日

css 左右布局一例

摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;"><head runat="server"> <title></title&g 阅读全文

posted @ 2013-04-10 22:53 空明流光 阅读(230) 评论(0) 推荐(0)

2013年4月9日

asp.net 自定义控件之ItemTemplate

摘要: 最近在做一个东西,要用一个tab控件,鉴于asp.net ajax tookit extension 控件样式的难以修改和jquery ui的各版本存在较大差异,需要自定义控件,需要用到这个技术点,怕忘记,转载一篇文章,转自 http://bbs.blueidea.com/forum.php?mod=viewthread&tid=1793727再说一下,这部分内容最好的教材就是我一开始推荐的那个视频材料。如果还有没有下的那就赶快去下~~指不定哪天微软的网站被攻击,倒闭了,就没的下了。不过话说回来,如果微软都倒闭了,那我们还学.net干嘛啊~~~ 不瞎扯了,下面转入正题。 任何控件都可以 阅读全文

posted @ 2013-04-09 15:05 空明流光 阅读(2649) 评论(0) 推荐(0)

2013年3月23日

c# console 在非主线程Hot Key

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;namespace ConsoleApplication1{ public class Win32APIs { [DllImport("user32", EntryPoint = "GetMessage")] public static extern int GetMessage( out ... 阅读全文

posted @ 2013-03-23 08:52 空明流光 阅读(377) 评论(0) 推荐(0)

2013年3月22日

c# console 程序实现 hot key

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;namespace ConsoleApplication1{ /// <summary> /// A class that manages a global low level keyboard hook /// </summary> class globalKeyboardHook { #region Consta... 阅读全文

posted @ 2013-03-22 17:18 空明流光 阅读(548) 评论(0) 推荐(0)

2013年3月21日

C# HotKey 的另一种方法

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;namespace ConsoleApplication1{ /// <summary> /// A class that manages a global low level keyboard hook /// </summary> class globalKeyboardHook { #region Consta... 阅读全文

posted @ 2013-03-21 17:42 空明流光 阅读(659) 评论(0) 推荐(0)

2013年3月15日

左右两列布局

摘要: 转【css】两列宽度全屏自适应:一列宽度固定,一列宽度自适应 (2011-03-10 09:11:43)转载▼标签:css宽度全屏自适应it分类: 工作相关以图说话: 这种布局,我以前想了很久,总是没有办法,采用这种布局的网站,典型就是:博客园、各种邮箱。但是,这种布局的实现方法很多,我看了163邮箱、QQ邮箱的DOM结构,发现,都是用table布局的,用一个table作为两列的容器,然后,使这个table的样式中设置:width:100%。这是关键,这样table就会占居整个水平方向,而后一列一个td,让一个td固定宽,则另一个td自动占满剩余宽度。这个办法我很久前就想到了。但是,我一... 阅读全文

posted @ 2013-03-15 13:09 空明流光 阅读(510) 评论(0) 推荐(0)

2013年2月25日

自定义服务端Script控件支持javascript服务端路径?

摘要: [DataBindingHandler("System.Web.UI.Design.TextDataBindingHandler, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DefaultProperty("Text"), AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetH 阅读全文

posted @ 2013-02-25 12:32 空明流光 阅读(233) 评论(0) 推荐(0)

2013年2月17日

Web Server 启动工具

摘要: 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 Microsoft.VisualBasic;using System.Runtime.Serialization.Json;using System.IO;namespace WebDevTool{ public partial ... 阅读全文

posted @ 2013-02-17 13:34 空明流光 阅读(300) 评论(0) 推荐(0)

2013年2月2日

asp.net 聊天程序

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="chat.aspx.cs" Inherits="chat" ValidateRequest="false" EnableEventValidation="false" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www 阅读全文

posted @ 2013-02-02 13:41 空明流光 阅读(255) 评论(0) 推荐(0)

Text Helper

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

posted @ 2013-02-02 13:37 空明流光 阅读(225) 评论(0) 推荐(0)

silverlight 跑马灯 轮播 demo

摘要: <navigation:Page x:Class="SilverlightApplication1.ProductListSwitch" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns: 阅读全文

posted @ 2013-02-02 13:17 空明流光 阅读(548) 评论(0) 推荐(0)

2012年12月26日

asp.net 实现LRC歌词播放

摘要: 这个其实很简单,此功能包含一个asp.net UserControl和asp.net引用页面。 LRCPlayer.ascx LRCPlayer.ascx.cs lrc.aspx lrc.aspx.cs 阅读全文

posted @ 2012-12-26 09:44 空明流光 阅读(350) 评论(0) 推荐(0)

2012年12月25日

JQuery几点用法摘记

摘要: 元素父元素 > 子元素前一元素 + 紧跟其后的元素前一元素 ~ 其后的元素属性选择器[属性],[属性=值],[属性!=值], [属性^=值], [属性&=值], [属性*=值]表单选择器:input, :text, :button, :checkbo基本选择器#id,element,.class,*层级选择器父元素 子孙x…普通的方式.bind() 方法是用于往文档上附加行为的主要方式。所有JavaScript事件对象,比如focus, mouseover, 和 resize,都是可以作为type参数传递进来的。jQuery还提供了一些绑定这些标准事件类型的简单方式,比如.cli 阅读全文

posted @ 2012-12-25 14:33 空明流光 阅读(130) 评论(0) 推荐(0)

自设计网站导航效果一例

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xml 阅读全文

posted @ 2012-12-25 12:26 空明流光 阅读(193) 评论(0) 推荐(0)

2012年11月30日

C#多线程备忘

摘要: 1.以前一直在用多线程,但对于多个线程完成一个任务时,如何汇合到主线程不太清楚,有时竟傻到去记录每个线程的状态来轮询等待(此处不讨论线程池),下面我写了一个例子,虽然和自己预想的结果有点出入,但确定实现了这个功能,就是Thread.Join方法,代码如下: using System; using S 阅读全文

posted @ 2012-11-30 14:01 空明流光 阅读(297) 评论(0) 推荐(0)

2012年11月28日

c#通过编码检查是否有PendingChanges没有签入

摘要: using Microsoft.TeamFoundation.Client;using Microsoft.TeamFoundation.VersionControl.Client;var pendingList = new List<KeyValuePair<string, string>>(); foreach (var ser in RegisteredTfsConnections.GetProjectCollections()) { var server = RegisteredTfsConnections.Ge... 阅读全文

posted @ 2012-11-28 16:45 空明流光 阅读(687) 评论(2) 推荐(0)

C#代码控制tfs

摘要: using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.VersionControl.Client; var workspaceInfo = Workstation.Current.GetLocalWorkspaceInfo(fileName);var server = new TfsTeamP 阅读全文

posted @ 2012-11-28 10:16 空明流光 阅读(1179) 评论(0) 推荐(0)

2012年11月15日

移动改名正在运行的程序

摘要: MoveFileEx可以移动正在运行的程序文件,当然也可以改名,只是不能移动到不同的驱动器里罢了,这个函数相当强大,还有可以在下次开机时删除的功能。Mark一下,备忘。 阅读全文

posted @ 2012-11-15 13:06 空明流光 阅读(255) 评论(0) 推荐(0)

2012年11月14日

C# 注册热键

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;using System.Runtime.InteropServices;namespace ConsoleTest{ public static class HotKeyManager { public static event EventHandler<HotKeyEventArgs> HotKeyPre... 阅读全文

posted @ 2012-11-14 16:11 空明流光 阅读(303) 评论(0) 推荐(0)

从Windows Service 启动一个cmd窗口

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using Microsoft.VisualBasic; using Syste 阅读全文

posted @ 2012-11-14 15:55 空明流光 阅读(725) 评论(0) 推荐(0)

2012年11月8日

读取当前配置文件的方法

摘要: var config = ConfigurationManager.OpenExeConfiguration(Assembly.GetAssembly(typeof(ProjectInstaller)).Location); this.serviceInstaller1.ServiceName = config.AppSettings.Settings["ServiceName"].Value;我发现在有些情况下读取应用程序的配置文件会出现ConfigurationManager.AppSettings读取不到的情况,而用上面的代码却可以。比如Windows Servic. 阅读全文

posted @ 2012-11-08 17:12 空明流光 阅读(320) 评论(1) 推荐(0)

2012年10月19日

asp.net 文件下载,多任务并行有进度条 (2012-10-18 15:36)

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RenameDownload.aspx.cs" Inherits="DownloadProxy.RenameDownload" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio 阅读全文

posted @ 2012-10-19 17:31 空明流光 阅读(333) 评论(0) 推荐(0)

2012年10月18日

asp.net 文件下载,有进度条

摘要: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RenameDownload.aspx.cs" Inherits="DownloadProxy.RenameDownload" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio 阅读全文

posted @ 2012-10-18 15:36 空明流光 阅读(617) 评论(0) 推荐(0)

asp.net ajax使用方法一

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace DownloadProxy{ public partial class RenameDownload : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { }... 阅读全文

posted @ 2012-10-18 09:34 空明流光 阅读(172) 评论(0) 推荐(0)

2012年10月9日

C#将中文词组处理成拼音

摘要: using System.Runtime.InteropServices;using System.Runtime.CompilerServices; [DllImport("ole32.dll")]public static extern int CLSIDFromString( [MarshalAs(UnmanagedType.LPWStr)] string lpsz, out Guid clsid); [DllImport("ole32.dll")]public static extern int CoCreateInstance( [In, Ma 阅读全文

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

C# 应用微软的Visual Studio International Pack 类库提取汉字拼音首字母

摘要: 昨天经过网友提示,提取汉字拼音的办法可以应用微软的一个类库 Visual Studio International Pack ,今天试了一试,确切好用!下面分享下应用办法:起首下载Visual Studio International Pack 1.0,官方下载地址:http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=44CAC7F0-633B-477D-AED2-99AEE642FC10&displaylang=zh-cn。下载完毕后解压,解压后可以发明7个MSI安装文件,此中CHSPinYinConv.msi 阅读全文

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

2012年9月25日

c# 防早退提醒器

摘要: <?xml version="1.0" encoding="utf-8" ?><configuration> <appSettings> <add key="WorkingStartTime" value="8:30" /> <add key="WorkingEndTime" value="17:30" /> <add key="WorkingHours" value="8&quo 阅读全文

posted @ 2012-09-25 13:54 空明流光 阅读(647) 评论(8) 推荐(0)

c# 关机、注销、重启代码

摘要: using System;using System.Text;using System.Diagnostics;using System.Runtime.InteropServices;namespace SystemManager{ /// <summary> /// 枚举类型,指定可以允许的重启操作 /// </summary> public enum RestartOptions { /// <summary> /// Shuts down all processes running in the security contex... 阅读全文

posted @ 2012-09-25 13:42 空明流光 阅读(489) 评论(0) 推荐(0)

C# 关机消息拦截的几种方法:

摘要: Microsoft.Win32.SystemEvents.SessionEnding += new Microsoft.Win32.SessionEndingEventHandler(SystemEvents_SessionEnding); protected override void WndProc(ref Message m) { const int WM_QUERYENDSESSION = 0x011; const int WM_ENDSESSION = 0x16; if (m.Msg == ... 阅读全文

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

2012年9月24日

c# 隐藏主窗体

摘要: protected override void OnShown(EventArgs e) { base.OnShown(e); this.Hide(); } 将上面一句写在form的类代码里,虽然开始会闪一下,但这是我搜到的最简单的代码。勉强可以用。如果配合 WindowStyle设置为Minimi 阅读全文

posted @ 2012-09-24 16:07 空明流光 阅读(201) 评论(0) 推荐(0)

使用WTSGetActiveConsoleSessionId()的VISTA服务与桌面交互

摘要: 转载自:http://blog.csdn.net/felixz/archive/2006/10/23/1346380.aspxWindows Vista 对快速用户切换,用户账户权限,以及服务程序所运行的会话空间都作了很大的改动,致使一些原本可以工作的程序不再能够正常工作了,我们不得不进行一些改进以跟上 Vista 的步伐。我们的软件在Windows NT/2000/XP/Vista 系统中安装了一个系统服务,这个服务负责以 SYSTEM 权限启动我们的主程序。我们的主程序启动后会在系统托盘添加一个图标,点击此图标可以弹出控制菜单,通过这个菜单也可以激活配置程序首选项的对话框。在 Windo. 阅读全文

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

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 空明流光 阅读(307) 评论(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 空明流光 阅读(308) 评论(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 空明流光 阅读(252) 评论(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 空明流光 阅读(238) 评论(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 空明流光 阅读(409) 评论(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 空明流光 阅读(935) 评论(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 空明流光 阅读(412) 评论(1) 推荐(1)

导航