public MyTabControl Create(int beginline, int endline, string[] lines) { MyTabControl o = new MyTabControl(); string key = "Begin TabDlg.SSTab "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); // tab pages int tabPageNum = Int16.Parse(VBtoNET.GetProperty("Tabs", beginline, endline, lines)); for (int i = 0; i < tabPageNum; i++) { MyTabpage page = new MyTabpage(); page.General = new General(); page.General.Name = o.General.Name + "TabPage" + i.ToString(); page.General.Text = VBtoNET.GetProperty("TabCaption(" + i.ToString() + ")", beginline, endline, lines); page.Padding = 3; page.General.Tabindex = i.ToString(); page.UseVisualStyleBackColor = true; // these needs to be fixed a bit, i'm not sure what the size and location should be page.General.Locationx = "4"; page.General.Locationy = "22"; int sizex = Int16.Parse(o.General.Sizex) - 8; int sizey = Int16.Parse(o.General.Sizey) - 26; page.General.Sizex = sizex.ToString(); page.General.Sizey = sizey.ToString(); o.tabList.Add(page); } o.ControlNameMap = PopulateControlNamesList(beginline, endline, lines, o.tabList); return(o); }
public MyRadioButton Create(int beginline, int endline, string[] lines) { MyRadioButton o = new MyRadioButton(); string key = "Begin VB.OptionButton "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); return(o); }
public MyCombobox Create(int beginline, int endline, string[] lines) { MyCombobox o = new MyCombobox(); string key = "Begin MSDBCtls.DBCombo "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); return(o); }
public MyGroupBox Create(int beginline, int endline, string[] lines) { MyGroupBox o = new MyGroupBox(); string key = "Begin VB.Frame "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); return(o); }
public MyCheckbox CreateCheckbox(int beginline, int endline, string[] lines) { MyCheckbox o = new MyCheckbox(); string key = "Begin VB.CheckBox "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); o.UseVisualStyleBackColor1 = true; return(o); }
public MyCombobox Create(int beginline, int endline, string[] lines) { MyCombobox o = new MyCombobox(); string key = "Begin MSDBCtls.DBCombo "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); o.dataSource = VBtoNET.GetProperty("DataSource", beginline, endline, lines); o.dataField = VBtoNET.GetProperty("DataField", beginline, endline, lines); return(o); }
public MyButton CreateButton(int beginline, int endline, string[] lines) { MyButton o = new MyButton(); o.General = VBtoNET.PopulateGeneral("Begin VB.CommandButton ", lines, beginline, endline); if (String.IsNullOrEmpty(o.General.Text)) { o.General.Text = o.General.Name; } o.UseVisualStyleBackColor1 = true; return(o); }
public MyDatagridview Create(int beginline, int endline, string[] lines) { MyDatagridview o = new MyDatagridview(); string key = "Begin MSDBGrid.DBGrid "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); if (String.IsNullOrEmpty(o.General.Text)) { o.General.Text = o.General.Name; } int sizex = Int16.Parse(o.General.Sizex); o.General.Sizex = sizex.ToString(); return(o); }
public MyListbox Create(int beginline, int endline, string[] lines) { MyListbox o = new MyListbox(); if (lines[beginline].Contains("MSDBCtls.DBList ")) { o.General = VBtoNET.PopulateGeneral("Begin MSDBCtls.DBList ", lines, beginline, endline); } else { o.General = VBtoNET.PopulateGeneral("Begin VB.ListBox ", lines, beginline, endline); } return(o); }
public MyLabel Create(int beginline, int endline, string[] lines) { MyLabel o = new MyLabel(); string key = "Begin VB.Label "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); if (String.IsNullOrEmpty(o.General.Text)) { o.General.Text = o.General.Name; } int sizex = Int16.Parse(o.General.Sizex); sizex += 10; // the font or size is a bit off in the conversion o.General.Sizex = sizex.ToString(); return(o); }
public MyTextbox Create(int beginline, int endline, string[] lines) { MyTextbox o = new MyTextbox(); string key = "Begin VB.TextBox "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); string multi = VBtoNET.GetProperty("MultiLine", beginline, endline, lines); if (multi.Contains("-1")) { o.Multiline = true; } o.dataSource = VBtoNET.GetProperty("DataSource", beginline, endline, lines); o.dataField = VBtoNET.GetProperty("DataField", beginline, endline, lines); return(o); }
public MyTabControl Create(int beginline, int endline, string[] lines) { MyTabControl o = new MyTabControl(); string key = "Begin TabDlg.SSTab "; o.General = VBtoNET.PopulateGeneral(key, lines, beginline, endline); // tab pages string tabPageNumStr = VBtoNET.GetProperty("Tabs", beginline, endline, lines); int tabPageCount = 0; if (tabPageNumStr == "") { bool foundTab = true; // can't find the tabs property for (int tabnum = 0; tabnum < 20; tabnum++) { if (!foundTab) { break; } for (int i = beginline; i < endline; i++) { string s = lines[i]; if (s.Contains("Tab(" + tabnum.ToString())) { tabPageCount++; break; } if (i == endline - 1) { foundTab = false; break; } } } } else { tabPageCount = Int16.Parse(tabPageNumStr); } for (int i = 0; i < tabPageCount; i++) { MyTabpage page = new MyTabpage(); page.General = new General(); page.General.Name = o.General.Name + "TabPage" + i.ToString(); page.General.Text = VBtoNET.GetProperty("TabCaption(" + i.ToString() + ")", beginline, endline, lines); page.Padding = 3; page.General.Tabindex = i.ToString(); page.UseVisualStyleBackColor = true; // these needs to be fixed a bit, i'm not sure what the size and location should be page.General.Locationx = "4"; page.General.Locationy = "22"; int sizex = Int16.Parse(o.General.Sizex) - 8; int sizey = Int16.Parse(o.General.Sizey) - 26; page.General.Sizex = sizex.ToString(); page.General.Sizey = sizey.ToString(); o.tabList.Add(page); } o.ControlNameMap = PopulateControlNamesList(beginline, endline, lines, o.tabList); return(o); }