uibase.cs
来自「语音视频功能 里面实现了基本的QQ与语音对话」· CS 代码 · 共 48 行
CS
48 行
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Xml;
using System.Reflection;
namespace gowk.utility.ui
{
public abstract class UIBase
{
XmlNode node;
public UIBase(XmlNode node)
{
this.node=node;
}
public abstract Control Create();
protected void SetAttribute(Control c)
{
foreach(System.Xml.XmlAttribute at in this.node.Attributes)
{
string name=at.Name.Trim().ToLower();
string value=at.Value.Trim();
switch(name)
{
case "width":
c.Width=int.Parse(a);
break;
case "height":
}
if(at.Name.ToLower=="actionlistenner")
{
Type t=c.GetType();
t.InvokeMember(at.Name,BindingFlags.SetProperty|BindingFlags.Instance|BindingFlags.IgnoreCase|BindingFlags.Public,c,new object[]{
}
else
{
}
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?