Ejemplo n.º 1
0
        private static string ScanString(ScannerSettings settings)
        {
            var saver = string.Format("  Port:  {0}  Baud:  {1}  DataBits:  {2}  StopBits:  {3}  Parity: {4}",
                                      settings.Com, settings.Velo, settings.DataBits, settings.StopBits, settings.Par);

            return(saver);
        }
Ejemplo n.º 2
0
 public Scanner()
 {
     _sp              = new SerialPort();
     Settings         = new ScannerSettings();
     _sp.DtrEnable    = Properties.Settings.Default.DtrEnable;
     _sp.RtsEnable    = Properties.Settings.Default.RtsEnable;
     _sp.Handshake    = Properties.Settings.Default.Handshake;
     _sp.ReadTimeout  = Properties.Settings.Default.ReadTimeout;
     _sp.WriteTimeout = Properties.Settings.Default.WriteTimeout;
 }