public void Set_Colors() { int _stepx = 0, _stepy = 0; for (int i = 0; i < 48; i++) { if (i % 8 == 0) { _stepy += 1; _stepx = 0; } PanelEx select_Color = new PanelEx() { Size = new Size(17, 17), Location = new Point(10 + _stepx * 22, 20 + _stepy * 22), BackColor = Color.FromArgb(175, 175, 175), Cursor = Cursors.Hand, Tag = i }; _stepx += 1; select_Color.Click += SetColor_Click; setColor_Form.form_panel.Controls.Add(select_Color); panel_Color[i] = new PanelEx() { Size = new Size(15, 15), Location = new Point(1, 1), BackColor = colors[i], Tag = i }; panel_Color[i].Click += SetColor_Click; select_Color.Controls.Add(panel_Color[i]); } new RbControls_SpearLine().Spear_line(setColor_Form.form_panel, new Size(20, 20), new Point(5, 10), EzRBuild.EzResource.set_color); string[] selectText = new string[2] { "背景色", "边框色" }; for (int i = 0; i < 2; i++) { selectType[i] = new RbControls_CheckBox(); if (i == 0) { selectType[i].check_Box(setColor_Form.form_panel, true, i, new Point(30 + i * 60, 10), system_FontColor, system_Font, selectText[i], check_AlwaysTrue, select_Click); } else { selectType[i].check_Box(setColor_Form.form_panel, false, i, new Point(30 + i * 60, 10), system_FontColor, system_Font, selectText[i], check_AlwaysTrue, select_Click); } } setColor_Form.Create_Dialog( "setColor_Form", FormStartPosition.Manual, new Size(192, 178), new Point(RBuild_Design.design_Form.LocationEX.X + 305, RBuild_Design.design_Form.LocationEX.Y + 90), Color.White, form_ShowDialog, true, null ); }
private RbControls_TextBox[] attribute_Input = new RbControls_TextBox[3]; // 属性输入框 public void Set_Band(int _mode) { Bitmap[] band_Icon = new Bitmap[3] { EzRBuild.EzResource.band_pt, EzRBuild.EzResource.band_pd, EzRBuild.EzResource.band_pb }; string[] band_Text = new string[3] { "页头栏 -", "内容栏 -", "页脚栏 -" }; string[] band_setText = new string[2] { "自适应最小高度", "最大填充高度" }; int _tag = 0; for (int i = 0; i < 3; i++) { new RbControls_SpearLine().Spear_line(setBand_Form.form_panel, new Size(25, 25), new Point(10, 10 + i * 50), band_Icon[i]); for (int t = 0; t < 2; t++) { select_label[i, t] = new RbControls_CheckBox(); select_label[i, t].check_Box(setBand_Form.form_panel, false, _tag, new Point(30 + t * 110, 33 + i * 50), Color.Black, system_Font, band_setText[t], check_Normal, selectLabe_Click); _tag += 1; } new RbControls_TextLabel().Text_Label(setBand_Form.form_panel, new Point(35, 13 + i * 50), system_Font, system_FontColor, band_Text[i]); new RbControls_SpearLine().Spear_line(setBand_Form.form_panel, new Size(5, 25), new Point(240, 32 + i * 50), EzRBuild.EzResource.spear); attribute_Input[i] = new RbControls_TextBox(); attribute_Input[i].input_Box(setBand_Form.form_panel, 40, new Point(285, 35 + i * 50), system_Font, Color.Salmon, Color.White, "", 4, false, 2, null, input_keyUp); attribute_Input[i].textBox.Tag = i; new RbControls_TextLabel().Text_Label(setBand_Form.form_panel, new Point(250, 35 + i * 50), system_Font, Color.Black, "高度:"); } //string[] acceptSetMenu = new string[2] { "[✔ 应用设置 ]", "[✘ 取消 ]" }; for (int i = 0; i < 2; i++) { new RbControls_ButtonLabel().Button_Label(setBand_Form.form_panel, new Point(195 + i * 85, 165), system_buttonColor, Color.Salmon, system_buttonColor, acceptSetMenu[i], system_Font, i, acceptSet_Click); } if (_mode == 1) { setBand_Form.Create_Dialog( "setBand_Form", FormStartPosition.CenterScreen, new Size(350, 190), new Point(RBuild_Design.design_Form.LocationEX.X + 70, RBuild_Design.design_Form.LocationEX.Y + 90), Color.White, form_ShowDialog, true, null); } else { setBand_Form.Create_Dialog( "setBand_Form", FormStartPosition.Manual, new Size(350, 190), new Point(RBuild_Design.design_Form.LocationEX.X + 70, RBuild_Design.design_Form.LocationEX.Y + 90), Color.White, form_ShowDialog, true, null); } }
public void Print() { Input_focuse = new TextBox() { Size = new Size(0, 0), Location = new Point(0, 0), ReadOnly = true, BorderStyle = BorderStyle.None, BackColor = Color.White }; print_Form._formObject.Controls.Add(Input_focuse); printer_Menu = new ContextMenuStrip() { ShowImageMargin = false, Font = system_Font }; printer_Item = new ToolStripMenuItem[printers.Count]; for (int i = 0; i < printers.Count; i++) { printer_Item[i] = new ToolStripMenuItem() { AutoSize = true, Text = printers[i].printerName, Tag = i }; printer_Item[i].Click += printerMenu_Click; printer_Menu.Items.Add(printer_Item[i]); } Bitmap[] printer_Img = new Bitmap[3] { EzRBuild.EzResource.print, EzRBuild.EzResource.prview, EzRBuild.EzResource.copy }; string[] printer_text = new string[] { "- 打印机选择:", "- 打印范围选择:", "- 打印方式:" }; string[] printer_scope = new string[] { "全部", "单数页", "双数页" }; int[] _sety = new int[] { 15, 86, 171 }; int[] _setx = new int[] { 35, 90, 155 }; for (int i = 0; i < 3; i++) { new RbControls_SpearLine().Spear_line(print_Form.form_panel, new Size(25, 25), new Point(10, _sety[i] - 2), printer_Img[i]); new RbControls_TextLabel().Text_Label(print_Form.form_panel, new Point(35, _sety[i]), system_Font, system_FontColor, printer_text[i]); select_Cope[i] = new RbControls_CheckBox(); if (i == 0) { select_Cope[i].check_Box(print_Form.form_panel, true, i, new Point(_setx[i], 108), Color.Black, system_Font, printer_scope[i], check_AlwaysTrue, cope_Click); } else { select_Cope[i].check_Box(print_Form.form_panel, false, i, new Point(_setx[i], 108), Color.Black, system_Font, printer_scope[i], check_AlwaysTrue, cope_Click); } } new RbControls_SpearLine().Spear_line(print_Form.form_panel, new Size(380, 5), new Point(5, 70), EzRBuild.EzResource.hspear); new RbControls_SpearLine().Spear_line(print_Form.form_panel, new Size(380, 5), new Point(5, 158), EzRBuild.EzResource.hspear); Input_Printer = new RbControls_TextBox(); Input_Printer.input_Box(print_Form.form_panel, 230, new Point(20, 40), system_Font, Color.Salmon, Color.White, DefaultPrinter, 1024, true, input_Normal, printer_Click, null); new RbControls_ButtonLabel().Button_Label(print_Form.form_panel, new Point(255, 40), Color.Black, system_btnEnter, Color.Black, "[◢ 选择设备 ]", system_Font, 0, SelectPrinter_Click); new RbControls_ButtonLabel().Button_Label(print_Form.form_panel, new Point(335, 40), Color.Black, system_btnEnter, Color.Black, "[ 属性 ]", system_Font, 0, PrinterAttrib_Click); Input_Scope = new RbControls_TextBox(); Input_Scope.input_Box(print_Form.form_panel, 80, new Point(302, 133), system_Font, Color.Salmon, Color.White, "", 1024, false, input_Normal, null, Scope_KeyPress); new RbControls_TextLabel().Text_Label(print_Form.form_panel, new Point(35, 133), system_Font, Color.Black, "输入页码或范围(','或'-'分隔。例如1-5或1,3,4 ...):"); Input_Copies = new RbControls_TextBox(); Input_Copies.input_Box(print_Form.form_panel, 40, new Point(70, 195), system_Font, Color.Salmon, Color.White, "1", 3, false, input_Number, null, null); new RbControls_TextLabel().Text_Label(print_Form.form_panel, new Point(35, 195), system_Font, Color.Black, "份数:"); string[] _ptype = new string[] { "逐份打印", "逐页打印" }; string[] acceptPrintMenu = new string[2] { "[✔ 确定 ]", "[✘ 取消 ]" }; for (int i = 0; i < 2; i++) { select_ptype[i] = new RbControls_CheckBox(); if (i == 0) { select_ptype[i].check_Box(print_Form.form_panel, true, i, new Point(135 + i * 75, 195), Color.Black, system_Font, _ptype[i], check_AlwaysTrue, ptype_Click); } else { select_ptype[i].check_Box(print_Form.form_panel, false, i, new Point(135 + i * 75, 195), Color.Black, system_Font, _ptype[i], check_AlwaysTrue, ptype_Click); } acceptPrint[i] = new RbControls_ButtonLabel(); acceptPrint[i].Button_Label(print_Form.form_panel, new Point(260 + i * 65, 225), system_buttonColor, system_btnEnter, system_buttonColor, acceptPrintMenu[i], system_Font, i, AcceptPrinter_Click); } print_Form.Create_Dialog("print_Form", FormStartPosition.CenterScreen, new Size(390, 250), new Point(100, 200), Color.White, form_ShowDialog, true, null); }
public void Set_Data() { new RbControls_SpearLine().Spear_line(setData_Form.form_panel, new Size(20, 20), new Point(15, 5), EzRBuild.EzResource.datapool); new RbControls_TextLabel().Text_Label(setData_Form.form_panel, new Point(35, 7), system_Font, system_FontColor, "设置数据库"); new RbControls_SpearLine().Spear_line(setData_Form.form_panel, new Size(340, 5), new Point(5, 55), EzRBuild.EzResource.hspear); new RbControls_SpearLine().Spear_line(setData_Form.form_panel, new Size(340, 5), new Point(5, 225), EzRBuild.EzResource.hspear); new RbControls_SpearLine().Spear_line(setData_Form.form_panel, new Size(20, 20), new Point(15, 65), EzRBuild.EzResource.data_set); new RbControls_TextLabel().Text_Label(setData_Form.form_panel, new Point(35, 67), system_Font, system_FontColor, "数据库连接设置"); new RbControls_SpearLine().Spear_line(setData_Form.form_panel, new Size(20, 20), new Point(15, 235), EzRBuild.EzResource.sql); new RbControls_TextLabel().Text_Label(setData_Form.form_panel, new Point(35, 237), system_Font, system_FontColor, "SQL 语句"); inputSQL.input_Box(setData_Form.form_panel, 295, new Point(35, 257), system_Font, system_inputColor, Color.White, data_Pool.data_SQL, 4096, false, input_Normal, null, null); //string[] acceptSetMenu = new string[2] { "[✔ 应用设置 ]", "[✘ 取消 ]" }; int[] _setx = new int[3] { 35, 100, 200 }; for (int i = 0; i < 2; i++) { new RbControls_ButtonLabel().Button_Label(setData_Form.form_panel, new Point(195 + i * 85, 287), system_buttonColor, system_btnEnter, system_buttonColor, acceptSetMenu[i], system_Font, i, acceptSet_Click); } _link = data_Pool.data_Type; for (int i = 0; i < 3; i++) { set_base[i] = new RbControls_CheckBox(); if (i == data_Pool.data_Type) { set_base[i].check_Box(setData_Form.form_panel, true, i, new Point(_setx[i], 31), Color.Black, system_Font, dataText[i], check_AlwaysTrue, SetDataLink_Click); } else { set_base[i].check_Box(setData_Form.form_panel, false, i, new Point(_setx[i], 31), Color.Black, system_Font, dataText[i], check_AlwaysTrue, SetDataLink_Click); } } string[] datas = new string[5] { " 用户名:", " 密码:", "链接地址:", " 数据库:", " 数据表:" }; string _info = ""; for (int i = 0; i < 5; i++) { input_info[i] = new RbControls_TextBox(); if (i == 0) { _info = data_Pool.data_UserName; } else if (i == 1) { _info = ""; } else if (i == 2) { _info = data_Pool.data_connectionIP; } else if (i == 3) { _info = data_Pool.data_DataName; } else if (i == 4) { _info = data_Pool.data_TableName; } if (i == 1) { input_info[i].input_Box(setData_Form.form_panel, 230, new Point(95, 90 + i * 27), system_Font, system_inputColor, Color.White, _info, 4096, false, input_Pasword, null, null); } else if (i == 4) { input_info[i].input_Box(setData_Form.form_panel, 230, new Point(95, 90 + i * 27), system_Font, system_inputColor, Color.White, _info, 4096, true, input_Normal, null, null); } else { input_info[i].input_Box(setData_Form.form_panel, 230, new Point(95, 90 + i * 27), system_Font, system_inputColor, Color.White, _info, 4096, false, input_Normal, null, null); } data_info[i] = new RbControls_TextLabel(); data_info[i].Text_Label(setData_Form.form_panel, new Point(35, 90 + i * 27), system_Font, Color.Black, datas[i]); } new RbControls_ButtonLabel().Button_Label(setData_Form.form_panel, new Point(325, 199), system_btnEnter, system_btnEnter, system_btnEnter, "◥", system_Font, 0, TableSelect_Click); if (data_Pool.data_Type == 0) { for (int i = 0; i < 5; i++) { input_info[i].textBox.Text = ""; input_info[i].textBox.Enabled = false; data_info[i].labelText.Enabled = false; } inputSQL.textBox.Text = ""; inputSQL.textBox.Enabled = false; } else if (data_Pool.data_Type == 1) { for (int i = 0; i < 5; i++) { input_info[i].textBox.Enabled = true; data_info[i].labelText.Enabled = true; } inputSQL.textBox.Enabled = true; } else if (data_Pool.data_Type == 2) { for (int i = 0; i < 5; i++) { if ((i == 0) || (i == 2)) { input_info[i].textBox.Text = ""; input_info[i].textBox.Enabled = false; data_info[i].labelText.Enabled = false; } else { input_info[i].textBox.Enabled = true; data_info[i].labelText.Enabled = true; } } inputSQL.textBox.Enabled = true; } DataTable_Menu = new ContextMenuStrip() { ShowImageMargin = false, Font = system_Font }; setData_Form.Create_Dialog( "setData_Form", FormStartPosition.Manual, new Size(350, 315), new Point(RBuild_Design.design_Form.LocationEX.X + 135, RBuild_Design.design_Form.LocationEX.Y + 90), Color.White, form_ShowDialog, true, null ); }
private static ContextMenuStrip FontSize_Menu; // 字体大小菜单 public static void Initialize_Info(Control obj) { PanelEx panel_TopLine = new PanelEx() // 间隔线 { Dock = DockStyle.Top, Height = 1, BackgroundImage = EzRBuild.EzResource.line, BackgroundImageLayout = ImageLayout.Stretch }; panel_State = new PanelEx() // 底部显示组件信息框 { Size = new Size(obj.Width - 4, 62), Location = new Point(2, obj.Height - 64), Cursor = Cursors.Default, BackColor = system_backColor }; obj.Controls.Add(panel_State); pic_ControlType = new RbControls_SpearLine(); pic_ControlType.Spear_line(panel_State, new Size(25, 25), new Point(2, 5), EzRBuild.EzResource.mouse); panel_State.Controls.Add(panel_TopLine); Label_ControlType = new RbControls_TextLabel(); Label_ControlType.Text_Label(panel_State, new Point(27, 6), system_Font, system_FontColor, ""); Label_ControlSize = new RbControls_TextLabel(); Label_ControlSize.Text_Label(panel_State, new Point(7, 28), system_Font, system_FontColor, "范围:"); Label_ControlPoint = new RbControls_TextLabel(); Label_ControlPoint.Text_Label(panel_State, new Point(7, 44), system_Font, system_FontColor, "位置:"); new RbControls_SpearLine().Spear_line(panel_State, new Size(5, 50), new Point(160, 8), EzRBuild.EzResource.spearInfo); panel_State.Controls.Add(panel_TopLine); // 获取字体 InstalledFontCollection Fonts = new InstalledFontCollection(); FontFamilies = Fonts.Families; Font_Menu = new ContextMenuStrip() { ShowImageMargin = false, Font = system_Font }; ToolStripMenuItem[] menu_Item = new ToolStripMenuItem[FontFamilies.Length]; for (int i = FontFamilies.Length - 1; i > 0; i--) { menu_Item[i] = new ToolStripMenuItem() { AutoSize = true, Font = system_Font, Text = FontFamilies[i].Name, }; menu_Item[i].Click += fontMenu_Click; Font_Menu.Items.Add(menu_Item[i]); } // 字体大小 string[] size_value = new string[19] { "5", "6", "7", "8", "9", "10", "11", "12", "14", "16", "18", "20", "22", "24", "26", "28", "36", "48", "72" }; FontSize_Menu = new ContextMenuStrip() { ShowImageMargin = false, Font = system_Font }; ToolStripMenuItem[] menu_ItemSize = new ToolStripMenuItem[19]; for (int i = 0; i < 19; i++) { menu_ItemSize[i] = new ToolStripMenuItem() { AutoSize = true, Font = system_Font, Text = size_value[i], }; menu_ItemSize[i].Click += sizeMenu_Click; FontSize_Menu.Items.Add(menu_ItemSize[i]); } for (int i = 0; i < 6; i++) { panel_setControl[i] = new PanelEx() // 设置框 { Size = new Size(1018, 50), Location = new Point(175, 8), Visible = false, BackColor = system_backColor }; RbControls_TextLabel[] acceptLabels = new RbControls_TextLabel[2]; string[] acceptMenu = new string[2] { "[✔ 应用设置 ]", "[✘ 删除组件 ]" }; int[] _px = new int[2] { 180, 635 }; for (int t = 0; t < 2; t++) { if (t == 0) { new RbControls_ButtonLabel().Button_Label(panel_setControl[i], new Point(1 + t * 85, 4), system_buttonColor, Color.Salmon, system_buttonColor, acceptMenu[t], system_Font, t, accept_Attributes); } else { new RbControls_ButtonLabel().Button_Label(panel_setControl[i], new Point(1 + t * 85, 4), system_buttonColor, Color.Salmon, system_buttonColor, acceptMenu[t], system_Font, t, null); } new RbControls_SpearLine().Spear_line(panel_setControl[i], new Size(5, 25), new Point(_px[t], 0), EzRBuild.EzResource.spear); } // 属性输入框 int[] _inputX = new int[4] { 230, 335, 450, 565 }; for (int t = 0; t < 4; t++) { attribute_Input[i, t] = new RbControls_TextBox(); attribute_Input[i, t].input_Box(panel_setControl[i], 60, new Point(_inputX[t], 4), system_Font, Color.Salmon, system_backColor, "", 4, false, input_Number, null, null); } string label_txt = "宽度: 高度: 位置(x): 位置(y): 颜色:"; // 设置颜色 if (i != 1) { new RbControls_PanelLine().Panel_Line(panel_setControl[i], new Size(30, 1), new Point(685, 20)); Content_Color[i] = new RbControls_ColorPad(); Content_Color[i].colorPad(panel_setControl[i], new Point(755, 7), new Size(11, 11), 15, Color.Transparent, colorSelect_Click); color_Flag[i] = new RbControls_TextLabel(); color_Flag[i].Text_Label(panel_setControl[i], new Point(690, 3), system_Font, Color.Black, "█▌"); } else { label_txt = "宽度: 高度: 位置(x): 位置(y):"; } new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(195, 4), system_Font, system_FontColor, label_txt); // 对齐方式 if (i != 2) { string[] align_label = new string[] { "左", "右", "顶", "底", "居中", "垂直" }; int[] align_location = new int[] { 48, 83, 118, 153, 188, 233 }; for (int t = 0; t < 6; t++) { align_Check[i, t] = new RbControls_CheckBox(); if ((t == 0) || (t == 2)) { align_Check[i, t].check_Box(panel_setControl[i], true, t, new Point(align_location[t], 30), system_FontColor, system_Font, align_label[t], check_AlwaysTrue, align_Click); } else { align_Check[i, t].check_Box(panel_setControl[i], false, t, new Point(align_location[t], 30), system_FontColor, system_Font, align_label[t], check_AlwaysTrue, align_Click); } } new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(1, 31), system_Font, system_FontColor, "[ 对齐:"); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(281, 31), system_Font, system_FontColor, "]"); } // 设置字体 if ((i != 1) && (i != 2)) { font_type[i] = new RbControls_TextLabel(); font_type[i].Text_Label(panel_setControl[i], new Point(340, 31), system_Font, Color.Salmon, "微软雅黑"); new RbControls_PanelLine().Panel_Line(panel_setControl[i], new Size(128, 1), new Point(345, 48)); font_size[i] = new RbControls_TextLabel(); font_size[i].Text_Label(panel_setControl[i], new Point(545, 31), system_Font, Color.Salmon, "9"); new RbControls_PanelLine().Panel_Line(panel_setControl[i], new Size(37, 1), new Point(540, 48)); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(300, 31), system_Font, system_FontColor, "[ 字体:"); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(487, 31), system_Font, system_FontColor, "] [ 字号:"); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(590, 31), system_Font, system_FontColor, "]"); new RbControls_ButtonLabel().Button_Label(panel_setControl[i], new Point(475, 31), Color.Salmon, Color.Salmon, Color.Salmon, "◥", system_Font, 0, fontLabe_MouseDown); new RbControls_ButtonLabel().Button_Label(panel_setControl[i], new Point(575, 31), Color.Salmon, Color.Salmon, Color.Salmon, "◥", system_Font, 0, sizeLabe_MouseDown); string[] render_menu = new string[] { "加粗", "倾斜", "下划线" }; int[] render_location = new int[] { 625, 675, 725 }; for (int t = 0; t < 3; t++) { font_render[i, t] = new RbControls_CheckBox(); font_render[i, t].check_Box(panel_setControl[i], false, t, new Point(render_location[t], 30), system_FontColor, system_Font, render_menu[t], check_Normal, null); } new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(610, 31), system_Font, system_FontColor, "["); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(785, 31), system_Font, system_FontColor, "]"); } panel_State.Controls.Add(panel_setControl[i]); if (i == 0) // 文本框 { content_TextInput = new RbControls_TextBox(); content_TextInput.input_Box(panel_setControl[i], 168, new Point(830, 31), system_Font, Color.Salmon, system_backColor, "", 4096, false, input_Normal, null, null); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(795, 31), system_Font, system_FontColor, "内容:"); new RbControls_ButtonLabel().Button_Label(panel_setControl[i], new Point(1000, 33), Color.Salmon, Color.Salmon, Color.Salmon, "×", system_Font, 0, TextClear_Click); } if (i == 1) // 图像 { content_ImgInput = new RbControls_TextBox(); content_ImgInput.input_Box(panel_setControl[i], 150, new Point(520, 31), system_Font, Color.Salmon, system_backColor, "", 4096, false, 0, null, null); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(450, 31), system_Font, system_FontColor, "图像文件:"); string[] Img_Zoom = new string[2] { "原始大小", "缩放" }; for (int t = 0; t < 2; t++) { ImgZoom_CheckBox[t] = new RbControls_CheckBox(); if (t == 0) { ImgZoom_CheckBox[t].check_Box(panel_setControl[i], false, t, new Point(315 + t * 75, 30), system_FontColor, system_Font, Img_Zoom[t], check_AlwaysTrue, ImgZoom_Click); } else { ImgZoom_CheckBox[t].check_Box(panel_setControl[i], true, t, new Point(315 + t * 75, 30), system_FontColor, system_Font, Img_Zoom[t], check_AlwaysTrue, ImgZoom_Click); } } new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(300, 31), system_Font, system_FontColor, "["); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(435, 31), system_Font, system_FontColor, "]"); string[] ImgZoom_text = new string[2] { "◥", "×" }; RbControls_ButtonLabel[] ImgZoom_Button = new RbControls_ButtonLabel[2]; for (int t = 0; t < 2; t++) { ImgZoom_Button[t] = new RbControls_ButtonLabel(); if (t == 0) { ImgZoom_Button[t].Button_Label(panel_setControl[i], new Point(673 + t * 18, 33), Color.Salmon, Color.Salmon, Color.Salmon, ImgZoom_text[t], system_Font, t, openImg_Click); } else { ImgZoom_Button[t].Button_Label(panel_setControl[i], new Point(673 + t * 18, 33), Color.Salmon, Color.Salmon, Color.Salmon, ImgZoom_text[t], system_Font, t, openClear_Click); } } } if (i == 2) // 形状 { Bitmap[] shaps_bmp = new Bitmap[20]; for (int t = 0; t < 20; t++) { shap_select[t] = new RbControls_CheckBox(); shap_select[t].check_Box(panel_setControl[i], false, t, new Point(48 + t * 40, 30), system_backColor, system_Font, null, check_AlwaysTrue, ShapSelect_Click); shaps_bmp[t] = new Bitmap(20, 20); ds.DrawFontAwesome(shaps_bmp[t], shaps_type[t], 20, Color.FromArgb(150, 150, 150), new Point(0, 0), false); shaps_pic[t] = new Label() { Size = new Size(20, 20), Location = new Point(65 + t * 40, 31), Image = shaps_bmp[t], Cursor = Cursors.Hand, BackColor = Color.Transparent, Tag = t }; shaps_pic[t].Click += ShapSelect_Click; panel_setControl[i].Controls.Add(shaps_pic[t]); } new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(1, 31), system_Font, system_FontColor, "[ 样式:"); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(845, 31), system_Font, system_FontColor, "]"); } if (i == 3) // 数据库字段 { content_DataInput = new RbControls_TextBox(); content_DataInput.input_Box(panel_setControl[i], 150, new Point(840, 31), system_Font, Color.Salmon, system_backColor, "", 4096, true, input_Normal, null, null); new RbControls_ButtonLabel().Button_Label(panel_setControl[i], new Point(990, 33), Color.Salmon, Color.Salmon, Color.Salmon, "◥", system_Font, 0, FieldSelect_MouseDown); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(795, 31), system_Font, system_FontColor, "[ 字段:"); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(1005, 31), system_Font, system_FontColor, "]"); DataField_Menu = new ContextMenuStrip() { ShowImageMargin = false, Font = system_Font }; } if (i == 4) // 页码 { content_PcodeInput = new RbControls_TextBox(); content_PcodeInput.input_Box(panel_setControl[i], 150, new Point(840, 31), system_Font, Color.Salmon, system_backColor, "", 64, true, input_Normal, null, null); new RbControls_ButtonLabel().Button_Label(panel_setControl[i], new Point(990, 33), Color.Salmon, Color.Salmon, Color.Salmon, "◥", system_Font, 0, pgCode_Click); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(795, 31), system_Font, system_FontColor, "[ 样式:"); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(1005, 31), system_Font, system_FontColor, "]"); string[] pgCode_MenuText = new string[8] { "[1] , [2] , [3] , ...", "(1) , (2) , (3) , ...", "-1- , -2- , -3- , ...", "1 , 2 , 3 , ...", "-1 , -2 , -3 , ...", "1-99 , 2-99 , ...", "Page 1 of 99 , ...", "第1页 , 第2页 ..." }; pgCode_Menu = new ContextMenuStrip() { ShowImageMargin = false, Font = system_Font }; ToolStripMenuItem[] menu_ItemCode = new ToolStripMenuItem[8]; for (int t = 0; t < 8; t++) { menu_ItemCode[t] = new ToolStripMenuItem() { AutoSize = true, Font = system_Font, Text = pgCode_MenuText[t], Tag = t }; menu_ItemCode[t].Click += pgMenuCode_Click; pgCode_Menu.Items.Add(menu_ItemCode[t]); } } if (i == 5) // 数据库运算 { content_FunctionInput = new RbControls_TextBox(); content_FunctionInput.input_Box(panel_setControl[i], 150, new Point(840, 31), system_Font, Color.Salmon, system_backColor, "", 4096, true, input_Normal, null, null); new RbControls_ButtonLabel().Button_Label(panel_setControl[i], new Point(990, 33), Color.Salmon, Color.Salmon, Color.Salmon, "◥", system_Font, 0, FieldFunction_MouseDown); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(795, 31), system_Font, system_FontColor, "[ 运算:"); new RbControls_TextLabel().Text_Label(panel_setControl[i], new Point(1005, 31), system_Font, system_FontColor, "]"); DataField_Menu = new ContextMenuStrip() { ShowImageMargin = false, Font = system_Font }; } } Task View_ControlInfo = new Task(Set_ControlMoveInfo); View_ControlInfo.Start(); }
public void Set_Type() { tmp = new TextBox() { Size = new Size(0, 0), Location = new Point(0, 0), BorderStyle = BorderStyle.None }; setPage_Form.form_panel.Controls.Add(tmp); _record = _pgselect; new RbControls_SpearLine().Spear_line(setPage_Form.form_panel, new Size(20, 20), new Point(15, 10), EzRBuild.EzResource.ptype); new RbControls_TextLabel().Text_Label(setPage_Form.form_panel, new Point(40, 12), system_Font, system_FontColor, "纸张类型 - 改变纸型,将清除当前报表组件!"); new RbControls_ButtonLabel().Button_Label(setPage_Form.form_panel, new Point(170, 38), system_btnEnter, system_btnEnter, system_btnEnter, "◥", system_Font, 0, pgSelect_Click); string[] Text_def = new string[2] { "自定义宽度(毫米):", "自定义高度(毫米):" }; string[] Text_Direct = new string[2] { "纵向", "横向" }; for (int i = 0; i < 2; i++) { input_def[i] = new RbControls_TextBox(); input_def[i].input_Box(setPage_Form.form_panel, 30, new Point(120 + i * 145, 65), system_Font, system_inputColor, Color.White, "", 4, false, input_Number, null, null); input_def[i].textBox.Enabled = false; Select_Direct[i] = new RbControls_CheckBox(); if (i == _pgdirect) { Select_Direct[i].check_Box(setPage_Form.form_panel, true, i, new Point(195 + i * 60, 35), Color.Black, system_Font, Text_Direct[i], check_AlwaysTrue, SelectDirect_Click); } else { Select_Direct[i].check_Box(setPage_Form.form_panel, false, i, new Point(195 + i * 60, 35), Color.Black, system_Font, Text_Direct[i], check_AlwaysTrue, SelectDirect_Click); } new RbControls_TextLabel().Text_Label(setPage_Form.form_panel, new Point(15 + i * 145, 65), system_Font, Color.Black, Text_def[i]); new RbControls_ButtonLabel().Button_Label(setPage_Form.form_panel, new Point(165 + i * 85, 170), system_buttonColor, system_btnEnter, system_buttonColor, acceptSetMenu[i], system_Font, i, acceptSet_Click); } if (_pgselect == -1) { Input_Type.input_Box(setPage_Form.form_panel, 150, new Point(20, 36), system_Font, system_inputColor, Color.White, "自定义纸张", 1024, true, input_Normal, inputType_Click, inputType_keyPress); input_def[0].textBox.Text = page_TypeFace.Rect_mm[0]; input_def[1].textBox.Text = page_TypeFace.Rect_mm[1]; input_def[0].textBox.Enabled = true; input_def[1].textBox.Enabled = true; } else { Input_Type.input_Box(setPage_Form.form_panel, 150, new Point(20, 36), system_Font, system_inputColor, Color.White, page_types[_record] + ", " + page_size[_record] + " 毫米", 1024, true, input_Normal, inputType_Click, inputType_keyPress); } new RbControls_SpearLine().Spear_line(setPage_Form.form_panel, new Size(308, 5), new Point(5, 95), EzRBuild.EzResource.hspear); new RbControls_SpearLine().Spear_line(setPage_Form.form_panel, new Size(20, 20), new Point(15, 110), EzRBuild.EzResource.margin); new RbControls_TextLabel().Text_Label(setPage_Form.form_panel, new Point(40, 112), system_Font, system_FontColor, "边距设置 ( 单位:像素 )"); string[] Text_margin = new string[4] { "左:", "上:", "右:", "下:" }; for (int i = 0; i < 4; i++) { input_Margin[i] = new RbControls_TextBox(); input_Margin[i].input_Box(setPage_Form.form_panel, 30, new Point(42 + i * 70, 137), system_Font, system_inputColor, Color.White, page_TypeFace.Page_Margin[i] + "", 4, false, input_Number, null, null); new RbControls_TextLabel().Text_Label(setPage_Form.form_panel, new Point(15 + i * 70, 137), system_Font, Color.Black, Text_margin[i]); } // 打印纸张菜单 printPage_Menu = new ContextMenuStrip() { ShowImageMargin = false, Font = system_Font }; ToolStripMenuItem[] printType_Item = new ToolStripMenuItem[pageType_Lists.Count]; for (int i = 0; i < pageType_Lists.Count; i++) { printType_Item[i] = new ToolStripMenuItem() { AutoSize = true, Text = pageType_Lists[i].pageType, Tag = i }; printType_Item[i].Click += printTypeItem_Click; printPage_Menu.Items.Add(printType_Item[i]); } tmp.Focus(); setPage_Form.Create_Dialog( "setPage_Form", FormStartPosition.Manual, new Size(318, 197), new Point(RBuild_Design.design_Form.LocationEX.X + 105, RBuild_Design.design_Form.LocationEX.Y + 90), Color.White, form_ShowDialog, true, null ); }