xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 2.87MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-08-11
  • 語(yǔ)言: C#
  • 標(biāo)簽: c#??

資源簡(jiǎn)介

C#打印實(shí)例-全部打印源碼實(shí)例

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.SqlClient;
using?System.Collections;

namespace?AllPrint
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????#region?定義全局對(duì)象及變量
????????int?intPage?=?0;//總頁(yè)數(shù)
????????int?intRows?=?30;//每頁(yè)行數(shù)
????????int?EndRows?=?0;//最后一頁(yè)函數(shù)
????????int?currentpageindex?=?1;//當(dāng)前打印頁(yè)
????????Pen?myPen?=?new?Pen(Color.Black);
????????Font?myFont?=?new?Font(“宋體“?9);//字體
????????Brush?myBrush?=?new?SolidBrush(Color.Black);//畫刷
????????int?PrintPageHeight?=?1169;//打印的默認(rèn)高度
????????int?PrintPageWidth?=?827;//打印的默認(rèn)寬度
????????int?topmargin?=?60;?//頂邊距?
????????int?rowgap?=?32;//行高?
????????int?leftmargin?=?50;//左邊距?
????????int?rightmargin?=?50;//左邊距
????????int?buttommargin?=?80;//底邊距?
????????int?columnWidth1?=?57;//第一列寬度
????????int?columnWidth2?=?335;//第二列寬度
????????#endregion

????????//加載數(shù)據(jù)
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????SqlConnection?sqlcon?=?new?SqlConnection(“Data?Source=.;Database=db_04;Uid=sa;Pwd=1;“);
????????????SqlDataAdapter?sqlda?=?new?SqlDataAdapter(“select?IDNameSex???from?tb_Student“?sqlcon);
????????????DataSet?myds?=?new?DataSet();
????????????sqlda.Fill(myds);
????????????dataGridView1.DataSource?=?myds.Tables[0];
????????????EndRows?=?(dataGridView1.Rows.Count-2)?%?intRows;//去掉標(biāo)題和最后一行的空行
????????????if?(EndRows?>?0)
????????????????intPage?=?Convert.ToInt32((dataGridView1.Rows.Count?-?2)?/?intRows)?+?1;
????????????else
????????????????intPage?=?Convert.ToInt32((dataGridView1.Rows.Count?-?2)?/?intRows);
????????????label1.Text?=?“共有“?+?(dataGridView1.Rows.Count?-?2)?+?“條數(shù)據(jù)??共“?+?intPage?+?“頁(yè)“;
????????}

????????//打印
????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????printPreviewDialog1.ShowDialog();
????????}

????????//對(duì)打印文檔進(jìn)行設(shè)置
????????private?void?printDocument1_PrintPage(object?sender?System.Drawing.Printing.PrintPageEventArgs?e)
????????{
????????????if?(dataGridView1.Rows.Count?>?0)
????????????{
????????????????PrintPageWidth?=?e.PageBounds.Width;//獲取打印線張的寬度
????????????????PrintPageHeight?=?e.PageBounds.Height;//獲取打印線張的高度

????????????????#region?繪制邊框線
????????????????e.Graphics.DrawLine(myPen?leftmargin?topmargin?PrintPageWidth?-?leftmargin?-?rightmargin?topmargin);
????????????????e.Graphics.DrawLine(myPen?leftmargin?topmargin?leftmargin?PrintPageHeight?-?topmargin?-?buttommargin);
????????????????e.Graphics.DrawLine(myPen?leftmargin?PrintPageHeight?-?topmargin?-?buttommargin?PrintPageWidth?-?leftmargin?-?rightmargin?PrintPageHeight?-?topmargin?-?buttommargin);
????????????????e.Graphics.DrawLine(myPen?PrintPageWidth?-?leftmargin?-?rightmargin?topmargin?PrintPageWidth?-?leftmargin?-?rightma

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????4081??2019-02-22?12:16??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\AllPrint.csproj

?????文件??????24064??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\bin\Debug\AllPrint.exe

?????文件??????34304??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\bin\Debug\AllPrint.pdb

?????文件??????11608??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\bin\Debug\AllPrint.vshost.exe

?????文件????????490??2013-03-18?17:00??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\bin\Debug\AllPrint.vshost.exe.manifest

?????文件???????5476??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Form1.cs

?????文件???????6523??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Form1.designer.cs

?????文件??????21736??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Form1.resx

?????文件???????1840??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\AllPrint.csproj.FileListAbsolute.txt

?????文件????????847??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\AllPrint.csproj.GenerateResource.Cache

?????文件??????24064??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\AllPrint.exe

?????文件??????10728??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\AllPrint.Form1.resources

?????文件??????34304??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\AllPrint.pdb

?????文件????????180??2019-02-22?12:16??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\AllPrint.Properties.Resources.resources

?????文件????????789??2019-02-22?12:16??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????6158??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件???????4608??2019-02-22?12:16??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

?????文件????????489??2009-01-16?15:55??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Program.cs

?????文件???????1372??2009-01-16?15:55??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Properties\AssemblyInfo.cs

?????文件???????2856??2019-02-22?12:16??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Properties\Resources.Designer.cs

?????文件???????5612??2009-01-16?15:55??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Properties\Resources.resx

?????文件???????1108??2019-02-22?12:16??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Properties\Settings.Designer.cs

?????文件????????249??2009-01-16?15:55??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint\Properties\Settings.settings

?????文件????????914??2019-02-22?12:16??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint.sln

????..A..H.?????19456??2019-02-22?12:25??C#打印實(shí)例-全部打印源碼實(shí)例\AllPrint.suo

?????文件???????3762??2009-01-16?15:56??C#打印實(shí)例-全部打印源碼實(shí)例\Backup\AllPrint\AllPrint.csproj

?????文件???????5501??2009-01-16?15:59??C#打印實(shí)例-全部打印源碼實(shí)例\Backup\AllPrint\Form1.cs

?????文件???????5659??2009-01-16?15:58??C#打印實(shí)例-全部打印源碼實(shí)例\Backup\AllPrint\Form1.designer.cs

?????文件??????21736??2009-01-16?15:58??C#打印實(shí)例-全部打印源碼實(shí)例\Backup\AllPrint\Form1.resx

?????文件????????489??2009-01-16?15:55??C#打印實(shí)例-全部打印源碼實(shí)例\Backup\AllPrint\Program.cs

............此處省略32個(gè)文件信息

評(píng)論

共有 條評(píng)論