diff --git a/SlnMesnac.LabelPrint.BarTender/PrintManager.cs b/SlnMesnac.LabelPrint.BarTender/PrintManager.cs new file mode 100644 index 0000000..d1ab2c1 --- /dev/null +++ b/SlnMesnac.LabelPrint.BarTender/PrintManager.cs @@ -0,0 +1,149 @@ +using Seagull.BarTender.Print; +using SlnMesnac.LabelPrint.Bartender.equip; +using SlnMesnac.LabelPrint.BarTender.equip; +using SlnMesnac.LabelPrint.Log4net; +using SlnMesnac.LabelPrint.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SlnMesnac.LabelPrint.BarTender +{ + public class PrintManager + { + private LogHelper logHelper = LogHelper.Instance; + #region 单例实现 + private static readonly Lazy lazy = new Lazy(() => new PrintManager()); + + public static PrintManager Instance + { + get + { + return lazy.Value; + } + } + #endregion + + public PrintManager() { } + + /// + /// 标签打印 + /// + /// + public bool Print(BaseLabelInfo labelInfo) + { + bool result = false; + try + { + if (labelInfo.productType == "Gas" || labelInfo.productType == "TF") + { + result = this.PrintGasLabel(labelInfo); + }else if(labelInfo.productType == "Drum") + { + result = this.PrintDrumLabel(labelInfo); + }else if(labelInfo.productType == "Unit") + { + result = this.PrintUnitLabel(labelInfo); + }else if(labelInfo.productType == "Pallet") + { + result = this.PrintPalletLabel(labelInfo); + } + else + { + logHelper.Info("产品类型未匹配到对应的模板"); + } + + #region 测试代码 + /*Engine btEngine = new Engine(); + + // 启动Bartender引擎 + btEngine.Start(); + + // 打开打印模板 + LabelFormatDocument btFormat = btEngine.Documents.Open(@"C:\Path\To\Your\Template.btw"); + + // 设置模板中的变量值 + btFormat.SubStrings["VariableName"].Value = "Value"; + + // 打印模板 + btFormat.Print(); + + // 关闭模板 + btFormat.Close(SaveOptions.DoNotSaveChanges); + + // 关闭Bartender引擎 + btEngine.Stop();*/ + #endregion + + result = true; + } + catch (Exception ex) + { + logHelper.Error("标签打印异常", ex); + } + + return result; + } + + /// + /// 气体、不锈钢标签打印 + /// + /// + private bool PrintGasLabel(BaseLabelInfo labelInfo) + { + bool result = false; + PrintEquip equip = new GasLabelPrintEquip(); + equip.tempPath = "C:\\Users\\Administrator\\Desktop\\模板01.btw"; + equip.ParaClass = labelInfo; + equip.Open(); + result = equip.print(); + equip.Colse(); + return result; + } + + /// + /// + /// + /// + private bool PrintDrumLabel(BaseLabelInfo labelInfo) + { + bool result = false; + PrintEquip equip = new LabelPrintEquip(); + equip.tempPath = "C:\\Users\\Administrator\\Desktop\\模板01.btw"; + equip.ParaClass = labelInfo; + equip.Open(); + result = equip.print(); + equip.Colse(); + + return result; + } + + private bool PrintUnitLabel(BaseLabelInfo labelInfo) + { + bool result = false; + PrintEquip equip = new LabelPrintEquip(); + equip.tempPath = "C:\\Users\\Administrator\\Desktop\\模板01.btw"; + equip.ParaClass = labelInfo; + equip.Open(); + result = equip.print(); + equip.Colse(); + + return result; + } + + private bool PrintPalletLabel(BaseLabelInfo labelInfo) + { + bool result = false; + PrintEquip equip = new LabelPrintEquip(); + equip.tempPath = "C:\\Users\\Administrator\\Desktop\\模板01.btw"; + equip.ParaClass = labelInfo; + equip.Open(); + result = equip.print(); + equip.Colse(); + + return result; + } + } +} diff --git a/SlnMesnac.LabelPrint.BarTender/Properties/AssemblyInfo.cs b/SlnMesnac.LabelPrint.BarTender/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ee27811 --- /dev/null +++ b/SlnMesnac.LabelPrint.BarTender/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SlnMesnac.LabelPrint.BarTender")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SlnMesnac.LabelPrint.BarTender")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("6a110611-3f4c-46c2-a981-23a0145b1e9f")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SlnMesnac.LabelPrint.BarTender/SlnMesnac.LabelPrint.BarTender.csproj b/SlnMesnac.LabelPrint.BarTender/SlnMesnac.LabelPrint.BarTender.csproj new file mode 100644 index 0000000..29c8508 --- /dev/null +++ b/SlnMesnac.LabelPrint.BarTender/SlnMesnac.LabelPrint.BarTender.csproj @@ -0,0 +1,70 @@ + + + + + Debug + AnyCPU + {6A110611-3F4C-46C2-A981-23A0145B1E9F} + Library + Properties + SlnMesnac.LabelPrint.BarTender + SlnMesnac.LabelPrint.BarTender + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x64 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\SlnMesnac.LabelPrint.Library\Seagull.BarTender.Print.dll + + + + + + + + + + + + + + + + + + + + {7232269D-60AF-45F0-B614-8F9C4061C529} + SlnMesnac.LabelPrint.Common + + + {FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D} + SlnMesnac.LabelPrint.Log4net + + + {B68E5B08-F3E3-4AC0-A6ED-C31646956A0C} + SlnMesnac.LabelPrint.Model + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.BarTender/equip/GasLabelPrintEquip.cs b/SlnMesnac.LabelPrint.BarTender/equip/GasLabelPrintEquip.cs new file mode 100644 index 0000000..da89a5b --- /dev/null +++ b/SlnMesnac.LabelPrint.BarTender/equip/GasLabelPrintEquip.cs @@ -0,0 +1,42 @@ +using SlnMesnac.LabelPrint.Bartender.equip; +using SlnMesnac.LabelPrint.Common; +using SlnMesnac.LabelPrint.Log4net; +using SlnMesnac.LabelPrint.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SlnMesnac.LabelPrint.BarTender.equip +{ + public class GasLabelPrintEquip : PrintEquip + { + private readonly LogHelper logHelper = LogHelper.Instance; + private readonly JsonChange jsonChange = JsonChange.Instance; + + public override bool AddPara() + { + var para = base.ParaClass as BaseLabelInfo; + if (para != null) + { + try + { + logHelper.Info($"打印标签信息:{jsonChange.ModeToJson(para)}"); + base.EngineFormat.SubStrings["barcode"].Value = para.column_A.ToString(); + return true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + return false; + } + + } + else + { + return false; + } + } + } +} diff --git a/SlnMesnac.LabelPrint.BarTender/equip/LabelPrintEquip.cs b/SlnMesnac.LabelPrint.BarTender/equip/LabelPrintEquip.cs new file mode 100644 index 0000000..fb7acc9 --- /dev/null +++ b/SlnMesnac.LabelPrint.BarTender/equip/LabelPrintEquip.cs @@ -0,0 +1,37 @@ +using SlnMesnac.LabelPrint.Common; +using SlnMesnac.LabelPrint.Log4net; +using SlnMesnac.LabelPrint.Model; +using System; + +namespace SlnMesnac.LabelPrint.Bartender.equip +{ + public class LabelPrintEquip : PrintEquip + { + private readonly LogHelper logHelper = LogHelper.Instance; + private readonly JsonChange jsonChange = JsonChange.Instance; + public override bool AddPara() + { + var para = base.ParaClass as BaseLabelInfo; + if (para != null) + { + try + { + logHelper.Info($"打印标签信息:{jsonChange.ModeToJson(para)}"); + base.EngineFormat.SubStrings["barcode"].Value = para.column_A.ToString(); + return true; + } + catch (Exception e) + { + Console.WriteLine(e.ToString()); + return false; + } + + } + else + { + return false; + } + } + + } +} diff --git a/SlnMesnac.LabelPrint.BarTender/equip/PrintEquip.cs b/SlnMesnac.LabelPrint.BarTender/equip/PrintEquip.cs new file mode 100644 index 0000000..e390468 --- /dev/null +++ b/SlnMesnac.LabelPrint.BarTender/equip/PrintEquip.cs @@ -0,0 +1,96 @@ +using Seagull.BarTender.Print; +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace SlnMesnac.LabelPrint.Bartender.equip +{ + public abstract class PrintEquip + { + protected Engine engine = new Engine(true); + protected LabelFormatDocument EngineFormat; + + public object ParaClass; + + //模板名称 + public string tempPath = ""; + + + + public string findModePath() + { + + //string filePath =Common.Instance.TempBasePath; + //filePath = filePath + tempPath; + + string filePath = tempPath; + Console.WriteLine("打印路径:" + filePath); + return filePath; + + } + + public abstract bool AddPara(); + + public bool Open() + { + bool result = false; + try + { + string modePath = findModePath(); + if (File.Exists(modePath)) + { + EngineFormat = engine.Documents.Open(modePath); + result = true; + Console.WriteLine("文件打开成功" + modePath); + } + else + { + Console.WriteLine("未找到文件" + modePath); + } + } + catch (Exception e) + { + Console.WriteLine("文件打开失败"); + result = false; + } + + return result; + } + + public bool print() + { + bool result = false; + if (EngineFormat != null) + { + if (AddPara()) + { + Result re = EngineFormat.Print(); + result = re == Result.Success ? true : false; + string st = re == Result.Success ? "成功" : "失败"; + Console.WriteLine("文件打印" + st + re.ToString()); + } + else + { + Console.WriteLine("下传参数失败"); + } + } + return result; + } + + + public void Colse() + { + try + { + EngineFormat.Close(SaveOptions.DoNotSaveChanges);//不保存对打开模板的修改 + engine.Stop(); + } + catch + { } + } + + + + } +} diff --git a/SlnMesnac.LabelPrint.Common/JsonChange.cs b/SlnMesnac.LabelPrint.Common/JsonChange.cs new file mode 100644 index 0000000..502b136 --- /dev/null +++ b/SlnMesnac.LabelPrint.Common/JsonChange.cs @@ -0,0 +1,112 @@ +using Nancy.Json; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using SlnMesnac.LabelPrint.Log4net; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SlnMesnac.LabelPrint.Common +{ + public class JsonChange + { + private static readonly Lazy lazy = new Lazy(() => new JsonChange()); + public static JsonChange Instance + { + get + { + return lazy.Value; + } + } + + private LogHelper log = LogHelper.Instance; + + private JsonChange() { } + + /// + /// Model 实体转json + /// + /// 可以是单个实体,也可是实体集(即:ToList()) + /// + public string ModeToJson(object Model) + { + string str = ""; + JavaScriptSerializer serializer = new JavaScriptSerializer(); + try + { + str = serializer.Serialize(Model); + } + catch (Exception ex) + { + log.Error("Model转Json异常", ex); + } + return str; + } + + /// + /// json实体转Model + /// + /// + /// + /// + public T JsonToMode(string jsonStr) + { + T info = default(T); + JavaScriptSerializer serializer = new JavaScriptSerializer(); + try + { + info = serializer.Deserialize(jsonStr); + } + catch (Exception ex) + { + log.Error("Json转Model异常", ex); + } + return info; + } + + /// + /// object转dictionary + /// + /// + /// + public Dictionary objectToDictionary(string jsonData) + { + Dictionary result = new Dictionary(); + + var inf = JsonConvert.DeserializeObject>(jsonData); + + foreach (KeyValuePair item in inf) + { + if (item.Value != null) + { + var type = item.Value.GetType(); + if (type == typeof(JObject)) + { + var info = objectToDictionary(JsonConvert.SerializeObject(item.Value)); + foreach (KeyValuePair ite in info) + { + result.Add(ite.Key, ite.Value); + } + continue; + } + else if (type == typeof(JArray)) + { + JArray array = (JArray)item.Value; + var info = objectToDictionary(JsonConvert.SerializeObject(array[0])); + foreach (KeyValuePair ite in info) + { + result.Add(item.Key + ite.Key, ite.Value); + } + continue; + } + } + + result.Add(item.Key, item.Value); + } + + return result; + } + } +} diff --git a/SlnMesnac.LabelPrint.Common/Properties/AssemblyInfo.cs b/SlnMesnac.LabelPrint.Common/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2285a17 --- /dev/null +++ b/SlnMesnac.LabelPrint.Common/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SlnMesnac.LabelPrint.Common")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SlnMesnac.LabelPrint.Common")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("7232269d-60af-45f0-b614-8f9c4061c529")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SlnMesnac.LabelPrint.Common/SlnMesnac.LabelPrint.Common.csproj b/SlnMesnac.LabelPrint.Common/SlnMesnac.LabelPrint.Common.csproj new file mode 100644 index 0000000..689aad1 --- /dev/null +++ b/SlnMesnac.LabelPrint.Common/SlnMesnac.LabelPrint.Common.csproj @@ -0,0 +1,63 @@ + + + + + Debug + AnyCPU + {7232269D-60AF-45F0-B614-8F9C4061C529} + Library + Properties + SlnMesnac.LabelPrint.Common + SlnMesnac.LabelPrint.Common + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Nancy.2.0.0\lib\net452\Nancy.dll + + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + {FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D} + SlnMesnac.LabelPrint.Log4net + + + + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.Common/packages.config b/SlnMesnac.LabelPrint.Common/packages.config new file mode 100644 index 0000000..42eb93c --- /dev/null +++ b/SlnMesnac.LabelPrint.Common/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.FileOperate/FileHelper.cs b/SlnMesnac.LabelPrint.FileOperate/FileHelper.cs new file mode 100644 index 0000000..d0c00d0 --- /dev/null +++ b/SlnMesnac.LabelPrint.FileOperate/FileHelper.cs @@ -0,0 +1,101 @@ +using MiniExcelLibs; +using SlnMesnac.LabelPrint.Log4net; +using SlnMesnac.LabelPrint.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SlnMesnac.LabelPrint.FileOperate +{ + public class FileHelper + { + + private readonly LogHelper logHelper = LogHelper.Instance; + #region 单例实现 + private static readonly Lazy lazy = new Lazy(() => new FileHelper()); + + public static FileHelper Instance + { + get + { + return lazy.Value; + } + } + #endregion + + private FileHelper() { } + + /// + /// 读取Excel内容 + /// + /// + public List ReadExceFile(string filePath) + { + List result = null; + try + { + var sheetNames = MiniExcel.GetSheetNames(filePath); + + if (sheetNames != null) + { + + result = new List(); + + foreach (string sheetName in sheetNames) + { + //根据sheet读取文档内容 + List info = MiniExcel.Query(filePath, sheetName: sheetName).ToList(); + + if (info != null) + { + for (int i = 1; i < info.Count; i++) + { + //解析数据 + dynamic labelDynamic = info[i]; + BaseLabelInfo labelInfo = new BaseLabelInfo(); + labelInfo.label = labelDynamic; + labelInfo.productType = sheetName; + if(labelDynamic.A == null) + { + continue; + } + labelInfo.column_A = labelDynamic.A; + if (sheetName == "Pallet") + { + labelInfo.recordTime = DateTime.Now; + result.Add(labelInfo); + continue; + } + labelInfo.column_B = labelDynamic.B; + labelInfo.column_C = labelDynamic.C; + labelInfo.column_D = labelDynamic.D; + labelInfo.column_E = labelDynamic.E; + if (sheetName == "Unit") + { + labelInfo.recordTime = DateTime.Now; + result.Add(labelInfo); + continue; + } + labelInfo.column_F = labelDynamic.F; + labelInfo.column_G = labelDynamic.G; + labelInfo.column_H = labelDynamic.H; + labelInfo.column_I = labelDynamic.I; + labelInfo.column_J = labelDynamic.J; + labelInfo.recordTime = DateTime.Now; + result.Add(labelInfo); + } + } + } + } + } + catch (Exception ex) + { + logHelper.Error("Excel文件读取异常", ex); + } + + return result; + } + } +} diff --git a/SlnMesnac.LabelPrint.FileOperate/Properties/AssemblyInfo.cs b/SlnMesnac.LabelPrint.FileOperate/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cdbe5ef --- /dev/null +++ b/SlnMesnac.LabelPrint.FileOperate/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SlnMesnac.LabelPrint.FileOperate")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SlnMesnac.LabelPrint.FileOperate")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("9358487f-5988-4839-bbe9-6755807ef339")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SlnMesnac.LabelPrint.FileOperate/SlnMesnac.LabelPrint.FileOperate.csproj b/SlnMesnac.LabelPrint.FileOperate/SlnMesnac.LabelPrint.FileOperate.csproj new file mode 100644 index 0000000..050b92c --- /dev/null +++ b/SlnMesnac.LabelPrint.FileOperate/SlnMesnac.LabelPrint.FileOperate.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {9358487F-5988-4839-BBE9-6755807EF339} + Library + Properties + SlnMesnac.LabelPrint.FileOperate + SlnMesnac.LabelPrint.FileOperate + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\MiniExcel.1.31.2\lib\net45\MiniExcel.dll + + + + + + + + + + + + + + + + + + {FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D} + SlnMesnac.LabelPrint.Log4net + + + {B68E5B08-F3E3-4AC0-A6ED-C31646956A0C} + SlnMesnac.LabelPrint.Model + + + + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.FileOperate/packages.config b/SlnMesnac.LabelPrint.FileOperate/packages.config new file mode 100644 index 0000000..9a13a6e --- /dev/null +++ b/SlnMesnac.LabelPrint.FileOperate/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.Library/Seagull.BarTender.Print.dll b/SlnMesnac.LabelPrint.Library/Seagull.BarTender.Print.dll new file mode 100644 index 0000000..7c6c701 Binary files /dev/null and b/SlnMesnac.LabelPrint.Library/Seagull.BarTender.Print.dll differ diff --git a/SlnMesnac.LabelPrint.Log4net/LogHelper.cs b/SlnMesnac.LabelPrint.Log4net/LogHelper.cs new file mode 100644 index 0000000..743068d --- /dev/null +++ b/SlnMesnac.LabelPrint.Log4net/LogHelper.cs @@ -0,0 +1,147 @@ +using log4net.Config; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SlnMesnac.LabelPrint.Log4net +{ + public class LogHelper + { + private static readonly Lazy lazy = new Lazy(() => new LogHelper()); + public static LogHelper Instance + { + get + { + return lazy.Value; + } + } + + private readonly log4net.ILog loginfo = log4net.LogManager.GetLogger("loginfo"); + private readonly log4net.ILog logerror = log4net.LogManager.GetLogger("logerror"); + private readonly log4net.ILog logView = log4net.LogManager.GetLogger("viewlog"); + private readonly log4net.ILog sqllog = log4net.LogManager.GetLogger("sqllog"); + private readonly log4net.ILog semaphorelog = log4net.LogManager.GetLogger("semaphorelog"); + private readonly log4net.ILog logPlc = log4net.LogManager.GetLogger("plclog"); + private readonly log4net.ILog logRfid = log4net.LogManager.GetLogger("rfidlog"); + + /** + * 配置文件路径 + * + */ + //private readonly string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "log4net.config"); + private readonly string fileName = "C:\\项目代码\\RFID标签打印项目\\SlnMesnac.LabelPrint\\SlnMesnac.LabelPrint.Log4net\\config\\log4net.config"; + + private LogHelper() + { + if (File.Exists(fileName)) + { + XmlConfigurator.Configure(new FileInfo(fileName)); + } + } + + /// + /// 记录Info日志 + /// + /// + /// + public void Info(string msg) + { + if (loginfo.IsInfoEnabled) + { + loginfo.Info(msg); + } + } + + /// + /// 记录PLC日志 + /// + /// + public void PlcLog(string msg) + { + if (logPlc.IsInfoEnabled) + { + logPlc.Info(msg); + } + } + + /// + /// 记录Rfid日志 + /// + /// + public void RfidLog(string msg) + { + if (logRfid.IsInfoEnabled) + { + logRfid.Info(msg); + } + } + + /// + /// 界面日志 + /// + /// + public void ViewLog(string msg) + { + if (logView.IsInfoEnabled) + { + logView.Info(msg); + } + } + + public void SqlLog(string msg) + { + if (sqllog.IsInfoEnabled) + { + sqllog.Info(msg); + } + } + + public void SemaphoreLog(string msg) + { + if (semaphorelog.IsInfoEnabled) + { + semaphorelog.Info(msg); + } + } + + /// + /// 记录Error日志 + /// + /// + /// + public void Error(string info, Exception ex = null) + { + if (!string.IsNullOrEmpty(info) && ex == null) + { + logerror.ErrorFormat("【附加信息】 : {0}
", new object[] { info }); + } + else if (!string.IsNullOrEmpty(info) && ex != null) + { + string errorMsg = BeautyErrorMsg(ex); + logerror.ErrorFormat("【附加信息】 : {0}
{1}", new object[] { info, errorMsg }); + } + else if (string.IsNullOrEmpty(info) && ex != null) + { + string errorMsg = BeautyErrorMsg(ex); + logerror.Error(errorMsg); + } + } + + /// + /// 美化错误信息 + /// + /// 异常 + /// 错误信息 + private string BeautyErrorMsg(Exception ex) + { + string errorMsg = string.Format("【异常类型】:{0}
【异常信息】:{1}
【堆栈调用】:{2}", new object[] { ex.GetType().Name, ex.Message, ex.StackTrace }); + errorMsg = errorMsg.Replace("\r\n", "
"); + errorMsg = errorMsg.Replace("位置", "位置"); + return errorMsg; + } + + } +} diff --git a/SlnMesnac.LabelPrint.Log4net/Properties/AssemblyInfo.cs b/SlnMesnac.LabelPrint.Log4net/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7783379 --- /dev/null +++ b/SlnMesnac.LabelPrint.Log4net/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SlnMesnac.LabelPrint.Log4net")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SlnMesnac.LabelPrint.Log4net")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("fd6aa76e-79b1-4a0c-9cea-6ce09ccbdf9d")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SlnMesnac.LabelPrint.Log4net/SlnMesnac.LabelPrint.Log4net.csproj b/SlnMesnac.LabelPrint.Log4net/SlnMesnac.LabelPrint.Log4net.csproj new file mode 100644 index 0000000..42b9ef6 --- /dev/null +++ b/SlnMesnac.LabelPrint.Log4net/SlnMesnac.LabelPrint.Log4net.csproj @@ -0,0 +1,57 @@ + + + + + Debug + AnyCPU + {FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D} + Library + Properties + SlnMesnac.LabelPrint.Log4net + SlnMesnac.LabelPrint.Log4net + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\log4net.2.0.15\lib\net45\log4net.dll + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.Log4net/config/log4net.config b/SlnMesnac.LabelPrint.Log4net/config/log4net.config new file mode 100644 index 0000000..a9d7efb --- /dev/null +++ b/SlnMesnac.LabelPrint.Log4net/config/log4net.config @@ -0,0 +1,153 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.Log4net/packages.config b/SlnMesnac.LabelPrint.Log4net/packages.config new file mode 100644 index 0000000..4da49bf --- /dev/null +++ b/SlnMesnac.LabelPrint.Log4net/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.Model/BaseLabelInfo.cs b/SlnMesnac.LabelPrint.Model/BaseLabelInfo.cs new file mode 100644 index 0000000..02c0e09 --- /dev/null +++ b/SlnMesnac.LabelPrint.Model/BaseLabelInfo.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SlnMesnac.LabelPrint.Model +{ + public class BaseLabelInfo + { + public dynamic label { get; set; } + + /// + /// 产品类型 + /// + public string productType { get; set; } + + public object column_A { get; set; } + + public object column_B { get; set; } + + public object column_C { get; set; } + + public object column_D { get; set; } + + public object column_E { get; set; } + + public object column_F { get; set; } + + public object column_G { get; set; } + + public object column_H { get; set; } + + public object column_I { get; set; } + + public object column_J { get; set; } + + public DateTime recordTime { get; set; } + } +} diff --git a/SlnMesnac.LabelPrint.Model/Properties/AssemblyInfo.cs b/SlnMesnac.LabelPrint.Model/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6c4a886 --- /dev/null +++ b/SlnMesnac.LabelPrint.Model/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SlnMesnac.LabelPrint.Model")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SlnMesnac.LabelPrint.Model")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("b68e5b08-f3e3-4ac0-a6ed-c31646956a0c")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SlnMesnac.LabelPrint.Model/SlnMesnac.LabelPrint.Model.csproj b/SlnMesnac.LabelPrint.Model/SlnMesnac.LabelPrint.Model.csproj new file mode 100644 index 0000000..6e8d6b9 --- /dev/null +++ b/SlnMesnac.LabelPrint.Model/SlnMesnac.LabelPrint.Model.csproj @@ -0,0 +1,48 @@ + + + + + Debug + AnyCPU + {B68E5B08-F3E3-4AC0-A6ED-C31646956A0C} + Library + Properties + SlnMesnac.LabelPrint.Model + SlnMesnac.LabelPrint.Model + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.TaskQueue/Properties/AssemblyInfo.cs b/SlnMesnac.LabelPrint.TaskQueue/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0d3ada5 --- /dev/null +++ b/SlnMesnac.LabelPrint.TaskQueue/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("SlnMesnac.LabelPrint.TaskQueue")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("SlnMesnac.LabelPrint.TaskQueue")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("44b60510-5d95-4c48-949b-973b9b29dba6")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/SlnMesnac.LabelPrint.TaskQueue/SlnMesnac.LabelPrint.TaskQueue.csproj b/SlnMesnac.LabelPrint.TaskQueue/SlnMesnac.LabelPrint.TaskQueue.csproj new file mode 100644 index 0000000..e858847 --- /dev/null +++ b/SlnMesnac.LabelPrint.TaskQueue/SlnMesnac.LabelPrint.TaskQueue.csproj @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + {44B60510-5D95-4C48-949B-973B9B29DBA6} + Library + Properties + SlnMesnac.LabelPrint.TaskQueue + SlnMesnac.LabelPrint.TaskQueue + v4.7.2 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + {B68E5B08-F3E3-4AC0-A6ED-C31646956A0C} + SlnMesnac.LabelPrint.Model + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint.TaskQueue/TaskHelper.cs b/SlnMesnac.LabelPrint.TaskQueue/TaskHelper.cs new file mode 100644 index 0000000..e6e1a2e --- /dev/null +++ b/SlnMesnac.LabelPrint.TaskQueue/TaskHelper.cs @@ -0,0 +1,68 @@ +using SlnMesnac.LabelPrint.Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SlnMesnac.LabelPrint.TaskQueue +{ + public class TaskHelper + { + + #region 单例实现 + private static readonly Lazy lazy = new Lazy(() => new TaskHelper()); + + public static TaskHelper Instance + { + get + { + return lazy.Value; + } + } + #endregion + + #region 委托事件 + /// + /// 清除标签信息 + /// + /// + public delegate void ClearLabelInfoDataGrid(BaseLabelInfo baseLabelInfo); + public event ClearLabelInfoDataGrid ClearLabelInfoDataGridEvent; + #endregion + + public TaskHelper() { } + + private List labelTask = new List(); + + /// + /// 添加标签任务 + /// + /// + public void AddTask(List labelInfos) + { + if (labelInfos == null) return; + labelTask.AddRange(labelInfos); + } + + /// + /// 获取标签任务,根据时间返回第一个不同的标签 + /// + /// + public BaseLabelInfo GetTask() + { + return labelTask.OrderBy(x => x.recordTime).FirstOrDefault(); + } + + /// + /// 删除标签任务,打印完成后删除队列中的任务 + /// + /// + public void RemoveTask(BaseLabelInfo item) + { + labelTask.Remove(item); + ClearLabelInfoDataGridEvent?.Invoke(item); + } + + } +} diff --git a/SlnMesnac.LabelPrint.sln b/SlnMesnac.LabelPrint.sln new file mode 100644 index 0000000..1f0d433 --- /dev/null +++ b/SlnMesnac.LabelPrint.sln @@ -0,0 +1,61 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.34031.81 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlnMesnac.LabelPrint", "SlnMesnac.LabelPrint\SlnMesnac.LabelPrint.csproj", "{B55D0578-0611-47D8-828B-81A3445C18A1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlnMesnac.LabelPrint.BarTender", "SlnMesnac.LabelPrint.BarTender\SlnMesnac.LabelPrint.BarTender.csproj", "{6A110611-3F4C-46C2-A981-23A0145B1E9F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlnMesnac.LabelPrint.Model", "SlnMesnac.LabelPrint.Model\SlnMesnac.LabelPrint.Model.csproj", "{B68E5B08-F3E3-4AC0-A6ED-C31646956A0C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlnMesnac.LabelPrint.FileOperate", "SlnMesnac.LabelPrint.FileOperate\SlnMesnac.LabelPrint.FileOperate.csproj", "{9358487F-5988-4839-BBE9-6755807EF339}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlnMesnac.LabelPrint.Common", "SlnMesnac.LabelPrint.Common\SlnMesnac.LabelPrint.Common.csproj", "{7232269D-60AF-45F0-B614-8F9C4061C529}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlnMesnac.LabelPrint.Log4net", "SlnMesnac.LabelPrint.Log4net\SlnMesnac.LabelPrint.Log4net.csproj", "{FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SlnMesnac.LabelPrint.TaskQueue", "SlnMesnac.LabelPrint.TaskQueue\SlnMesnac.LabelPrint.TaskQueue.csproj", "{44B60510-5D95-4C48-949B-973B9B29DBA6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B55D0578-0611-47D8-828B-81A3445C18A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B55D0578-0611-47D8-828B-81A3445C18A1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B55D0578-0611-47D8-828B-81A3445C18A1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B55D0578-0611-47D8-828B-81A3445C18A1}.Release|Any CPU.Build.0 = Release|Any CPU + {6A110611-3F4C-46C2-A981-23A0145B1E9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A110611-3F4C-46C2-A981-23A0145B1E9F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A110611-3F4C-46C2-A981-23A0145B1E9F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A110611-3F4C-46C2-A981-23A0145B1E9F}.Release|Any CPU.Build.0 = Release|Any CPU + {B68E5B08-F3E3-4AC0-A6ED-C31646956A0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B68E5B08-F3E3-4AC0-A6ED-C31646956A0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B68E5B08-F3E3-4AC0-A6ED-C31646956A0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B68E5B08-F3E3-4AC0-A6ED-C31646956A0C}.Release|Any CPU.Build.0 = Release|Any CPU + {9358487F-5988-4839-BBE9-6755807EF339}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9358487F-5988-4839-BBE9-6755807EF339}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9358487F-5988-4839-BBE9-6755807EF339}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9358487F-5988-4839-BBE9-6755807EF339}.Release|Any CPU.Build.0 = Release|Any CPU + {7232269D-60AF-45F0-B614-8F9C4061C529}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7232269D-60AF-45F0-B614-8F9C4061C529}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7232269D-60AF-45F0-B614-8F9C4061C529}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7232269D-60AF-45F0-B614-8F9C4061C529}.Release|Any CPU.Build.0 = Release|Any CPU + {FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD6AA76E-79B1-4A0C-9CEA-6CE09CCBDF9D}.Release|Any CPU.Build.0 = Release|Any CPU + {44B60510-5D95-4C48-949B-973B9B29DBA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44B60510-5D95-4C48-949B-973B9B29DBA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44B60510-5D95-4C48-949B-973B9B29DBA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44B60510-5D95-4C48-949B-973B9B29DBA6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {86E1A9DC-391D-43D2-8EE2-676C848A4990} + EndGlobalSection +EndGlobal diff --git a/SlnMesnac.LabelPrint/App.config b/SlnMesnac.LabelPrint/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/SlnMesnac.LabelPrint/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SlnMesnac.LabelPrint/App.xaml b/SlnMesnac.LabelPrint/App.xaml new file mode 100644 index 0000000..cb67474 --- /dev/null +++ b/SlnMesnac.LabelPrint/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/SlnMesnac.LabelPrint/App.xaml.cs b/SlnMesnac.LabelPrint/App.xaml.cs new file mode 100644 index 0000000..9ad8198 --- /dev/null +++ b/SlnMesnac.LabelPrint/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace SlnMesnac.LabelPrint +{ + /// + /// App.xaml 的交互逻辑 + /// + public partial class App : Application + { + } +} diff --git a/SlnMesnac.LabelPrint/Icon.png b/SlnMesnac.LabelPrint/Icon.png new file mode 100644 index 0000000..1560465 Binary files /dev/null and b/SlnMesnac.LabelPrint/Icon.png differ diff --git a/SlnMesnac.LabelPrint/MainWindow.xaml b/SlnMesnac.LabelPrint/MainWindow.xaml new file mode 100644 index 0000000..5ca83e3 --- /dev/null +++ b/SlnMesnac.LabelPrint/MainWindow.xaml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + +