/** On new scan event handler reloads the currently selected computer. */
        private void NewScan(object sender, NewScanEventArgs e)
        {
            var scan = e.NewScan;

            if (_selectedComputer != null && _selectedComputer.MacAddress == _clientConifg.Uuid)
            {
                LstScans.Items.Add(new ListViewItem(scan.ScanDate.ToString(), scan.Id));
                _selectedComputer = _computerController.GetComputer(c => c.MacAddress == _selectedComputer.MacAddress);
            }
        }
Beispiel #2
0
 /** Emits an event to notify all members that a new scan is added */
 public void EmitNewScan(object sender, NewScanEventArgs nsea)
 {
     OnNewScan(sender, nsea);
 }
Beispiel #3
0
 /** Event consumer reloads all computers when a new scan is added */
 private void OnNewScan(object sender, NewScanEventArgs e)
 {
     LoadComputers();
 }
Beispiel #4
0
 private void UpdateCanvas(NewScanEventArgs eventArgs)
 {
     UpdateCanvas(eventArgs.Points);
 }
Beispiel #5
0
 private void RPLidar_NewScan(object sender, NewScanEventArgs eventArgs)
 {
     Application.Current.Dispatcher.Invoke(() => UpdateCanvas(eventArgs));
 }