摘要:
首先通过UDP协议向网络发送广播:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->classProgram{staticvoidMain(string[]args){UdpClientclient=newUdpClient();while(true){strings="FindTerminals";byte[]bytes=Encoding.ASCII.GetBytes(s);try{client.Connect(I
阅读全文
posted @ 2009-05-12 14:54
ю意思я
阅读(401)
推荐(0)
摘要:
右击项目,选择“Add Service Reference”,如图:选择“Advanced...”,如图:选择“Add Web Reference...”,如图:将地址填入“URL”后点击“Go”,正确找到服务后输入“Web reference name”,点击“Add Reference”即可,如图:
阅读全文
posted @ 2009-05-09 23:42
ю意思я
阅读(2412)
推荐(0)
摘要:
只要设置Graphics g的以下4个属性即可:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->g.SmoothingMode=SmoothingMode.AntiAlias;g.CompositingQuality=CompositingQuality.HighQuality;g.TextRenderingHint=TextRenderingHint.AntiAliasGridFit;g.TextContrast=12;
阅读全文
posted @ 2009-05-06 16:23
ю意思я
阅读(1114)
推荐(0)
摘要:
我们知道Firefox2是支持迅雷的,但在Firefox3下,迅雷的多浏览器支持组件因为没有提供安全更新而被认为是不兼容扩展,无法安装。这么说在Firefox3下就不能使用迅雷了?显然不是。方法一:IE Tab安装地址:https://addons.mozilla.org/zh-CN/firefox/addon/1419安装完成后,重启Firefox,界面右下角会出现一个浏览器图标,点击图标,可以在Firefox内核(Firefox图标)和IE内核(IE图标)间切换,当你需要下载的时候,切换到IE内核,就可以使用迅雷下载了。优点:此插件的最大优点在于可以让你直接用Firefox浏览一些只支持I
阅读全文
posted @ 2008-09-26 23:46
ю意思я
阅读(1751)
推荐(0)
摘要:
Program.csCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Management;namespaceCommandLine{classProgram{staticvoidMain(string[]args){ShowNetwork();SetNetwork(
阅读全文
posted @ 2008-09-02 16:15
ю意思я
阅读(574)
推荐(0)
摘要:
使用正则表达式Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->publicstaticboolIsIPv4Address(stringip){stringpattern=@"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(2
阅读全文
posted @ 2008-09-01 13:27
ю意思я
阅读(626)
推荐(0)
摘要:
循环播放:axWindowsMediaPlayer1.settings.setMode("loop", true); 取消循环:axWindowsMediaPlayer1.settings.setMode("loop", false); 获取媒体文件的播放时间:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->stringurl="D:\test.wmv";WMPLib.Windows
阅读全文
posted @ 2008-07-23 12:12
ю意思я
阅读(353)
推荐(0)
摘要:
获取当前进程的绝对路径:Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName); 获取指定相对路径的绝对路径:Path.Combine(Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName),ConfigurationManager.AppSettings["FileRoot"]); 其中"FileRoot"定义在配置文件内:<addkey="FileRoot"
阅读全文
posted @ 2008-06-11 17:18
ю意思я
阅读(287)
推荐(0)
摘要:
通过FileInfo类获得的文件大小是long类型的,并非我们习惯的格式,因此为long类型添加一个扩展方法:publicstaticstringToFriendlyFileSize(thisdoublearg){stringresult="N/A";doublesize=arg;constdoublep1=1024;constdoublep2=1048576;//Math.Pow(1024,2)constdoublep3=1073741824;//Math.Pow(1024,3)constdoublep4=1099511627776;//Math.Pow(1024,4)c
阅读全文
posted @ 2008-06-11 13:51
ю意思я
阅读(180)
推荐(0)
摘要:
一步一步的在一个能够动作的程序上累加功能,要比一口气编写一大堆代码而不知道它们是否可以执行,生产力高的多。。。 人是可以创造奇迹的。。。
阅读全文
posted @ 2008-01-02 15:52
ю意思я
阅读(123)
推荐(0)