Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
0
 public bool OneGroupResized(GroupControl group)
 {
     if (!this.Controls.Contains((Control)group))
     {
         return(false);
     }
     this.ReAlignControls();
     return(true);
 }
Beispiel #4
0
 public bool RemoveGroup(GroupControl group)
 {
     if (!this.Contains((Control)group))
     {
         return(false);
     }
     this.Controls.Remove((Control)group);
     if (group.ContainsFocus)
     {
         this.mParent.ActiveControl = this.mParent.mSearchTextBox;
     }
     this.ReAlignControls();
     return(true);
 }
Beispiel #5
0
        public bool AddNewGroup(GroupControl newGroup)
        {
            if (newGroup == null)
            {
                return(false);
            }
            if (!this.Contains((Control)newGroup))
            {
                this.Controls.Add((Control)newGroup);
            }
            int newIndex = -1;

            foreach (GroupControl group in this.Groups)
            {
                if (this.Contains((Control)group))
                {
                    ++newIndex;
                    this.Controls.SetChildIndex((Control)group, newIndex);
                }
            }
            this.ReAlignControls();
            return(true);
        }