принтер принтит принты
This commit is contained in:
parent
1fa7832bd7
commit
17403f4ce9
@ -13,6 +13,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BarCode" Version="2024.6.1" />
|
||||
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
||||
<PackageReference Include="IronPrint" Version="2024.6.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
|
||||
<PackageReference Include="PdfSharp.MigraDoc.Standard" Version="1.51.15" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.6.0" />
|
||||
|
32
WinFormsApp/FormMain.Designer.cs
generated
32
WinFormsApp/FormMain.Designer.cs
generated
@ -28,6 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
|
||||
dataGridView = new DataGridView();
|
||||
buttonCreateSupply = new Button();
|
||||
menuStrip1 = new MenuStrip();
|
||||
@ -36,6 +37,9 @@
|
||||
buttonSupplyStatusArriving = new Button();
|
||||
buttonSupplyStatusCompleted = new Button();
|
||||
buttonCreateReport = new Button();
|
||||
buttonPrintReport = new Button();
|
||||
printPreviewDialog = new PrintPreviewDialog();
|
||||
printDialog = new PrintDialog();
|
||||
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||
menuStrip1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
@ -112,11 +116,36 @@
|
||||
buttonCreateReport.UseVisualStyleBackColor = true;
|
||||
buttonCreateReport.Click += buttonCreateReport_Click;
|
||||
//
|
||||
// buttonPrintReport
|
||||
//
|
||||
buttonPrintReport.Location = new Point(707, 274);
|
||||
buttonPrintReport.Name = "buttonPrintReport";
|
||||
buttonPrintReport.Size = new Size(154, 44);
|
||||
buttonPrintReport.TabIndex = 6;
|
||||
buttonPrintReport.Text = "Распечатать отчет";
|
||||
buttonPrintReport.UseVisualStyleBackColor = true;
|
||||
buttonPrintReport.Click += buttonPrintReport_Click;
|
||||
//
|
||||
// printPreviewDialog
|
||||
//
|
||||
printPreviewDialog.AutoScrollMargin = new Size(0, 0);
|
||||
printPreviewDialog.AutoScrollMinSize = new Size(0, 0);
|
||||
printPreviewDialog.ClientSize = new Size(400, 300);
|
||||
printPreviewDialog.Enabled = true;
|
||||
printPreviewDialog.Icon = (Icon)resources.GetObject("printPreviewDialog.Icon");
|
||||
printPreviewDialog.Name = "printPreviewDialog";
|
||||
printPreviewDialog.Visible = false;
|
||||
//
|
||||
// printDialog
|
||||
//
|
||||
printDialog.UseEXDialog = true;
|
||||
//
|
||||
// FormMain
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(901, 384);
|
||||
Controls.Add(buttonPrintReport);
|
||||
Controls.Add(buttonCreateReport);
|
||||
Controls.Add(buttonSupplyStatusCompleted);
|
||||
Controls.Add(buttonSupplyStatusArriving);
|
||||
@ -144,5 +173,8 @@
|
||||
private Button buttonSupplyStatusArriving;
|
||||
private Button buttonSupplyStatusCompleted;
|
||||
private Button buttonCreateReport;
|
||||
private Button buttonPrintReport;
|
||||
private PrintPreviewDialog printPreviewDialog;
|
||||
private PrintDialog printDialog;
|
||||
}
|
||||
}
|
@ -8,8 +8,11 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Printing;
|
||||
using System.Linq;
|
||||
using System.Reflection.Metadata;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
@ -167,5 +170,14 @@ namespace WinFormsApp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonPrintReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dialog = new OpenFileDialog();
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
IronPrint.Printer.PrintAsync(dialog.FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,4 +120,34 @@
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="printPreviewDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="printPreviewDialog.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAAAIAAoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA
|
||||
AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wD///8A////AP///wD///8A////AP///wD///8A////APb29v/29vb/9vb2//b29v/29vb/9vb2//b2
|
||||
9v////8A////AP///wD///8A9vb2//b29v/29vb/9vb2//b29v/29vb/QkJC/0JCQv9CQkL/QkJC/0JC
|
||||
Qv/29vb/////AP///wD///8A////APb29v9CQkL/QkJC/0JCQv9CQkL/9vb2/0JCQv9CQkL/QkJC/0JC
|
||||
Qv9CQkL/9vb2/////wD///8A////AP///wD29vb/QkJC/0JCQv9CQkL/QkJC//b29v9CQkL/QkJC/0JC
|
||||
Qv9CQkL/QkJC//b29v////8A////AP///wD///8A9vb2/0JCQv9CQkL/QkJC/0JCQv/29vb/9vb2//b2
|
||||
9v/29vb/9vb2//b29v/29vb/9vb2//b29v////8A////APb29v9CQkL/QkJC/0JCQv9CQkL/9vb2/0JC
|
||||
Qv9CQkL/QkJC/0JCQv9CQkL/QkJC/0JCQv/29vb/////AP///wD29vb/QkJC/0JCQv9CQkL/QkJC//b2
|
||||
9v9CQkL/QkJC/0JCQv9CQkL/QkJC/0JCQv9CQkL/9vb2/////wD///8A9vb2/0JCQv9CQkL/QkJC/0JC
|
||||
Qv/29vb/QkJC/0JCQv9CQkL/QkJC/0JCQv9CQkL/QkJC//b29v////8A////APb29v/29vb/9vb2//b2
|
||||
9v/29vb/9vb2/0JCQv9CQkL/QkJC/0JCQv9CQkL/QkJC/0JCQv/29vb/////AP///wD///8A////AP//
|
||||
/wD///8A////APb29v9CQkL/QkJC/0JCQv9CQkL/QkJC/0JCQv9CQkL/9vb2/////wD///8A////AP//
|
||||
/wD///8A////AP///wD29vb/QkJC/0JCQv9CQkL/QkJC/0JCQv9CQkL/QkJC//b29v////8A////AP//
|
||||
/wD///8A////AP///wD///8A9vb2/0JCQv9CQkL/QkJC/0JCQv9CQkL/QkJC/0JCQv/29vb/////AP//
|
||||
/wD///8A////AP///wD///8A////APb29v/29vb/9vb2//b29v/29vb/9vb2//b29v/29vb/9vb2////
|
||||
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wD///8A
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="printDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>286, 17</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user