随笔分类 -  ◆C#代码参考◆

摘要:WPF中添加Event1. ListBox中添加Event ... 阅读全文
posted @ 2014-12-03 16:24 太古月石 阅读(6887) 评论(0) 推荐(0)
摘要:这是一堆代码片段的集合, 找代码的时候能快点。节约生命啊。 阅读全文
posted @ 2014-08-27 14:26 太古月石 阅读(417) 评论(0) 推荐(0)
摘要:整理近期看到,或者想看的程序/代码◆界面◆1. 界面MUI,前段时间把这里面的代码分解了一下哈,弄了一个最简单的Customize Control.http://mui.codeplex.com/2.Outlook 2010界面http://navigationpane.codeplex.com/3... 阅读全文
posted @ 2014-08-18 09:53 太古月石 阅读(391) 评论(0) 推荐(0)
摘要:项目中添加一个Library 工程,但是却无法加入WPF window, WPF customize control.调查了一下,发现这一切都由于Library工程中没有:ProjectTypeGuids Debug AnyCPU {072127C4-0CED-4FA8-8... 阅读全文
posted @ 2014-07-04 16:48 太古月石 阅读(818) 评论(0) 推荐(0)
摘要:问题:有2个表,使用id相连,如何用Join语法将其连接起来?如下代码 List assoList = dataContext.tblAssociations.Join( // source dataContext.tblUser, // target ... 阅读全文
posted @ 2014-07-03 16:30 太古月石 阅读(339) 评论(0) 推荐(0)
摘要:文件另存,打开文件的弹出框 阅读全文
posted @ 2014-06-30 16:34 太古月石 阅读(6573) 评论(1) 推荐(1)
摘要:http://www.openelms.org/ 阅读全文
posted @ 2014-06-30 14:03 太古月石 阅读(165) 评论(0) 推荐(0)
摘要:不用担心List没有创建问题。private ObservableCollection _optionalCollection; public ObservableCollection OptionalCollection { get ... 阅读全文
posted @ 2014-05-28 10:11 太古月石 阅读(6622) 评论(0) 推荐(0)
摘要:c-sharp-list-orderby-alphabetical-order 阅读全文
posted @ 2014-05-20 23:42 太古月石 阅读(6060) 评论(0) 推荐(0)
摘要:ChangeList里面会有重复的数据,这时可以这样去掉重复的item// Remove duplicated info var dup = ChangeList.Where(item => item.Stream.id == item.NewId).ToList(); ... 阅读全文
posted @ 2014-05-12 16:34 太古月石 阅读(397) 评论(0) 推荐(0)
摘要:1.如何使用Join:http://www.devcurry.com/2011/01/join-example-in-linq-and-c.html 阅读全文
posted @ 2014-05-08 16:59 太古月石 阅读(193) 评论(0) 推荐(0)
摘要:1. ConfigurationManager的命名空间:using System.Configuration;2.To be able to save you have to use a configuration object returned by the OpenExeConfigurati... 阅读全文
posted @ 2014-05-08 16:43 太古月石 阅读(14950) 评论(0) 推荐(0)
摘要:前几天一直想引用别的DLL里面的一个图片。总是出现各种各样问题,一气之下将图片拷贝到当前Project中,运行良好。虽然知道引用图片,就1.2.列出来的2点就够了。1.The Build Action should be Resource instead of Embedded Resource.2... 阅读全文
posted @ 2014-05-07 17:04 太古月石 阅读(943) 评论(0) 推荐(0)
摘要:Nunit使用最近项目开始大量使用Nunit, 发现Nunit还是有很多好处的。1. 测试驱动逻辑,这样可以尽最大可能减少“修改”引入的Bug. 如果你修改了一些东西,导致Case跑不过。请检查你修改的逻辑。2. 写出来的代码会更符合测试方法。比如尽量把一些逻辑放入属性中,测试起来明朗很多。代码读起... 阅读全文
posted @ 2014-05-07 13:42 太古月石 阅读(373) 评论(0) 推荐(0)
摘要:group.Closing += (sender, e) => { try { Code here } ... 阅读全文
posted @ 2014-04-30 16:52 太古月石 阅读(170) 评论(0) 推荐(0)
摘要:最近这几天研究OpenXML:这是Open XML的一些介绍:Open XML介绍:http://baike.baidu.com/view/1201978.htm下载:http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c6e744... 阅读全文
posted @ 2014-04-14 14:51 太古月石 阅读(1365) 评论(0) 推荐(0)
摘要:http://blogs.msdn.com/b/adonet/archive/2010/07/19/absolue-beginners-guide-to-entity-framework.aspx?Redirected=true 阅读全文
posted @ 2014-03-29 22:56 太古月石 阅读(188) 评论(0) 推荐(0)
摘要:You can find their source code in codeplex at the ASP.NET source code.ExtendedMembershipProvider: http://aspnetwebstack.codeplex.com/SourceControl/cha... 阅读全文
posted @ 2014-03-24 10:58 太古月石 阅读(183) 评论(0) 推荐(0)
摘要:多线程访问WPF界面问题 阅读全文
posted @ 2014-03-19 13:57 太古月石 阅读(236) 评论(0) 推荐(0)
摘要:不同控件中拖拽数据 阅读全文
posted @ 2013-07-28 00:01 太古月石 阅读(4217) 评论(0) 推荐(0)