public static LionResource startPageToResource(startPage startPage) { string moduleName = ""; string url = ""; string resourceName = ""; bool get = false; bool post = false; bool put = false; bool delete = false; bool getSingle = false; List <LionDataField> dataFields = new List <LionDataField>();; foreach (Control control in startPage.Controls) { if (control.Name == "resourceNameTextBox") { resourceName = ((TextBox)control).Text; } if (control.Name == "moduleComboBox") { moduleName = ((ComboBox)control).Text; } if (control.Name == "urlTextBox") { url = ((TextBox)control).Text; } if (control.Name == "getCheckBox") { get = ((CheckBox)control).Checked; } if (control.Name == "postCheckBox") { post = ((CheckBox)control).Checked; } if (control.Name == "putCheckBox") { put = ((CheckBox)control).Checked; } if (control.Name == "deleteCheckBox") { delete = ((CheckBox)control).Checked; } if (control.Name == "getSingleCheckBox") { getSingle = ((CheckBox)control).Checked; } if (control.Name == "listPanel") { foreach (Control dataPanel in ((Panel)control).Controls) { if (dataPanel.Name.Contains("rowPanel")) { dataFields.Add(dataPanelToDataField((Panel)dataPanel)); } } } } return(new LionResource(moduleName, url, resourceName, get, post, put, delete, getSingle, dataFields)); }
public void showMain() { startPage1 = new startPage(this); startPage1.TopLevel = false; startPage1.FormBorderStyle = FormBorderStyle.None; panel1.Controls.Add(startPage1); panel1.Visible = true; startPage1.Show(); }
public MainPage() { InitializeComponent(); main = new GamePage(this); main.TopLevel = false; main.FormBorderStyle = FormBorderStyle.None; panel1.Controls.Add(main); startPage1 = new startPage(this); startPage1.TopLevel = false; startPage1.FormBorderStyle = FormBorderStyle.None; panel1.Controls.Add(startPage1); panel1.Visible = true; startPage1.Show(); }
public ChooseSize(startPage start) { InitializeComponent(); s = start; }