示例#1
0
        private void SetFilterFlag(ref FilterField flags, FilterField field, bool value, [CallerMemberName] string propertyName = "")
        {
            if (value && !flags.HasFlag(field))
            {
                flags |= field;
            }
            else if (!value && flags.HasFlag(field))
            {
                flags &= ~field;
            }
            else
            {
                return;
            }

            this.NotifyPropertyChanged(propertyName);
            this.NotifyPropertyChanged("Description");
        }