private void BtnAdd_Click(object sender, EventArgs e) { var d = new LocationBase { Kind = LocationBaseKind.Local, Name = "" }; LVLocations.AddObject(d); }
private void ScanLocation(LocationBase location, Device device) { UpdateWaitStatus("Processing " + location.Name + " ..."); try { if (location == null || device == null) { return; } m_rescanResults = RescanResults.Run(location.Id, device.Id); LVNew.AddObjects(m_rescanResults.NewFiles); LVMissing.AddObjects(m_rescanResults.MissingFiles); Application.DoEvents(); } catch (Exception err) { MessageBox.Show(err.Message); } }