示例#1
0
        public void Update()
        {
            if (ReportItems != null && ReportItems.Any())
            {
                var deleteItems = new List <ReportItem>(ReportItems.Where(x => x != null && x.Delete));
                foreach (var reportItem in deleteItems)
                {
                    ReportItems.Remove(reportItem);
                }

                State = CalculateState();
            }
        }
示例#2
0
        private ReportItemState CalculateState()
        {
            if (ReportItems.Any(x => x != null && x.State == ReportItemState.Failure))
            {
                return(ReportItemState.Failure);
            }

            if (ReportItems.Any(x => x != null && x.State == ReportItemState.Warning))
            {
                return(ReportItemState.Warning);
            }

            return(ReportItemState.Success);
        }
 private bool PrintCanExecute(object obj) => ReportItems.Any();