Initial commit

Initial commit til Git.
V2 er deployed
This commit is contained in:
2026-06-13 17:31:50 +02:00
parent 9fcd2b145e
commit 41e23b6184
375 changed files with 15956 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EpsonPrinter.Enums;
using EpsonPrinter.Model;
using ESCPOS_NET.Emitters;
namespace EpsonPrinter.Services
{
public class PrintStyleCombination
{
public PrintStyle Combine(PrintStyleModel printStyleModel)
{
//Bold
if (printStyleModel.Bold && !printStyleModel.DoubleHeight && !printStyleModel.DoubleWidth && !printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.Bold;
if (printStyleModel.Bold && printStyleModel.DoubleHeight && !printStyleModel.DoubleWidth && !printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.Bold | PrintStyle.DoubleHeight;
if(printStyleModel.Bold && printStyleModel.DoubleHeight && printStyleModel.DoubleWidth && !printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.Bold | PrintStyle.DoubleHeight | PrintStyle.DoubleWidth;
if (printStyleModel.Bold && printStyleModel.DoubleHeight && printStyleModel.DoubleWidth && printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.Bold | PrintStyle.DoubleHeight | PrintStyle.DoubleWidth | PrintStyle.FontB;
if (printStyleModel.Bold && printStyleModel.DoubleHeight && printStyleModel.DoubleWidth && printStyleModel.FontB && printStyleModel.Underline)
return PrintStyle.Bold | PrintStyle.DoubleHeight | PrintStyle.DoubleWidth | PrintStyle.FontB | PrintStyle.Underline;
//DoubleHeight
if (printStyleModel.DoubleHeight && !printStyleModel.DoubleWidth && !printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.DoubleHeight;
if (printStyleModel.DoubleHeight && printStyleModel.DoubleWidth && !printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.DoubleHeight | PrintStyle.DoubleWidth;
if (printStyleModel.DoubleHeight && printStyleModel.DoubleWidth && printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.DoubleHeight | PrintStyle.DoubleWidth | PrintStyle.FontB;
if (printStyleModel.DoubleHeight && printStyleModel.DoubleWidth && printStyleModel.FontB && printStyleModel.Underline)
return PrintStyle.DoubleHeight | PrintStyle.DoubleWidth | PrintStyle.FontB | PrintStyle.Underline;
//DoubleWidth
if (printStyleModel.DoubleWidth && !printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.DoubleWidth;
if (printStyleModel.DoubleWidth && printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.DoubleWidth | PrintStyle.FontB;
if (printStyleModel.DoubleWidth && printStyleModel.FontB && printStyleModel.Underline)
return PrintStyle.DoubleWidth | PrintStyle.FontB | PrintStyle.Underline;
//FontB
if (printStyleModel.FontB && !printStyleModel.Underline)
return PrintStyle.FontB;
if(printStyleModel.FontB && printStyleModel.Underline)
return PrintStyle.FontB | PrintStyle.Underline;
//Underline
if (printStyleModel.Underline)
return PrintStyle.Underline;
return PrintStyle.None;
}
}
}