예제 #1
0
        public void InsertSubEvent(IBatchAddingEventModel model, TimeSpan timeSpan)
        {
            var targetAssignmentTypes = model.AssignmentTypes
                                        .OfType <TermStyle>().Where(o => o.SaftyGetProperty <bool?, ISelectable>(x => x.IsSelected) == true)
                                        .ToArray();
            var noAssignmentTypesSelected = targetAssignmentTypes.Count() == 0;

            TryDispatch(model, t => noAssignmentTypesSelected ||
                        targetAssignmentTypes.Any(o => o.Text == t.Text), model.GetDefaultAction(timeSpan));
        }
예제 #2
0
        public void InsertSubEvent(IBatchAddingEventModel model, TimeSpan timeSpan)
        {
            var targetAssignmentTypes = model.AssignmentTypes
                                             .OfType<TermStyle>().Where(o => o.SaftyGetProperty<bool?, ISelectable>(x => x.IsSelected) == true)
                                             .ToArray();
            var noAssignmentTypesSelected = targetAssignmentTypes.Count() == 0;

            TryDispatch(model, t => noAssignmentTypesSelected ||
                                    targetAssignmentTypes.Any(o => o.Text == t.Text), model.GetDefaultAction(timeSpan));
        }