1 Star 0 Fork 122

Protear/DevelopAssistant

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
TextBoxBase.cs 2.14 KB
一键复制 编辑 原始数据 按行查看 历史
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ICSharpCode.WinFormsUI.Controls
{
[ToolboxItem(false)]
public partial class TextBoxBase : UserControl
{
protected string text = "";
protected string version = "1.0.0";
protected bool editModel = false;
protected DocumentType documentType = DocumentType.Text;
public override string Text
{
get
{
return text;
}
set
{
text = value;
}
}
public virtual DocumentType DocumentType
{
get { return documentType; }
set
{
documentType = value;
}
}
public virtual bool EditModel
{
get { return editModel; }
set { editModel = value; }
}
public virtual void OnPropertyChanged()
{
}
public void ShowAbout()
{
var control = this.Parent;
var baseType = control.GetType().BaseType;
if (baseType.Name == "TextBoxBase")
{
control = control.Parent;
baseType = control.GetType().BaseType;
}
if (baseType.Name == "Control")
{
control = control.Parent;
baseType = control.GetType().BaseType;
}
if (baseType.Name == "BaseForm")
{
AboutForm about = new AboutForm();
about.ShowDialog(control);
}
else if (baseType.Name == "DockContent")
{
MessageBox.Show(this, "当前版本号:" + version + " ", "关于", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
public TextBoxBase()
{
InitializeComponent();
}
public virtual void ReleaseDispose()
{
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/Protear/DevelopAssistant.git
git@gitee.com:Protear/DevelopAssistant.git
Protear
DevelopAssistant
DevelopAssistant
master

搜索帮助