Я новичок в C #, поэтому прошу прощения, если я задаю глупые вопросы ...
Вот моя проблема:
- У меня есть класс "ProtocolTabPage", который наследуется от "TabPage".
- У меня есть «ControlPanel», которая наследуется от «Panel».
- У меня есть ControlPanel, созданный моим ProtocolTabPage.
- Оба моих класса находятся в пространстве имен "AutoTestProtocols.Interface".
В ProtocolTabPage [Design] у меня появляются следующие ошибки:
"Переменная 'ProtocolPanel' либо необъявлена, либо никогда не назначалась.
в System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error (менеджер IDesignerSerializationManager, String exceptionText, String helpLink)
в System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression (менеджер IDesignerSerializationManager, имя строки, выражение CodeExpression)
в System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression (менеджер IDesignerSerializationManager, имя строки, выражение CodeExpression)
в System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement (менеджер IDesignerSerializationManager, инструкция CodeStatement) "
Хотя в моем ProtocolTabPage.Designer у меня есть
[...]
this.ProtocolPanel = new AutoTestProtocols.Interface.ControlPanel();
[...]
this.splitContainer1.Panel2.Controls.Add(this.ProtocolPanel);
[...]
this.ProtocolPanel.AutoScroll = true;
this.ProtocolPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.ProtocolPanel.Location = new System.Drawing.Point(0, 0);
this.ProtocolPanel.Name = "ProtocolPanel";
this.ProtocolPanel.Size = new System.Drawing.Size(696, 700);
this.ProtocolPanel.TabIndex = 0;
[...]
private AutoTestProtocols.Interface.ControlPanel ProtocolPanel;"
Что не так?