我的.designer
内部有一个InitializeComponent(),如下所示:
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(accountcreator));
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.status = new System.Windows.Forms.ToolStripStatusLabel();
this.total = new System.Windows.Forms.NumericUpDown();
this.start = new System.Windows.Forms.Button();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.total)).BeginInit();
this.SuspendLayout();
我删除了剩下的部分,因为它是一个长文件,无论如何,当我点击我的表单时:
它是空白的,我收到以下错误:
严重级代码描述项目文件行抑制状态 错误CS0121以下方法或之间的调用不明确 属性:' accountcreator.InitializeComponent()'和 ' accountcreator.InitializeComponent()'
每当我双击我的表格时,在最底部,还有另一个功能:
private void InitializeComponent()
{
this.SuspendLayout();
//
// accountcreator
//
this.ClientSize = new System.Drawing.Size(284, 261);
this.Name = "accountcreator";
this.Load += new System.EventHandler(this.accountcreator_Load_5);
this.ResumeLayout(false);
}
但每当我删除它时,它会继续生成相同的函数并且不允许我生成,我如何在file.designer.cs中使用initialize函数而不是在file.cs中继续生成的函数?< / p>