Ejemplo n.º 1
0
 public InputHandler(ComController controller)
 {
     if (controller == null)
     {
         throw new ArgumentNullException("controller");
     }
     this.controller = controller;
     controller.DataReceived += HandleDataReceived;
     logName = "SerialReceived-" + DateTime.Now.ToString("yyyy-MM-dd-hh-mm") + ".bin";
 }
Ejemplo n.º 2
0
 public InputHandler(ComController controller)
 {
     if (controller == null)
     {
         throw new ArgumentNullException("controller");
     }
     this.controller          = controller;
     controller.DataReceived += HandleDataReceived;
     logName = "SerialReceived-" + DateTime.Now.ToString("yyyy-MM-dd-hh-mm") + ".bin";
 }
Ejemplo n.º 3
0
        public Form1()
        {
            InitializeComponent();

            controller = new ComController();
            ih = new InputHandler(controller);
            oh = new OutputHandler(controller);
            PortComboBox.Items.AddRange(ComController.ComPorts.Cast<object>().ToArray());
            if(PortComboBox.Items.Count > 0)
            {
                PortComboBox.SelectedIndex = 0;
            }
            RateComboBox.Items.AddRange(ComController.BaudRates.Cast<object>().ToArray());
            RateComboBox.SelectedIndex = RateComboBox.Items.Count - 1;

            ih.PacketReceived += ih_PacketReceived;
        }
Ejemplo n.º 4
0
 public OutputHandler(ComController controller)
 {
     this.controller = controller;
 }
Ejemplo n.º 5
0
 public OutputHandler(ComController controller)
 {
     this.controller = controller;
 }