2013年4月11日

WindowsFormsHost使用问题

摘要: WPF WindowsFormsHost 类 允许在 WPF 页面上承载 Windows Forms控件的元素。 命名空间: System.Windows.Forms.Integration程序集: WindowsFormsIntegration(在 WindowsFormsIntegration.dll 中)用于 XAML 的 XMLNS:http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation简单介绍在wpf程序中整 阅读全文

posted @ 2013-04-11 22:15 Daywei 阅读(13726) 评论(0) 推荐(2) 编辑

2013年4月2日

wpf使用问题

摘要: 在类库中无法使用ConfigurationManager 需要先引用DLL文件: C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll 然后才可以使用 System.Configuration.Configura 阅读全文

posted @ 2013-04-02 15:03 Daywei 阅读(465) 评论(0) 推荐(0) 编辑

2013年3月18日

关于progressbar

摘要: private void btnStart_Click(object sender, EventArgs e) { pbrProgress.Maximum = 100;//设置最大长度值 this.Cursor = Cursors.WaitCursor; ///添加一个事件处理程序 backgroundWorker1.DoWork += new DoWorkEventHandler(DoWork); ///添加一个显示进度条的事件 ... 阅读全文

posted @ 2013-03-18 17:34 Daywei 阅读(353) 评论(0) 推荐(0) 编辑

2013年1月29日

Fluent NHibernate Config

摘要: privatestatic ISessionFactory CreateSessionFactory() { return Fluently.Configure() .Database( FluentNHibernate.Cfg.Db.MySqlConfiguration.Standard .ConnectionString(s => s.Server(".") .Database("MyNHibernate") .Username("") .Password(""))) .Mappings(x=>x. 阅读全文

posted @ 2013-01-29 18:12 Daywei 阅读(204) 评论(0) 推荐(0) 编辑

2013年1月25日

Nhibernate使用中遇到的问题

摘要: 错误信息:Hibernate.ByteCode.Castle.dll —> System.IO.FileLoadException: Could not load file or assembly ‘NHibernate, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4′ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference.这是Nhib 阅读全文

posted @ 2013-01-25 10:54 Daywei 阅读(589) 评论(0) 推荐(0) 编辑

如何为VS添加编写NHibernate配置文件智能提示的功能

摘要: 只要在下载的NHibernate里找到configuration.xsd和nhibernate-mapping.xsd两个文件并复制到X:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas目录即可。 阅读全文

posted @ 2013-01-25 10:50 Daywei 阅读(294) 评论(0) 推荐(0) 编辑

2012年12月17日

winform中Dock的布局规则

摘要: 放一个Panel,当Dock为Left的时,就表示子控件停靠在父控件的左边区域,并把左区域填充满:上图中的Panel总是会停靠在Form的左边区域,不管如何调整Form的高度,它总是能把左边区域填满。Dock麻烦的地方在于多个控件碰到一起时,比如有两个Panel都设置为Left该怎么办?我们会发现向父控件的Controls集合中添加子控件,越晚添加具有更高的“优先级”。这里的优先级指的是,子控件“优先级”越高,越靠近父控件边缘,其他子控件就得避让:this.Controls.Add(this.panel1); this.Controls.Add(this.panel2);Panel2后添加进去 阅读全文

posted @ 2012-12-17 17:46 Daywei 阅读(1583) 评论(0) 推荐(0) 编辑

c# winform 给PictureBox控件添上滚动条,使用滚动条来查看图片,panel滚动条

摘要: PictureBox自身没有滚动条功能。所以有时大图片看不到 Panel自带滚动条,所以我们可以用Panel给PictureBox加上滚动条 设置Panel属性AutoScroll为true 设置PictureBox属性SizeMode为AutoSize 这样就可以用滚动条来看PictureBox中的大图片了 阅读全文

posted @ 2012-12-17 17:29 Daywei 阅读(431) 评论(0) 推荐(0) 编辑

2012年8月21日

Best gotchas of C++/CLI

摘要: Reference:Best gotchas of C++/CLI 阅读全文

posted @ 2012-08-21 11:42 Daywei 阅读(169) 评论(0) 推荐(0) 编辑

2012年8月15日

对象序列化

摘要: using System;using System.Xml;using System.Xml.Serialization;using System.Text;using System.IO;public class Util{ /// <summary> /// 对象序列化成 XML String /// </summary> public static string XmlSerialize<T>(T obj) { string xmlString = string.Empty; XmlSerializer xmlSerializer... 阅读全文

posted @ 2012-08-15 17:51 Daywei 阅读(255) 评论(0) 推荐(0) 编辑

导航

技术追求卓越 梦想创造未来