public static void GenerateForm(UserControl userControl, string title, Form parentForm) { var defaultForm = new DefaultForm(); defaultForm.Height = userControl.Height + 70; defaultForm.Width = userControl.Width + 15; defaultForm.Controls.Add(userControl); defaultForm.Text = title; userControl.Dock = DockStyle.Fill; defaultForm.CustomShow(parentForm); }
/// <summary> /// initialize elements /// </summary> public override void InitElements() { Form = new DefaultForm(); Form.Parent = this; Header = new DefaultHeader(); Header.Parent = this; Footer = new DefaultFooter(); Footer.Parent = this; Detail = new DefaultInstructionsDetail(); Detail.Parent = this; TestResponseSummary = new DefaultResponseSummaryForm(); TestResponseSummary.Parent = this; TestList = new List <TestTypeForm>(); }
public void LoadNode() { DefaultForm.Load(); // DefaultView.Load(); //foreach (var form in SideForms.Values) //{ // form.Load(); //} //foreach (var view in SideViews.Values) //{ // //view.Load(); //} }
public static void ShowImagePopup(Image image) { if (image == null) { return; } var imageForm = new DefaultForm(); var pictureEdit = new PictureEdit(); var adjustImage = AdjustSize(image.Width, image.Height); pictureEdit.Image = image; pictureEdit.Properties.SizeMode = PictureSizeMode.Squeeze; pictureEdit.Dock = DockStyle.Fill; imageForm.Controls.Add(pictureEdit); imageForm.Width = adjustImage.Key; imageForm.Height = adjustImage.Value; imageForm.Show(); }