public static int GetSettableUSBSerialNumberLength(PrinterModel model, string portName) { PrinterInfo printerInfo = GetPrinterInfo(model); int length = printerInfo.SettableUSBSerialNumberLength; if (model == PrinterModel.TSP100) { if (!IsUSBPrinterClassPort(portName) && !IsUSBVendorClassPort(portName)) // Not USB interface { length = 0; } else if (IsTSP100IIIU(portName)) { length = 16; // TSP100IIIU supported 16digits USB-ID. } else { length = 8; // TSP100U, TSP100GT, TSP100IIU } } if (model == PrinterModel.BSC10) { if (IsTCPPort(portName)) // BSC10 LAN model { length = 0; } } return(length); }
public static bool GetSetUSBSerialNumberIsEnabled(PrinterModel model, string portName) { PrinterInfo printerInfo = GetPrinterInfo(model); bool isEnabled = GetSettableUSBSerialNumberLength(model, portName) != 0; return(isEnabled); }
public static bool GetCustomerDisplayIsEnabled(PrinterModel model, string portName) { PrinterInfo printerInfo = GetPrinterInfo(model); bool isEnabled = printerInfo.CustomerDisplayIsEnabled; if (model == PrinterModel.TSP100) { isEnabled = IsTSP100IIIU(portName); // Not support TSP100LAN, TSP100U, TSP100GT, TSP100IIU, TSP100IIIW, TSP100IIILAN, TSP100IIIBI. } return(isEnabled); }
public static bool GetUSBSerialNumberIsEnabledDefault(PrinterModel model, string portName) { PrinterInfo printerInfo = GetPrinterInfo(model); bool isEnabledDefault = printerInfo.USBSerialNumberIsEnabledDefault; if (model == PrinterModel.TSP100) { isEnabledDefault = IsTSP100IIIU(portName); // TSP100LAN, TSP100U, TSP100GT, TSP100IIU, TSP100IIIW, TSP100IIILAN and TSP100IIIBI USB serial number is enabled default is off. } return(isEnabledDefault); }
public static PrinterModel GetPrinterModelWithDeviceID(string deviceID) { foreach (KeyValuePair <PrinterModel, PrinterInfo> pair in ModelDictionary.ModelInformationDictionary) { PrinterModel model = pair.Key; PrinterInfo info = pair.Value; string[] refDeviceID = info.DeviceID; if (ContainsStringUpper(refDeviceID, deviceID)) { return(model); } } return(PrinterModel.Unknown); }
public static PrinterModel GetPrinterModelWithBTDeviceNamePrefix(string btDeviceNamePrefix) { foreach (KeyValuePair <PrinterModel, PrinterInfo> pair in ModelDictionary.ModelInformationDictionary) { PrinterModel model = pair.Key; PrinterInfo info = pair.Value; string[] refBTDeviceNamePrefix = info.BTDeviceNamePrefix; if (StartsWithUpper(btDeviceNamePrefix, refBTDeviceNamePrefix)) { return(model); } } return(PrinterModel.Unknown); }
public static PrinterModel GetPrinterModelWithModelName(string modelName) { foreach (KeyValuePair <PrinterModel, PrinterInfo> pair in ModelDictionary.ModelInformationDictionary) { PrinterModel model = pair.Key; PrinterInfo info = pair.Value; List <string> refModelNameList = new List <string>(info.ModelName); if (refModelNameList.Contains(modelName)) { return(model); } } return(PrinterModel.Unknown); }
public static bool GetProductSerialNumberIsEnabled(PrinterModel model, string portName, string deviceID) { PrinterInfo printerInfo = GetPrinterInfo(model); bool isEnabled = printerInfo.ProductSerialNumberIsEnabled; if (model == PrinterModel.TSP100) { if (IsTCPPort(portName) && deviceID.Equals(GetSimpleModelName(PrinterModel.TSP100))) // Setting manually. { isEnabled = true; } else { isEnabled = IsTSP100III(portName, deviceID); // Not support TSP100LAN, TSP100U, TSP100GT, TSP100IIU. } } return(isEnabled); }
public static PrinterModel GetPrinterModelWithDeviceIDAndNICName(string deviceID, string nicName) { foreach (KeyValuePair <PrinterModel, PrinterInfo> pair in ModelDictionary.ModelInformationDictionary) { PrinterModel model = pair.Key; PrinterInfo info = pair.Value; string[] refDeviceID = info.DeviceID; string refNICName = info.NICName; string _nicName = nicName; if (refNICName.Equals("")) { _nicName = ""; } if (ContainsStringUpper(refDeviceID, deviceID) && CompareStringUpper(refNICName, _nicName)) { return(model); } } return(PrinterModel.Unknown); }
public static bool GetAllReceiptsIsEnabled(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.AllReceiptsIsEnabled); }
public static int GetSoundVolumeMin(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.SoundVolumeMin); }
public static int GetSoundNumberDefault(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.SoundNumberDefault); }
public static bool GetChangeCashDrawerPolarityIsEnabled(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.ChangeCashDrawerPolarityIsEnabled); }
public static string[] GetDeviceID(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.DeviceID); }
public static Emulation GetEmulation(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.Emulation); }
public static bool GetCashDrawerIsEnabled(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.CashDrawerIsEnabled); }
public static bool GetPageModeIsEnabled(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.PageModeIsEnabled); }
public static bool GetBlackMarkDetectionIsEnabled(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.BlackMarkDetectionIsEnabled); }
public static bool GetRasterReceiptIsEnabled(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.RasterReceiptIsEnabled); }
public static string GetSimpleModelName(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.SimpleModelName); }
public static string[] GetModelName(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.ModelName); }
public static string GetNICName(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.NICName); }
public static string[] GetBTDeviceNamePrefix(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.BTDeviceNamePrefix); }
public static PaperSize GetDefaultPaperSize(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(new PaperSize(printerInfo.DefaultPaperSize)); }
public static bool GetMelodySpeakerIsEnabled(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.MelodySpeakerIsEnabled); }
public static bool GetBarcodeReaderIsEnabled(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.BarcodeReaderIsEnabled); }
public static string GetDefaultPortSettings(PrinterModel model) { PrinterInfo printerInfo = GetPrinterInfo(model); return(printerInfo.DefaultPortSettings); }