摘要: 1、基于Windows meida player的视频播放,应用于最早的EXPO项目内的视频播放:VideoWindow Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Drawing;usingSystem.Data;usingSystem.Linq;usingSystem.T 阅读全文
posted @ 2010-05-28 17:40 ю意思я 阅读(461) 评论(1) 推荐(1) 编辑
摘要: 尝试这样一个思路,用UDP组播的方式,由一个发送端在组内发布时间计数,所有接收端以此计数作为相对时间,来定位当前应该显示哪张图片; 发送端代码如下(此段代码为站在巨人的肩膀上,引用自小白的Blog):发送端 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Net;u 阅读全文
posted @ 2010-05-21 17:52 ю意思я 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 新装了Win7+VS2010,终于有机会体验一下传说中的WPF了,废话不多说,Go! 由于经常做信息发布的缘故,起手肯定会先去看一下WPF自带怎样的控件来显示视频,找了一下,是一个叫做MediaElement的控件;先写了一句最简单的显示本地视频的代码:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><MediaElementHeight="237"HorizontalAlignment="Left&quo 阅读全文
posted @ 2010-05-14 18:09 ю意思я 阅读(352) 评论(0) 推荐(1) 编辑
摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Runtime.InteropServices;namespaceHelper{publicclassMonitorHelper{publicstaticvoidTurnOn(){SendMessage(HWND_BR 阅读全文
posted @ 2009-09-07 15:33 ю意思я 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 刚好需要做图片裁剪,就在网上找了几个方法,都拿来试试,分析一下。 方法一(原帖地址:他的做法是将一个已知文件名的图片裁剪后保存为另一个文件,我根据自己的需要改成了输入和输出都是Image对象的方式):ImageCutCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->publicImageImageCut(intx,inty,intwidth,intheight,Imageimage){Bitmapbitmap=newBitmap(image); 阅读全文
posted @ 2009-08-11 16:55 ю意思я 阅读(425) 评论(0) 推荐(0) 编辑
摘要: 有些电脑,你右击文件夹,会发现没有“共享和安全”选项,这个时候你就无法共享文件夹了;这是为什么呢? 因为有个叫做“Server”的系统服务没有启动,操作系统关于此服务的描述为:支持此计算机通过网络的文件、打印、和命名管道共享。 解决办法:在命令行里输入“net share ipc$”,如果这台机器安装过“Microsoft网络的文件和打印机共享协议”,系统会提示你是否要开启这个服务,选“y”即可;这个时候你刷新下资源管理器再看,通常就可以看到“共享和安全”选项了。 阅读全文
posted @ 2009-07-28 13:22 ю意思я 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 在XP系统中,要将本机设为时间服务器,除了需要设置HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer下的Enabled为1外,还需要将HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config下的AnnounceFlags设置为10(十进制,十六进制为a)。 如果我们打开Windows操作系统自带的“时间和日期”设置,可以看到标签页上有个“Internet时间”标签,我们可以在这里设置系统自动向指... 阅读全文
posted @ 2009-07-22 11:43 ю意思я 阅读(7023) 评论(0) 推荐(0) 编辑
摘要: ShutdownAPICode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Runtime.InteropServices;namespaceSysAPI{publicclassShutdownAPI{[StructLayout(LayoutKind.Sequential,Pack=1)]internal 阅读全文
posted @ 2009-07-21 13:39 ю意思я 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->stringfileName=@"C:\1.jpg";try{using(FileStreamfs=newFileStream(fileName,FileMode.Open,FileAccess.Read,FileShare.Read)){using(BinaryReaderbr=newBinaryReader(fs)){byte[]bytes=br.ReadBytes((i 阅读全文
posted @ 2009-06-18 15:17 ю意思я 阅读(413) 评论(0) 推荐(0) 编辑
摘要: Network Time Protocol(NTP)是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS等等)做同步化,它可以提供高精准 度的时间校正(LAN上与标准间差小于1毫秒,WAN上几十毫秒),且可介由加密确认的方式来防止恶毒的协议攻击。 NTP采用C/S结构,Server端作为时间来源,可以是原子钟、天文台、卫星,也可以从Internet上获取;而在我们的局域网内,则可以配置一个服务器,将其硬件时间作为时间源来提供服务;我在网上搜索了一下,大部分关于NTP服务的文章都是基于Linux的,提到windows server系列操作系统的不是很多,不... 阅读全文
posted @ 2009-05-15 11:13 ю意思я 阅读(8401) 评论(3) 推荐(0) 编辑