Пример #1
0
        private void addInfoGroup()
        {
            InfoGroup = (GroupControl) new GroupControl(this.mGroupPane);
            InfoGroup.DrawBoundary = true;
            InfoGroup.Populate(new cmnGroupData()
            {
                msGroupName = "Information"
            });

            InfoGroup.Name     = "CommandInfo";
            InfoGroup.Location = new Point(20, 38);
            //InfoGroup.Width = mGroupPane.Width;
            InfoGroup.Height = 350;// groupControl.RestoredHeight;

            this.mGroupPane.AddNewGroup(InfoGroup);
            CommandInfo = new RichTextBox()
            {
                Location = new Point(16, 28),
                //Width = this.Width - 20,
                BackColor   = this.BackColor,
                ReadOnly    = true,
                BorderStyle = System.Windows.Forms.BorderStyle.None
            };
            CommandInfo.Text         = StartupText;
            CommandInfo.LinkClicked += CommandInfo_LinkClicked;
            CommandInfo.TextChanged += CommandInfo_TextChanged;
            InfoGroup.Controls.Add(CommandInfo);
        }
Пример #2
0
        public bool Populate(cmnControlData cdata)
        {
            if (cdata == null)
            {
                return(false);
            }
            this._mGroups = new ArrayList();
            this.SuspendLayout();
            int num = 0;

            foreach (cmnGroupData group in cdata.GroupList)
            {
                System.Type  type         = group.GetType();
                GroupControl groupControl = (GroupControl) new ButtonGroupCtrl(this);
                if (groupControl.Populate(group))
                {
                    groupControl.Left   = 20;
                    groupControl.Top    = num;
                    groupControl.Width  = this.Width;
                    groupControl.Height = groupControl.RestoredHeight;
                    this.Groups.Add(groupControl);
                    this.Controls.Add(groupControl);
                    num = groupControl.Bottom + GroupsPane.GROUP_VERT_SPACE;
                }
                else
                {
                    break;
                }
            }
            this.ReAlignControls();
            this.ResumeLayout(true);
            return(true);
        }