12 2012 档案
摘要:OpenFileDialog控件在WinForm中经常用来浏览本机文件。OpenFileDialog类的命名空间是Microsoft.Win32.OpenFileDialog,它不能作为WPF控件被直接使用。 实际上在WPF我们可以使用一个TextBox控件和Button控件来实现OpenFileDialog的功能。首先,我们在WPF项目XAML页拖一个TextBox控件和Button控件,如下图所示:xaml文件中将出现这样的代码: <TextBox Height="32" HorizontalAlignment="Left" Margin=&q
阅读全文
摘要:时间校验器处理过程:从网络获得标准北京时间解析时间修改本地时间*注:对于Windows vista以上系统修改本地时间需要管理员权限,所以要用管理员权限打开开发工具,后续运行效验器时也要用管理员权限运行.实现:1 获得标准北京时间WebRequest wrt = null; WebResponse wrp = null; wrt = WebRequest.Create("http://www.time.ac.cn/timeflash.asp?user=flash"); wrt.Credentials = CredentialCache.DefaultCredentials;
阅读全文

浙公网安备 33010602011771号