如何在所有表单中将表单继承为原始表单?

时间:2018-06-30 16:28:00

标签: c# winforms inheritance duplicates designer

此代码有什么问题,该代码在[forms] .Designer.cs中给出此错误,但是程序可以运行吗?

基本表单:

public partial class BaseForm : Form
{
    public DataSaveApp DataSaveApp;
    private List<Bell> Bells = new List<Bell>();

    public BaseForm()
    {
        InitializeComponent();
        skin.SkinFile = Environment.CurrentDirectory + @"\theme.ssk";
        skin.Active = true;
        skin.Enable3rdControl = false;
    }
}

Form1:

public partial class Frm1 : BaseForm
{
    public Frm1()
    {
        InitializeComponent();
    }
}

Form2:

public partial class Frm2 : BaseForm
{
    public Frm2()
    {
        InitializeComponent();
    }
}

Designer.cs中[Frm1,Frm2]中的错误消息

程序集中的类型名称重复。

See Screen Shot

0 个答案:

没有答案