📄 geditbase.cs
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
namespace gowk.controls
{
/// <summary>
/// GEditBase 的摘要说明。
/// </summary>
public abstract class GEditBase:GPanel
{
private System.Windows.Forms.Control editControl;
public GEditBase(Control control)
{
this.EditControl=control;
this.DockPadding.All=3;
}
public override string Text
{
get
{
return this.editControl.Text;
}
set
{
this.editControl.Text=value;
}
}
protected Control EditControl
{
get{return this.editControl;}
set
{
if(value==null)
{
this.editControl=value;return;
}
base.BackColor=value.BackColor;
this.editControl=value;
this.Controls.Add(this.editControl);
this.editControl.Dock=DockStyle.Fill;
this.editControl.BringToFront();
}
}
/*
public virtual new int Height
{
get{return base.Height;}
set
{
if(value<this.editControl.Height+2)return;
base.Height=value;
this.editControl.Top=(int)((value-this.editControl.Height)/2);
}
}
public virtual new int Width
{
get{return base.Width;}
set
{
try
{
if((value!=base.Width) && (value>12))
{
base.Width=value;
this.editControl.Width=value-12;
}
}
catch(System.Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}*/
public override Color BackColor
{
get
{
return base.BackColor;
}
set
{
if(base.BackColor!=value)
{
base.BackColor = value;
if(this.editControl!=null)
this.editControl.BackColor=value;
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -