private void loadGM(String path)
{
//mygroups is an arraylist of arraylists of the input from a DG file
ArrayList myGruops = this.tabPage1.LoadGroup(path);
object[] test = (object[])myGruops[0];
ArrayList tmp = ArrayList.Adapter(test);
this.tabPage1.LoadGroup(path, tmp);
CharTabPage tabPage = null;
for (int i = 1; i < myGruops.Count; i++)
{
test = (object[])myGruops[i];
tmp = ArrayList.Adapter(test);
int lineCount = tmp.Count;
tabs++;
tabPage = null;
switch (lineCount)
{
case 1: tabPage = new MyControlLibrary.CharTabPage(this.components, 3);
tabPage.Location = new System.Drawing.Point(4, 28);
tabPage.Menu = this.contextMenuStrip1;
tabPage.Name = "New Group " + tabs;
tabPage.Size = new System.Drawing.Size(816, 288);
tabPage.TabIndex = tabs;
tabPage.Text = "New Group " + tabs;
this.userControl11.Controls.Add(tabPage);
break;
case 2: tabPage = new MyControlLibrary.CharTabPage(this.components, 2);
tabPage.Location = new System.Drawing.Point(4, 28);
tabPage.Menu = this.contextMenuStrip1;
tabPage.Name = "New Group " + tabs;
tabPage.Size = new System.Drawing.Size(816, 288);
tabPage.TabIndex = tabs;
tabPage.Text = "New Group " + tabs;
this.userControl11.Controls.Add(tabPage);
break;
case 3: tabPage = new MyControlLibrary.CharTabPage(this.components, 1);
tabPage.Location = new System.Drawing.Point(4, 28);
tabPage.Menu = this.contextMenuStrip1;
tabPage.Name = "New Group " + tabs;
tabPage.Size = new System.Drawing.Size(816, 288);
tabPage.TabIndex = tabs;
tabPage.Text = "New Group " + tabs;
this.userControl11.Controls.Add(tabPage);
break;
case 4: tabPage = new MyControlLibrary.CharTabPage(this.components, 0);
tabPage.Location = new System.Drawing.Point(4, 28);
tabPage.Menu = this.contextMenuStrip1;
tabPage.Name = "New Group " + tabs;
tabPage.Size = new System.Drawing.Size(816, 288);
tabPage.TabIndex = tabs;
tabPage.Text = "New Group " + tabs;
this.userControl11.Controls.Add(tabPage);
break;
default: tabPage = (CharTabPage)this.userControl11.TabPages[0]; break;
}//end of switch
tabPage.LoadGroup(path, tmp);
}//end of for
}