2015年12月25日

摘要: 我们都知道,const和static readonly的确很像:通过类名而不是对象名进行访问,在程序中只读等等。在多数情况下可以混用。二者本质的区别在于,const的值是在编译期间确定的,因此只能在声明时通过常量表达式指定其值。而static readonly是在运行时计算出其值的,所以还可以通过静... 阅读全文
posted @ 2015-12-25 12:08 飞在云端的石头 阅读(115) 评论(0) 推荐(0) 编辑

2015年12月24日

摘要: 1.添加托盘后发现托盘事件不能响应因此需要在主程序中添加一下代码 while (true) { Application.DoEvents(); }DoEvents会处理事件池中的事件,当然也可以另外开一个线程处理。2.查看任务... 阅读全文
posted @ 2015-12-24 11:12 飞在云端的石头 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1 internal class NotifyIconHelper 2 { 3 public NotifyIconHelper() 4 { 5 NOTIFY_ICON.Icon = new Icon(Environment.Curr... 阅读全文
posted @ 2015-12-24 10:31 飞在云端的石头 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1.导入dll [DllImport("user32.dll", EntryPoint = "ShowWindow", SetLastError = true)] private static extern bool ShowWindow(IntPtr hWnd, uin... 阅读全文
posted @ 2015-12-24 09:36 飞在云端的石头 阅读(927) 评论(0) 推荐(0) 编辑

2013年7月23日

摘要: using System.ComponentModel;using System.Runtime.CompilerServices;namespace Test{ public abstract class BindableBase : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected bool SetProperty(ref T storage, T value, ... 阅读全文
posted @ 2013-07-23 00:28 飞在云端的石头 阅读(171) 评论(0) 推荐(0) 编辑

2013年1月8日

摘要: DependencyObject1.1 CLR properties are basicProperty Requirements:n Change Notificationsn Default Valuesn Type Coercionn Data Bindingn Attached Propertiesn Validationn Inheritancen Styling 1.2DependencyObject and DependencyProperty fill gaps1.3Base class of many WPF types1.4Metadatel Default valuel 阅读全文
posted @ 2013-01-08 17:38 飞在云端的石头 阅读(110) 评论(0) 推荐(0) 编辑

导航