protected override object[] GetPerceptives(BaseSerial serial) { var smallSerial = serial as SmallSerial; return(smallSerial == null ? null : new object[] { smallSerial.Date, smallSerial.Model, smallSerial.LsItemCode, String.Format("{0} {1}", smallSerial.Serial, serial.Pos) }); }
protected override object[] GetPerceptives(BaseSerial serial) { var bigSerial = serial as BigSerial; return(bigSerial == null ? null : new object[] { bigSerial.Date, bigSerial.LsItemCode, bigSerial.Serial, bigSerial.Model }); }
protected internal override int Comp(BaseSerial serial1, BaseSerial serial2) { if (serial1.Printer.NumOfSerialPerLabel < serial2.Printer.NumOfSerialPerLabel) { return(1); } if (serial1.Printer.NumOfSerialPerLabel > serial2.Printer.NumOfSerialPerLabel) { return(-1); } return(0); }
public virtual bool SendText(string text) { if (IsOpen == false) { return(false); } try { if (string.IsNullOrEmpty(text) == false) { BaseSerial?.Write(text + (EndOfLineChar ?? "\n")); } } catch { return(false); } return(true); }
public virtual bool Open(string portName, int speed) { if (IsOpen == true) { Close(); } if (string.IsNullOrEmpty(portName) == true) { return(false); } try { BaseSerial.PortName = portName; BaseSerial.BaudRate = speed; BaseSerial.Open(); } catch { } return(IsOpen); }
protected internal override bool IsStrong(BaseSerial serial) { return(serial is BigSerial); }
protected internal override bool IsStrong(BaseSerial serial) { return(!(serial is BigSerial) && (serial is SmallSerial)); }
private bool MatchRemove(BaseSerial serial) { return(MatchRemove(serial.Info as T1)); }
public virtual void Close() { BaseSerial?.Close(); }