摘要: MouseDownFilter mouseFilter = new MouseDownFilter(); Application.AddMessageFilter(mouseFilter); class MouseDownFilter:IMessageFilter { public bool PreFilterMessage(ref Message m) { if (m.Msg==0x201) { return true; } else { return false; } } } 阅读全文
posted @ 2013-05-14 19:35 Predator 阅读(116) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConTest{ class Pan { public string Name { get; set; } public double Price { get; set; } public int Total { get; set; } /// <summary> /// 深圳平底锅的价格信息 /// </summary> public static Pan SZ { get { retu 阅读全文
posted @ 2013-05-14 19:34 Predator 阅读(163) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Runtime;using System.ComponentModel;using System.Collections.Generic;using System.Linq;using System.Text;namespace UCTest{ class Student { /// <summary> /// 学生姓名 /// </summary> [Category("学生基本信息")] [Browsable(true)] [DisplayName("姓名")] [Descr 阅读全文
posted @ 2013-05-14 19:33 Predator 阅读(134) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;namespace ClassLibrary1{ public class Class1 { private Dictionary<string, ListView> allListViews; public Class1() { allListViews = new Dictionary<string, ListView>(); } public sta 阅读全文
posted @ 2013-05-14 19:32 Predator 阅读(119) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections; namespace ConsoleEnum{ class Host { private const string DATA_ROOT_PTAH=@"..\..\data"; public Student Student { get; set; } public virtual Instrument Instrument { get { return new Instrument() { ID = 1021, Symbol = "IF1309(玻璃)", }; } } publi 阅读全文
posted @ 2013-05-14 19:31 Predator 阅读(143) 评论(0) 推荐(0) 编辑
摘要: var objs=new object[]{new People(),new People(),new People(),}; foreach (var item in objs) { Console.WriteLine(item.GetHashCode()); } Car car = new Car() { Name = "W", Numbers = 10, }; Car[]cars = new Car[]{ new Car(){Name="Gan", Numbers=10,}, new Car(){Name="Quan",Numb 阅读全文
posted @ 2013-05-14 19:30 Predator 阅读(161) 评论(0) 推荐(0) 编辑
摘要: //两种方法获取的类型都是一样的 car car = new car(); Console.WriteLine(car.GetType()); Console.WriteLine(typeof(car)); Console.Read(); 阅读全文
posted @ 2013-05-14 19:29 Predator 阅读(106) 评论(0) 推荐(0) 编辑
摘要: this.listSelectObjects.Clear(); foreach (var item in TradeModelManager.Instance.DescriptolList) { this.listSelectObjects.Add(new SelectObject(item.Name,item)); } TreeNode node = this.SelectedItem as TreeNode; if (node!=null) { bool flag = false; foreach (var item in TradeModelManager.Instance.Descri 阅读全文
posted @ 2013-05-14 19:28 Predator 阅读(97) 评论(0) 推荐(0) 编辑