2011-07-12 07:00:48 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.Print
|
|
|
|
|
{
|
|
|
|
|
internal class ThermalPrinter
|
|
|
|
|
{
|
|
|
|
|
internal static PlatformPrinter Printer;
|
|
|
|
|
static ThermalPrinter()
|
|
|
|
|
{
|
2011-08-23 07:10:05 +00:00
|
|
|
|
Printer = RunningOnLinux() ? (PlatformPrinter)new PrinterLinux() : new PrinterWindows();
|
2011-07-12 07:00:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal static bool RunningOnLinux()
|
|
|
|
|
{
|
|
|
|
|
var platform = (int)Environment.OSVersion.Platform;
|
2011-07-12 08:47:55 +00:00
|
|
|
|
return (platform == 4) || (platform == 6) || (platform == 128);
|
2011-07-12 07:00:48 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|