private void UpdateMastets() { var selectedMaster = SelectedMaster?.Id; MasterList.Clear(); if (_showAllMasters) { foreach (var master in _requestService.GetMasters(null)) { MasterList.Add(master); } SelectedMaster = MasterList.FirstOrDefault(m => m.Id == selectedMaster); } else { if (_selectedHouseId.HasValue) { foreach (var master in _requestService.GetWorkersByHouseAndService(_selectedHouseId.Value, SelectedParentService.Id)) { MasterList.Add(master); } SelectedMaster = MasterList.FirstOrDefault(); } } }
public static void BuildMasterList() { lock (mLockSetupApiRegistry) { mMasterSetupApiDeviceList.Clear(); SetupApi.EnumClassDevs(null, SetupApi.DICFG.PRESENT | SetupApi.DICFG.ALLCLASSES, BuildMasterCallback, mMasterSetupApiDeviceList); mLastRefreshTime = DateTime.Now; } }
public void New() { MasterList.Clear(); IsDirty = true; }
public void Clear() { MasterList.Clear(); }