⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glistviewitem.cs

📁 语音视频功能 里面实现了基本的QQ与语音对话
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Diagnostics;

namespace gowk.controls
{
	[Serializable,
	TypeConverter( typeof( ExpandableObjectConverter ) ),]
	public class GListViewItem
	{
		string text;
		object tag;
		bool visible=true;
		internal bool expanded;
		GImage gImage;
		GImage backGroundImage;
	//	Rectangle infactRect;
	//	Rectangle perspectRect;
	//	Rectangle itemRect;
		internal GListView gListView;
		internal GListViewItem parent;
		GListViewItemCollection items;
		View view;
		bool fixedSize;
		//	int item_height=18;
		Orientation orientation=Orientation.Vertical;
		public GListViewItem()
		{
			this.gImage=new GImage();
			this.backGroundImage=new GImage();
			items=new GListViewItemCollection(this);
			items.Parent=this;
		}
		public GImage GImage
		{
			get{return this.gImage;}
			set{this.gImage=value;}
		}
		public GImage BackGroundImage
		{
			get{return this.backGroundImage;}
			set{this.backGroundImage=value;}
		}
		#region property
		[System.ComponentModel.Editor(typeof(GListViewItemCollectionEditor),typeof(System.Drawing.Design.UITypeEditor)), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
		public GListViewItemCollection Items
		{
			get{return items;}
			set{this.Items=value;}
		}
		/*			public int Height
						{
							get{return this.item_height;}
							set{this.item_height=value;}
						}*/
		public View View
		{
			get{return this.view;}
			set{this.view=value;}
		}
		public Orientation Orientation
		{
			get{return this.orientation;}
			set{this.orientation=value;}
		}
		public bool FixedSize
		{
			get{return this.fixedSize;}
			set{this.fixedSize=value;}
		}
		[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public GListViewItem Parent
		{
			get{return this.parent;}
			set{this.parent=value;}
		}
		[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public GListView GListView
		{
			get{return this.gListView;}
			set{this.gListView=value;}
		}
		public string Text
		{
			get{return text;}
			set
			{
				if(this.text==value)return;
				text=value;
				if(this.gListView!=null)
				{
					this.gListView.OnItemTextChanged(new ItemEventArgs(this));
				}
			}
		}
		#region
	/*	public Rectangle InfactRect
		{
			get{return this.infactRect;}
			set{this.infactRect=value;}
		}
		public Rectangle PerspectRect
		{
			get{return this.perspectRect;}
			set{this.perspectRect=value;}
		}
		public Rectangle ItemRect
		{
			get{return this.itemRect;}
			set{this.itemRect=value;}
		}
		*/
		#endregion
		public object Tag
		{
			get{return this.tag;}
			set{tag=value;}
		}
		public bool Visible
		{
			get{return visible;}
			set
			{
				if(this.visible==value)return;
				visible=value;
				if(this.GListView!=null)
				{
					this.GListView.OnItemVisibleChanged(new ItemEventArgs(this));
				}
			}
		}
		public virtual bool Expanded
		{
			get{return expanded;}
			set
			{
				if(this.expanded==value)return;
				try
				{
					this.expanded=value;
					if(this.GListView!=null && (this.Items.Count>0||this.Parent==null))
					{
						this.GListView.OnItemExpanded(new ItemEventArgs(this));
					}
				}
				catch(System.Exception ex)
				{
					System.Diagnostics.Debug.Assert(false,ex.Message);
				}
			}
		}

		#endregion
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -