摘要: 最近想实现这么个东西,一个ListBox, 里面的ListBoxItem可能是文本框、下拉框、日期选择控件等等。很自然的想到了DataTemplateSelector,并且事先定义好各类DataTemplate以显示不同的控件。先定义好各类资源Resources<Window.Resources><DataTemplatex:Key="textBox"><BorderBorderBrush="Gray"BorderThickness="1"><TextBoxText="{Bindin 阅读全文
posted @ 2012-08-23 23:25 Async Liu 阅读(4348) 评论(1) 推荐(2) 编辑
摘要: 系统部署在某些复杂的网络环境中,对权限的控制较为严格,无法给IIS用户授予更多的权限,而有些操作(比如对数据库的操作)又必须拥有权限才能成功。ASP.NET在后台使用多线程进行数据处理时,主线程可以获取IIS用户的权限,而子线程则不能获取到权限,进而导致子线程的执行过程失败。为了让子线程也和主线程拥有相同的权限,则可以使用Impersonate方法。usingSystem;usingSystem.Runtime.InteropServices;usingSystem.Security.Principal;///<summary>///SummarydescriptionforThr 阅读全文
posted @ 2011-08-15 00:17 Async Liu 阅读(599) 评论(0) 推荐(0) 编辑
摘要: 压缩文件夹,不能安装任何软件,不想用开源库(DOTNETZIP,SHARPLIBZIP)这些库,只能用windows系统自带的"发送到-》添加压缩文档"请参考如下网址:http://weblogs.asp.net/jgalloway/archive/2007/10/25/creating-zip-archives-in-net-without-an-external-library-like-sharpziplib.aspx唯一的问题:中文文件名压缩后,乱码了! 阅读全文
posted @ 2011-08-10 13:32 Async Liu 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 解决了SharpZipLib在英文系统中对中文文件压缩后,中文文件名变成乱码,并且不能解压缩的问题 阅读全文
posted @ 2009-05-04 16:01 Async Liu 阅读(7791) 评论(5) 推荐(0) 编辑
摘要: 经过了几天的学习,对应Python的基本语法和基本用法有了初步的了解,现阶段也主要是一边看书,然后在Python自带的解释器IDLE上写一些代码片段,对于Python的喜爱之情更进一步,相对于Lua和ruby的古怪的语法和一些奇怪的规则,我更加喜欢Python的简洁与高效。 我甚至已经忽视了windows自动的计算器,直接打开IDLE当计算器,然后敲入算术表达式,敲ENTER,简单,快捷,这就是P... 阅读全文
posted @ 2009-01-12 21:56 Async Liu 阅读(441) 评论(0) 推荐(0) 编辑
摘要: Python开胃菜(1):搭建开发环境 阅读全文
posted @ 2009-01-06 22:04 Async Liu 阅读(315) 评论(0) 推荐(0) 编辑
摘要: Note about the localizeable variables in you applications 阅读全文
posted @ 2008-09-08 16:24 Async Liu 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Automation服务器不能创建对象的解决方法 阅读全文
posted @ 2008-09-05 08:34 Async Liu 阅读(5721) 评论(1) 推荐(0) 编辑
摘要: Use EventHandler to Declare Event 阅读全文
posted @ 2008-08-25 22:45 Async Liu 阅读(435) 评论(1) 推荐(0) 编辑
摘要: 原文标题:Beginners Guide To Threading In .NET Part 1 of N --Introduction into threading in .NET 阅读全文
posted @ 2008-08-14 17:31 Async Liu 阅读(1121) 评论(0) 推荐(1) 编辑