私はc#の初心者なので、愚かな質問をしたらすみません...
ここに私の問題があります:
- 「TabPage」から継承するクラス「ProtocolTabPage」があります。
- 「パネル」から継承する「コントロールパネル」があります。
- ProtocolTabPage によってインスタンス化された ControlPanel があります。
- 私のクラスは両方とも名前空間「AutoTestProtocols.Interface」にあります。
ProtocolTabPage[Design] に、次のエラーがあります。
「変数 'ProtocolPanel' は宣言されていないか、割り当てられていません。
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error (IDesignerSerializationManager マネージャ、文字列 exceptionText、文字列 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;"
どうしたの ?