Example #1
0
 public Channel(String name, UInt16 number,Engine dad)
 {
     this.name = name;
     this.number = number;
     this.dad = dad;
 }
            public EngineControl(AEControl me,Engine e)
                : this()
            {
                Label label = new System.Windows.Forms.Label();
                me.Controls.Add(label);
                label.Text = e.name;
                label.AutoSize = true;
                label.Location = new System.Drawing.Point(39 + ((e.id - 1) * 120), 18);
                label.Name = e.name;
                label.Size = new System.Drawing.Size(31, 13);
                label.TabIndex = e.id;
                label.Text = e.name;
                foreach (Channel c in e.Channels.Values)
                {
                    ChannelButtons.Add(c.number, new ChannelButton(c,(AEControl) me));
                    this.Controls.Add(ChannelButtons[c.number]);
                }
                me.Controls.Add(this);
                this.SuspendLayout();
                this.Location = new System.Drawing.Point(39+((e.id-1)*120), 28);
                this.Name = e.name;
                this.Size = new System.Drawing.Size(115, 100);
                this.TabIndex = e.id;
                this.BackColor = System.Drawing.SystemColors.Desktop;
                this.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;

                this.PerformLayout();
            }