Beispiel #1
0
 public void LoadRecvModel(Ethernet ethernet)
 {
     this.Ethernet.ModelActions.Add((ValidateModel) =>
     {
         this.RecvModel  = ValidateModel;
         this.HasNewData = true;
     });
 }
Beispiel #2
0
        public SatelliteValidator()
        {
            InitializeComponent();
            this.Ethernet            = new Ethernet();
            this.HasNewData          = false;
            this.HasNewSerialData    = false;
            this.ComPortOpen         = false;
            this.RecvModel           = new ValidateModel();
            this.SerialCommunication = new Serial();


            this.LoadRecvModel(this.Ethernet);
            this.LoadRecvSerial(this.SerialCommunication);



            this.EthernetThread = new Thread(this.Ethernet.Poll);
            this.EthernetThread.IsBackground = true;
            this.EthernetThread.Start();


            this.SerialThread = new Thread(this.SerialCommunication.Receive);
            this.SerialThread.IsBackground = true;



            Populate();

            this.DrawTimer          = new FormsTimer.Timer();
            this.DrawTimer.Interval = 100;
            this.DrawTimer.Tick    += new EventHandler(DrawData);

            this.SerialTimer          = new FormsTimer.Timer();
            this.SerialTimer.Interval = 100;
            this.SerialTimer.Tick    += new EventHandler(DrawSerialData);

            this.DrawTimer.Start();
            this.SerialTimer.Start();
        }