private void acceptSet_Click(object sender, EventArgs e) { Label pL = (Label)sender; if ((int)pL.Tag == 0) { if (input_info[4].textBox.Text == "") { CloseLink(data_Pool.data_Type); data_Pool.data_Type = 0; } else { data_Pool.data_Type = _link; data_Pool.data_UserName = input_info[0].textBox.Text; data_Pool.data_Pasword = input_info[1].textBox.Text; data_Pool.data_connectionIP = input_info[2].textBox.Text; data_Pool.data_DataName = input_info[3].textBox.Text; data_Pool.data_SQL = inputSQL.textBox.Text; Sql_Select = inputSQL.textBox.Text; } RBuild_Info.Set_CompositeLocation(); } setData_Form._formObject.Close(); }
private void acceptSet_Click(object sender, EventArgs e) { Label pL = (Label)sender; if ((int)pL.Tag == 1) { _pgselect = _record; setPage_Form._formObject.Close(); } else { for (int i = 0; i < 4; i++) { page_TypeFace.Page_Margin[i] = int.Parse(input_Margin[i].textBox.Text.Trim()); } page_TypeFace.Page_Type = _pgselect; if ((_record != _pgselect) || (input_def[0].textBox.Text != page_TypeFace.Rect_mm[0]) || (input_def[1].textBox.Text != page_TypeFace.Rect_mm[1]) || (page_TypeFace.Page_Direction != _pgdirect)) { RBuild_Info.Set_DefaultInfo(); DraggableObjects.Clear(); control_Num = -1; page_Container.VerticalScroll.Value = 0; page_Container.HorizontalScroll.Value = 0; if (_pgselect == -1) { page_TypeFace.Page_Area.Width = (int)Math.Floor(int.Parse(input_def[0].textBox.Text) * 3.779527559055118); page_TypeFace.Page_Area.Height = (int)Math.Floor(int.Parse(input_def[1].textBox.Text) * 3.779527559055118) + 13 + 126; page_TypeFace.Rect_mm[0] = input_def[0].textBox.Text; page_TypeFace.Rect_mm[1] = input_def[1].textBox.Text; } else { Set_PrintPageType(_pgselect, _pgdirect); page_TypeFace.Rect_mm[0] = ""; page_TypeFace.Rect_mm[1] = ""; } // 设置预览页面大小 PreViewPage_Area = new Size(page_TypeFace.Page_Area.Width, page_TypeFace.Page_Area.Height - 126);// 去掉-126 int height = 120; int ly = 0; for (int i = 0; i < 3; i++) { if (i == 0) { height = 120; ly = 0; } else if (i == 1) { height = 250; ly = 128; } else if (i == 2) { height = 120; ly = page_TypeFace.Page_Area.Height - height; } DraggableBandObjects[i].Region = new Rectangle(0, ly, page_TypeFace.Page_Area.Width, height); } page_Install.Size = new Size(page_TypeFace.Page_Area.Width + 20, page_TypeFace.Page_Area.Height + 20); int _iLeft = (page_Container.Width / 2) - (page_TypeFace.Page_Area.Width / 2); if (_iLeft < 0) { _iLeft = 0; } page_Install.Location = new Point(_iLeft, 0); page_Install.Invalidate(); Print_PageType.Size = page_TypeFace.Page_Area; } RBuild_Info.Set_CompositeLocation(); setPage_Form._formObject.Close(); } Print_PageType.Invalidate(); }