Surge.Windows8.ViewModels.MainPage.FolderViewModel.Update C# (CSharp) Method

Update() public method

public Update ( ) : void
return void
        public void Update()
        {
            isUpdating = true;
            IsIncomplete = Children.Where(x => x.IsIncomplete).Count() > 0;
            IsWanted = Children.Where(x => x.IsWanted).Count() > 0;
            int numLow = Children.Where(x => x.Priority == 0).Count();
            int numMed = Children.Where(x => x.Priority == 1).Count();
            int numHigh = Children.Where(x => x.Priority == 2).Count();

            if (numLow > numMed && numLow > numHigh)
            {
                Priority = 0;
            }
            else if (numHigh > numMed)
            {
                Priority = 2;
            }
            else
            {
                // Default to normal priority
                Priority = 1;
            }

            isUpdating = false;
        }