/** 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); } }
/** Emits an event to notify all members that a new scan is added */ public void EmitNewScan(object sender, NewScanEventArgs nsea) { OnNewScan(sender, nsea); }
/** Event consumer reloads all computers when a new scan is added */ private void OnNewScan(object sender, NewScanEventArgs e) { LoadComputers(); }
private void UpdateCanvas(NewScanEventArgs eventArgs) { UpdateCanvas(eventArgs.Points); }
private void RPLidar_NewScan(object sender, NewScanEventArgs eventArgs) { Application.Current.Dispatcher.Invoke(() => UpdateCanvas(eventArgs)); }