2014年3月24日
摘要: There is no such thing like impossible in software development. Impossible just takes longer.I've investigated the problem. If there is really need for Flow Layout, it can be done with a bit of work. Since FlowLayoutPanel lays out the controls without particularly thinking about the number of ro 阅读全文
posted @ 2014-03-24 22:10 武胜-阿伟 阅读(293) 评论(0) 推荐(0) 编辑
摘要: have a problem with a FlowLayoutPanel and I don't know how to solve it.I'm placing two FlowLayoutPanels inside another; the second inner flp has 3 buttons inside.The properties from FlowLayoutPanel child are:FlowDirection=LeftToRight;AutoSize=true;AutoSizeMode=GrowAndShrink;WrapContents=true 阅读全文
posted @ 2014-03-24 22:09 武胜-阿伟 阅读(1106) 评论(0) 推荐(0) 编辑
摘要: Well, the easiest way would be to retain an explicit reference to the buttons you're adding. Otherwise you could add a tag to distinguish them (to be robust against i18n issues). E.g. you can set the tag of "button2" to "button2" and then you can use:foreach(Control ctl in fl 阅读全文
posted @ 2014-03-24 22:06 武胜-阿伟 阅读(163) 评论(0) 推荐(0) 编辑
摘要: For a FlowLayoutPanel, you don't need to specify a location since the controls are arranged for you. Just change "this" to the name of your FlowLayoutPanel:for (int i = 0; i < 5; i++){ Button button = new Button(); button.Tag = i; flowLayoutPanel1.Controls.Add(button);}////Populatin 阅读全文
posted @ 2014-03-24 22:03 武胜-阿伟 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 跨AppDomain通信有两种方式 1.Marshal By reference : 传递引用 2.Marshal By Value : 把需要传递的对象 通过序列化反序列化的方式传递过去(值拷贝) 只有标记为 可序列化 Serializable 的类才能通过 Marshal By Value的方式通信以下代码描述了几种跨域通信的情况1.AppDomain是CLR的内部行为,windows完全不清楚有AppDomain的存在2.在新的域中加载Assembly和Type最好用完整限定名(如果直接加载Type, CLR会自动加载Type所在的和所用到的Assembly)3.默认情况下新建... 阅读全文
posted @ 2014-03-24 21:54 武胜-阿伟 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 应用程序域(AppDomain)已经不是一个新名词了,只要熟悉.net的都知道它的存在,不过我们还是先一起来重新认识下应用程序域吧,究竟它是何方神圣。应用程序域 众所周知,进程是代码执行和资源分配的最小单元,每个进程都拥有独立的内存单元,而进程之间又是相互隔离的,自然而然,进程成为了代码执行的安全边界。 一个进程对应一个应用程序是一个普遍的认知,而.net却打破了这一惯例,因为它带来了应用程序域这一全新的概念,CLR可使用应用程序域来提供应用程序 之间的隔离,而一个进程中可以运行多个应用程序域,也就是说只要使用应用程序域,我们可以在一个进程中运行多个应用程序,而不会造成进程间调用或进程间切 换 阅读全文
posted @ 2014-03-24 21:38 武胜-阿伟 阅读(334) 评论(0) 推荐(0) 编辑