摘要: 1 /// <summary> 2 /// 取单个汉字的拼音声母 3 /// </summary> 4 /// <param name="c">要转换的单个汉字</param> 5 /// <returns>拼音首字母</returns> 6 public string GetPYChar(string c) 7 { 8 try 9 {10 byte[] array = new byte[2];11 ... 阅读全文
posted @ 2011-10-21 16:54 ScottGu 阅读(513) 评论(0) 推荐(0) 编辑
摘要: this.lstViewEventDetail.Items.Clear(); string selectedItem = this.lstBoxCtrlEventType.SelectedItem.ToString().Trim(); EventLog... 阅读全文
posted @ 2011-10-21 16:48 ScottGu 阅读(954) 评论(0) 推荐(0) 编辑
摘要: 从C#的Singleton设计模式实现看.NET Framework特性对开发者的重要性 近来,我在学习如何在C#语言中使用设计模式中读到一些资料,其中有关Singleton设计模式引起了我的注意。学过设计模式的开发者都知道Singleton模式。我想简要地解释一下这个设计模式是为那些尚未学习过设计... 阅读全文
posted @ 2011-10-21 16:46 ScottGu 阅读(2035) 评论(0) 推荐(0) 编辑
摘要: class PublicFun { } /// <summary> /// calculate the distance /// </summary> public struct EarthPoint { //equatorial radius:WGS84 standard major semi-axis of the earth(unit:m) public const double Ea = 6378137; public const double Eb = 6356725; // 极半径 public readonly double Long... 阅读全文
posted @ 2011-10-21 16:23 ScottGu 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 当页面滚动到低端时,执行ajax方法从web service获取更多微博,并加载到页面上GetMicroblogs.js/// <reference path="../Scripts/jquery-1.4.1-vsdoc.js" />$(function () { var i = 0; $(window).bind("scroll", function (event) { //滚动条到网页头部的 高度,兼容ie,ff,chrome var top = document.documentElement.scrollTop + document. 阅读全文
posted @ 2011-10-21 15:58 ScottGu 阅读(4929) 评论(4) 推荐(2) 编辑