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

📄 typeshortcutcollection.cs

📁 语音视频功能 里面实现了基本的QQ与语音对话
💻 CS
字号:
using System;
using System.Xml;
namespace gowk.GXF
{
	/// <summary>
	/// TypeShortcutCollection 的摘要说明。
	/// </summary>
	public class TypeShortcutCollection:System.Collections.Hashtable
	{
		private XmlDocument doc;
		public TypeShortcutCollection(XmlDocument doc)
		{
			this.XmlDocument=doc;
		}
		public string this[string shortcup]
		{
			get{return (string)base[shortcup];}
			set
			{
				if(value==null || value==string.Empty)
				{
					this.Remove(shortcup);
				}
				else
					base[shortcup]=value;
			}
		}
		public Type GetType(string shortcup)
		{
			System.Diagnostics.Trace.WriteLine("get type"+shortcup);
			if(shortcup=="GListView")
			{
				System.Diagnostics.Trace.WriteLine("get type"+shortcup);
			}
			return Type.GetType(this[shortcup]);
		}
		public void Add(string shortcup,string fullType)
		{
			base.Add(shortcup,fullType);
		}
		public void Add(string shortcup,Type type)
		{
			base.Add(shortcup,type.FullName);
		}
		public void Add(XmlNode node)
		{
			foreach(XmlNode sub in node.ChildNodes)
			{
				if(sub.Name.ToLower()=="add")
				{
					string shortcup=sub.Attributes["shortcup"].Value;
					string type=sub.Attributes["type"].Value;
					base.Add(shortcup,type);
				}
			}
		}
		public XmlDocument XmlDocument
		{
			get{return this.XmlDocument;}
			set
			{
				if(value==null)return;
				this.Clear();
				this.doc=value;
				XmlNode node=doc.SelectSingleNode(@"descendant::shortcuts");
				if(node!=null)
					this.Add(node);
			}
		}
	}
}

⌨️ 快捷键说明

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