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();
                }
            }
        }
Beispiel #2
0
 public static void BuildMasterList()
 {
     lock (mLockSetupApiRegistry)
     {
         mMasterSetupApiDeviceList.Clear();
         SetupApi.EnumClassDevs(null, SetupApi.DICFG.PRESENT | SetupApi.DICFG.ALLCLASSES, BuildMasterCallback, mMasterSetupApiDeviceList);
         mLastRefreshTime = DateTime.Now;
     }
 }
Beispiel #3
0
 public void New()
 {
     MasterList.Clear();
     IsDirty = true;
 }
Beispiel #4
0
 public void Clear()
 {
     MasterList.Clear();
 }