Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
PrintLabel
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit fff4105d
由
刘韬
编写于
2024-02-22 13:21:04 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
52bdb57f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
6 行增加
和
6 行删除
PrintLabel/LabelPrint.cs
PrintLabel/PrintLabel.cs
PrintLabel_Test/Form1.cs
PrintLabel/LabelPrint.cs
查看文件 @
fff4105
...
...
@@ -469,9 +469,9 @@ namespace BLL
using
(
PrintDialog
dlg
=
new
PrintDialog
())
{
PrinterSettings
printerSettings
=
new
PrinterSettings
();
dlg
.
PrinterSettings
.
DefaultPageSettings
.
PaperSize
=
new
PaperSize
(
"C"
,
(
int
)(
Common
.
Label
[
labelIdx
].
Size_mm
.
Width
*
4.11
),
(
int
)(
Common
.
Label
[
labelIdx
].
Size_mm
.
Height
*
4.11
));
//
dlg.PrinterSettings.DefaultPageSettings.PaperSize = new PaperSize("C", (int)(Common.Label[labelIdx].Size_mm.Width * 4.11), (int)(Common.Label[labelIdx].Size_mm.Height * 4.11));
//dlg.PrinterSettings.DefaultPageSettings.PrinterResolution.Kind = PrinterResolutionKind.High;
dlg
.
PrinterSettings
.
DefaultPageSettings
.
PrinterSettings
.
PrinterResolutions
.
Add
(
new
PrinterResolution
{
Kind
=
PrinterResolutionKind
.
High
});
//
dlg.PrinterSettings.DefaultPageSettings.PrinterSettings.PrinterResolutions.Add(new PrinterResolution { Kind = PrinterResolutionKind.High });
if
(
dlg
.
ShowDialog
()
!=
DialogResult
.
OK
)
return
;
PrintDocument
print
=
new
PrintDocument
{
...
...
PrintLabel/PrintLabel.cs
查看文件 @
fff4105
...
...
@@ -364,7 +364,7 @@ namespace Asa
TscStauts
CheckTscStatus
()
{
public
TscStauts
CheckTscStatus
()
{
TscStauts
s
=
TscStauts
.
None
;
var
t
=
Task
.
Run
(()
=>
{
Console
.
WriteLine
(
"TID:"
+
GetCurrentThreadId
().
ToString
(
"X"
));
...
...
@@ -424,11 +424,11 @@ namespace Asa
/// <summary>
/// 纸张间隙mm,默认3mm
/// </summary>
public
double
Gap
=
3
;
public
double
Gap
=
2
;
/// <summary>
/// 纸张间隙偏移量mm,默认0.3mm
/// </summary>
public
double
GapOffset
=
0
.3
;
public
double
GapOffset
=
0
;
/// <summary>
/// 打印方向 1横向,0纵向,默认1
/// </summary>
...
...
PrintLabel_Test/Form1.cs
查看文件 @
fff4105
...
...
@@ -23,7 +23,7 @@ namespace PrintLabel_Test
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
{
print
=
new
Asa
.
PrintLabel
(
Application
.
StartupPath
+
"\\Label"
,
1
00
);
print
=
new
Asa
.
PrintLabel
(
Application
.
StartupPath
+
"\\Label"
,
3
00
);
print
.
PrintStatusChanged
+=
Print_PrintStatusChanged
;
loadlabelname
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论