2013年9月25日

WebBrowser 禁用脚本错误提示

摘要: public partial class Text : UserControl { public Text() { InitializeComponent(); browser.Navigated += new NavigatedEventHandler(browser_Navigated); } void browser_Navigated(object sender, NavigationEventArgs e) { HideScriptErrors(browser, true); } public void HideScriptErrors(WebBrowser wb, bool H.. 阅读全文

posted @ 2013-09-25 11:24 Y# 阅读(551) 评论(0) 推荐(0) 编辑

2013年6月19日

Unable to automatically debug "XXXXX“

摘要: I solved this issue by going toC:\Program Files\Microsoft VisualStudio10.0\Common7\IDEthen runningvsdiag_regwcf.exe -iRemark: I'm running an x64 version of Win7, and though 99% of Visual Studio is located in C:\Program Files (x86)\, this tool is in C:\Program Files\ 阅读全文

posted @ 2013-06-19 08:26 Y# 阅读(208) 评论(0) 推荐(0) 编辑

2012年11月26日

C#异步编程模式IAsyncResult概述

摘要: C#异步编程模式IAsyncResult概述 IAsyncResult 异步设计模式通过名为 BeginOperationName 和 EndOperationName 的两个方法来实现原同步方法的异步调用,如 FileStream 类提供了 BeginRead 和 EndRead 方法来从文件异步读取字节,它们是 Read 方法的异步版本 Begin 方法包含同步方法签名中的任何参数,此外还包含另外两个参数:一个AsyncCallback 委托和一个用户定义的状态对象。委托用来调用回调方法,状态对象是用来向回调方法传递状态信息。该方法返回一个实现 IAsyncResult 接口的对象 End 阅读全文

posted @ 2012-11-26 15:54 Y# 阅读(434) 评论(0) 推荐(0) 编辑

2012年10月31日

Regions inside DataTemplates in Prism v4 using a region behavior

摘要: http://blogs.southworks.net/dcherubini/2011/11/10/regions-inside-datatemplates-in-prism-v4-using-a-region-behavior/The problemThere is a known issue in Prism where, if a Region is defined inside a DataTemplate, the Region is never register in the corresponding RegionManager.Based on our understandin 阅读全文

posted @ 2012-10-31 10:42 Y# 阅读(1123) 评论(0) 推荐(0) 编辑

2012年10月19日

资源

摘要: WPF快速指导1:资源 本文摘要: 1:资源应用场景; 2:静态资源和动态资源; 3:Application.Current.Resources和Application.Current.Resources.MergedDictionaries 4:路径一:资源的应用场景场景1:格式化界面显示元素 所谓格式化界面显示元素,就是使用统一的风格来定义软件的每个界面。 要满足本需求,只需要在App.xaml中如下定义资源 <Application.Resources> <Style TargetType="TextBlock" x:Key="TitleT 阅读全文

posted @ 2012-10-19 21:58 Y# 阅读(208) 评论(0) 推荐(0) 编辑

跨程序集共享资源

摘要: <ResourceDictionarySource="pack://application:,,,/Common;component/styles.xaml"/> 阅读全文

posted @ 2012-10-19 21:27 Y# 阅读(111) 评论(0) 推荐(0) 编辑

2012年10月12日

Windows8常用快捷键

摘要: Wi键——打开“开始”屏幕Win+D——显示桌面Win+E——打开计算机Win+R——打开“运行”对话框Win+L——锁定计算机Win+M——最小化窗口Win+方向键——窗口最大、最小、靠左、靠右Win+数字键1到9——启动任务栏对应程序Win+Home——最小化当前窗口外所有窗口Win+Pause——显示“系统属性”Win+T——循环显示任务栏各个程序Win+C——Charm(超级按钮)显示菜单和时钟Win+X——显示控制面板菜单Win+I——显示“设置”菜单,不同界面下显示菜单不同Win+K——显示“设备”菜单,显示器、打印机等Win+H——显示“共享”菜单,可共享内容给朋友Win+W—— 阅读全文

posted @ 2012-10-12 22:28 Y# 阅读(169) 评论(0) 推荐(0) 编辑

2012年9月6日

ListViewItem HightLight

摘要: <ListView.Resources> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Pink"/> <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Gray"/> <SolidColorBrush x:Key="{x:Static SystemColors.High 阅读全文

posted @ 2012-09-06 15:46 Y# 阅读(234) 评论(0) 推荐(0) 编辑

2012年5月25日

C#调用C++dll

摘要: 本文转载至CSDN..在合作开发时,C#时常需要调用C++DLL,当传递参数时时常遇到问题,尤其是传递和返回字符串是,现总结一下,分享给大家:VC++中主要字符串类型为:LPSTR,LPCSTR, LPCTSTR, string, CString, LPCWSTR, LPWSTR等但转为C#类型却不完全相同。主要有如下几种转换:将string转为IntPtr:IntPtr System.Runtime.InteropServices.Marshal.StringToCoTaskMemAuto(string)将IntPtr转为string:string System.Runtime.Intero 阅读全文

posted @ 2012-05-25 12:00 Y# 阅读(22431) 评论(0) 推荐(2) 编辑

2012年3月30日

异步上传

摘要: public const int CHUNK_SIZE = 4096; public const string UPLOAD_URI = "http://localhost:55087/FileUpload.ashx?filename={0}&append={1}"; private Stream _data; private string _fileName; private long _bytesTotal; private long _bytesUploaded; private void UploadFileChunk() { string uploadUr 阅读全文

posted @ 2012-03-30 16:28 Y# 阅读(238) 评论(0) 推荐(0) 编辑

导航