I'm new to C #, so please excuse me if I ask stupid questions ...
Here is my problem:
- I have a class "ProtocolTabPage" that inherits from "TabPage".
- I have a "ControlPanel" that inherits from the "Panel".
- I have a ControlPanel created using ProtocolTabPage.
- Both of my classes are in the namespace "AutoTestProtocols.Interface".
In ProtocolTabPage [Design], I have the following errors:
The "ProtocolPanel" variable is either not declared or has never been assigned.
in System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error (manager IDesignerSerializationManager, String exceptionText, String helpLink) in System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression name (IDesignerSerializationManager Codeponent name, Manager code, String .Serialization.CodeDomSerializerBase.DeserializeExpression (IDesignerSerializationManager manager, String name, CodeExpression expression) in System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement (IDesignerSerializationManager manager, CodeStatement operator) "
Although in my protocol ProtocolTabPage.Designer I have
[...]
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;"
What's wrong?
Chris
source
share