摘要: 解决Lock之后 unlock 不了的问题1. DesignPanel.cs protected void DesignPanelPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)#region No Keyif (!_selectedElementDict.ContainsKey(currentElement)) { foreach (FrameworkElement element in _selectedElementDict.Keys) { if (element is CommonElement) { ( 阅读全文
posted @ 2012-04-10 19:17 quietwalk 阅读(836) 评论(0) 推荐(0) 编辑
摘要: BrushPanelBrushPanelusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Controls;using System.Reflection;using System.Windows.Media;using System.Windows.Shapes;using System.Windows;namespace Quietwalk{ public class BrushPanel { static StackPanel[] b 阅读全文
posted @ 2012-04-10 15:13 quietwalk 阅读(411) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;using System.Windows.Media;namespace Quietwalk{ public class NamedBrush { static NamedBrush[] nbrushes; Brush brush; public Brush Brush { get { return brush; } } string name; public string Name 阅读全文
posted @ 2012-04-10 14:11 quietwalk 阅读(2700) 评论(0) 推荐(0) 编辑
摘要: http://panjunlai.blog.163.com/blog/static/581903012010420780836/C#静态属性可以是读写属性,只读属性,只写属性中的任意一种。也就是说,静态属性可以同时包含set访问器和get访问器,也可以只包含其中一种。静态属性定义方式就是在属性前加static关键字,语法如下:<访问修饰符> static 数据类型 属性名{get{}set{}}静态访问器适用于整个类,而不是类的实例。静态属性中的set{},get{}访问器只能访问类的静态成员。静态属性可以通过类名访问,不能使用实例调用,这与静态方法相同。 阅读全文
posted @ 2012-04-10 13:55 quietwalk 阅读(9788) 评论(1) 推荐(1) 编辑
摘要: http://www.cnblogs.com/michaelxu/archive/2007/03/29/693401.html静态构造函数是C#的一个新特性,其实好像很少用到。不过当我们想初始化一些静态变量的时候就需要用到它了。这个构造函数是属于类的,而不是属于哪里实例的,就是说这个构造函数只会被执行一次。也就是在创建第一个实例或引用任何静态成员之前,由.NET自动调用。 class SimpleClass{// Static constructorstatic SimpleClass(){//}} 在使用静态构造函数的时候应该注意几点: 1、静态构造函数既没有访问修饰符,也没有参数。... 阅读全文
posted @ 2012-04-10 13:53 quietwalk 阅读(246) 评论(0) 推荐(0) 编辑