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);
        }
Exemplo n.º 10
0
        public static bool GetAllReceiptsIsEnabled(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.AllReceiptsIsEnabled);
        }
Exemplo n.º 11
0
        public static int GetSoundVolumeMin(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.SoundVolumeMin);
        }
Exemplo n.º 12
0
        public static int GetSoundNumberDefault(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.SoundNumberDefault);
        }
Exemplo n.º 13
0
        public static bool GetChangeCashDrawerPolarityIsEnabled(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.ChangeCashDrawerPolarityIsEnabled);
        }
Exemplo n.º 14
0
        public static string[] GetDeviceID(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.DeviceID);
        }
Exemplo n.º 15
0
        public static Emulation GetEmulation(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.Emulation);
        }
Exemplo n.º 16
0
        public static bool GetCashDrawerIsEnabled(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.CashDrawerIsEnabled);
        }
Exemplo n.º 17
0
        public static bool GetPageModeIsEnabled(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.PageModeIsEnabled);
        }
Exemplo n.º 18
0
        public static bool GetBlackMarkDetectionIsEnabled(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.BlackMarkDetectionIsEnabled);
        }
Exemplo n.º 19
0
        public static bool GetRasterReceiptIsEnabled(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.RasterReceiptIsEnabled);
        }
Exemplo n.º 20
0
        public static string GetSimpleModelName(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.SimpleModelName);
        }
Exemplo n.º 21
0
        public static string[] GetModelName(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.ModelName);
        }
Exemplo n.º 22
0
        public static string GetNICName(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.NICName);
        }
Exemplo n.º 23
0
        public static string[] GetBTDeviceNamePrefix(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.BTDeviceNamePrefix);
        }
Exemplo n.º 24
0
        public static PaperSize GetDefaultPaperSize(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(new PaperSize(printerInfo.DefaultPaperSize));
        }
Exemplo n.º 25
0
        public static bool GetMelodySpeakerIsEnabled(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.MelodySpeakerIsEnabled);
        }
Exemplo n.º 26
0
        public static bool GetBarcodeReaderIsEnabled(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.BarcodeReaderIsEnabled);
        }
Exemplo n.º 27
0
        public static string GetDefaultPortSettings(PrinterModel model)
        {
            PrinterInfo printerInfo = GetPrinterInfo(model);

            return(printerInfo.DefaultPortSettings);
        }