프린터 여백 조정
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
{
|
||||
@@ -17,8 +16,6 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
settings1.SettingReset();
|
||||
this.Text = $"{Global.GlobalSettings.GarageName} 화물 차고지 운영프로그램 v{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
|
||||
applicant1.GarageName(Global.GlobalSettings.GarageName);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using HSUCO_Cargo_Garage_Operation_Program.Properties;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
@@ -24,8 +23,8 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
printDocument.PrintPage += PrintPage;
|
||||
printDocument.DefaultPageSettings.Margins.Top = Convert.ToInt32(50);
|
||||
printDocument.DefaultPageSettings.Margins.Bottom = Convert.ToInt32(50);
|
||||
printDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(30);
|
||||
printDocument.DefaultPageSettings.Margins.Right = Convert.ToInt32(30);
|
||||
printDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(50);
|
||||
printDocument.DefaultPageSettings.Margins.Right = Convert.ToInt32(50);
|
||||
}
|
||||
public void Print()
|
||||
{
|
||||
@@ -58,7 +57,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
CenterTextWriter("화성도시공사 사장", new Font("맑은 고딕", 20, FontStyle.Bold), e.Graphics, totalWidth, e.MarginBounds.Top + 900);
|
||||
_count++;
|
||||
e.HasMorePages = _certificateInformation.Count > _count;
|
||||
if(!e.HasMorePages)
|
||||
if (!e.HasMorePages)
|
||||
{
|
||||
_count = 0;
|
||||
}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
using HSUCO_Cargo_Garage_Operation_Program.Properties;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
@@ -22,9 +21,10 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
printDocument = new PrintDocument();
|
||||
printDocument.DocumentName = "접수증";
|
||||
printDocument.PrintPage += new PrintPageEventHandler(PrintPage);
|
||||
printDocument.DefaultPageSettings.Margins.Top = Convert.ToInt32(50); printDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(50);
|
||||
printDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(30);
|
||||
printDocument.DefaultPageSettings.Margins.Right = Convert.ToInt32(30);
|
||||
printDocument.DefaultPageSettings.Margins.Top = Convert.ToInt32(50);
|
||||
printDocument.DefaultPageSettings.Margins.Bottom = Convert.ToInt32(50);
|
||||
printDocument.DefaultPageSettings.Margins.Left = Convert.ToInt32(50);
|
||||
printDocument.DefaultPageSettings.Margins.Right = Convert.ToInt32(50);
|
||||
}
|
||||
public void Print()
|
||||
{
|
||||
@@ -37,6 +37,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
}
|
||||
private void PrintPage(object sender, PrintPageEventArgs e)
|
||||
{
|
||||
|
||||
e.Graphics.DrawRectangle(new Pen(Brushes.Black, 3), e.MarginBounds.Left, e.MarginBounds.Top,
|
||||
e.MarginBounds.Width, e.MarginBounds.Height);
|
||||
|
||||
@@ -47,7 +48,7 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
e.Graphics.DrawLine(new Pen(Brushes.Black, 1), new Point(e.MarginBounds.Left, e.MarginBounds.Top + 490), new Point(e.MarginBounds.Right, e.MarginBounds.Top + 490));
|
||||
|
||||
e.Graphics.DrawLine(new Pen(Brushes.Black, 1), new Point(e.MarginBounds.Left + 280, e.MarginBounds.Top + 290), new Point(e.MarginBounds.Left + 280, e.MarginBounds.Top + 490));
|
||||
e.Graphics.DrawLine(new Pen(Brushes.Black, 1), new Point(e.MarginBounds.Left + 520, e.MarginBounds.Top + 440), new Point(e.MarginBounds.Left + 520, e.MarginBounds.Top + 490));
|
||||
e.Graphics.DrawLine(new Pen(Brushes.Black, 1), new Point(e.MarginBounds.Left + 500, e.MarginBounds.Top + 440), new Point(e.MarginBounds.Left + 500, e.MarginBounds.Top + 490));
|
||||
|
||||
|
||||
int totalWidth = (int)e.PageBounds.Width;
|
||||
@@ -68,8 +69,8 @@ namespace HSUCO_Cargo_Garage_Operation_Program
|
||||
e.Graphics.DrawString($"④ 차량번호", new Font("맑은 고딕", 12), Brushes.Black, e.MarginBounds.Left + 50, e.MarginBounds.Top + 450);
|
||||
e.Graphics.DrawString($"화물차량", new Font("맑은 고딕", 12), Brushes.Black, e.MarginBounds.Left + 289, e.MarginBounds.Top + 440);
|
||||
e.Graphics.DrawString($"{_printFilingReceiptInformation[_count].CargoVehicleNumber}", new Font("맑은 고딕", 12), Brushes.Black, e.MarginBounds.Left + 310, e.MarginBounds.Top + 460);
|
||||
e.Graphics.DrawString($"일반차량", new Font("맑은 고딕", 12), Brushes.Black, e.MarginBounds.Left + 528, e.MarginBounds.Top + 440);
|
||||
e.Graphics.DrawString($"{_printFilingReceiptInformation[_count].PassengerVehicleNumber}", new Font("맑은 고딕", 12), Brushes.Black, e.MarginBounds.Left + 550, e.MarginBounds.Top + 460);
|
||||
e.Graphics.DrawString($"일반차량", new Font("맑은 고딕", 12), Brushes.Black, e.MarginBounds.Left + 508, e.MarginBounds.Top + 440);
|
||||
e.Graphics.DrawString($"{_printFilingReceiptInformation[_count].PassengerVehicleNumber}", new Font("맑은 고딕", 12), Brushes.Black, e.MarginBounds.Left + 529, e.MarginBounds.Top + 460);
|
||||
|
||||
CenterTextWriter("화성도시공사 사장", new Font("맑은 고딕", 20, FontStyle.Bold), e.Graphics, totalWidth, e.MarginBounds.Top + 800);
|
||||
_count++;
|
||||
|
Reference in New Issue
Block a user