摘要:1.mp3播放器:工具箱中右键,在弹出的菜单中选择“选择项”,添加“com组件”,选择名称“windows Media Player",点击确定就会在工具箱新增一个“windows Media Player"控件。程序中隐藏到了wf本身的边框,用picturebox实现移动无边框窗体效果,通过定时器实时更新进度条,最后理解控件playState的几种状态就没有什么了。 #region 移动无边框窗体 private void pictureBox3_MouseDown(object sender, MouseEventArgs e) { in...
阅读全文
摘要:1 namespace SportsStore.Domain.Concrete { 2 3 public class EmailSettings { 4 public string MailToAddress = "orders@example.com"; 5 public string MailFromAddress = "sportsstore@example.com"; 6 public bool UseSsl = true; 7 public string Username = "MySmtpUsername"...
阅读全文
摘要:winform异步进度条LongTime,运用到回调函数定义事件的参数类:namespace LongTime.Business{ // 定义事件的参数类 public class ValueEventArgs : EventArgs { public int Value { set; get;} } // 定义事件使用的委托 public delegate void ValueChangedEventHandler( object sender, ValueEventArgs e); class LongTimeWork...
阅读全文
摘要:如下.IList接口可以使用更多的方法.比如你看一个集合是否包含相应实体,IEnumerable不行,而IList里有Contains,相应的实现了IList的可以添加,删除相应实体.而IEnumerable不行.但是这不是说IList就比IEnumerable好,就是因为IList实现的功能多.相对来说限制大了,你看Object.任何类都可用作Object.这就是因为他简单.同理.能为IList表达的数据集.一定能为IEnumerable表达.而能为IEnumerable表达不一定能为IList表达.你可以想想Linq To Object里的方法为什么是对IEnumerable接口了而不是选
阅读全文
摘要:图片生成webhandler水印,主要把水印的信息和位置post到webhandler去处理,返回后再div上显示前台传递水印的信息和位置: /***********提取DIV属性****************/ var offsetLeft = 0; var offsetTop = 0; function exc() { offsetLeft= document.getElementById("d_panel").offsetLeft; offsetTop = document.getElementById...
阅读全文
摘要:C# List Examplesby Sam Allen - Updated September 6, 2009Problem. You have questions about the List collection in the .NET Framework, which is located in the System.Collections.Generic namespace. You want to see examples of using List and also explore some of the many useful methods it provides, maki
阅读全文