public void getForm() { int offsetY = 30, offsetX = 10; Form f = new Form(); f.Height = 150; f.Width = 400; f.WindowState = FormWindowState.Normal; f.Text = "Смещение"; f.StartPosition = FormStartPosition.CenterScreen; f.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; f.AutoSize = true; System.Drawing.Point insPt = new System.Drawing.Point(5, 5); InterfaceDll.Lbl lbs = new Lbl(offsetX, offsetY, 100, 15, insPt, f, "Дистанция"); InterfaceDll.CB cbs = new CB(offsetX, offsetY, 200, 15, insPt, f); cbs.position(lbs.last(), true); //cbs.last().Items.AddRange(new[] { "2.65", "2.8", "3", "4.5", "6" }); ComponentOccurrence occ = ss[1] as ComponentOccurrence; if (occ == null) { return; } ins = occ.Constraints[1] as InsertConstraint; if (ins == null) { return; } cbs.last().Text = last(ins.Distance); InterfaceDll.Btn btns = new Btn(offsetX, offsetY, 100, 20, insPt, f, click, "Добавить"); btns.center(cbs.last(), offsetY + 5); f.Show(); }