86 Star 362 Fork 122

wxd_tony1984/DevelopAssistant

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
TextBoxBase.cs 2.14 KB
Copy Edit Raw Blame History
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/sqlorm/DevelopAssistant.git
git@gitee.com:sqlorm/DevelopAssistant.git
sqlorm
DevelopAssistant
DevelopAssistant
master

Search