コード例 #1
0
ファイル: QuickFilter.cs プロジェクト: Kittyfisto/Tailviewer
        public bool Restore(XmlReader reader)
        {
            int count = reader.AttributeCount;
            for (int i = 0; i < count; ++i)
            {
                reader.MoveToAttribute(i);

                switch (reader.Name)
                {
                    case "id":
                        _id = reader.ReadContentAsGuid();
                        break;

                    case "type":
                        MatchType = reader.ReadContentAsEnum<QuickFilterMatchType>();
                        break;

                    case "value":
                        Value = reader.Value;
                        break;

                    case "ignorecase":
                        IgnoreCase = reader.ReadContentAsBool();
                        break;

                    case "isinclude":
                        IsInverted = reader.ReadContentAsBool();
                        break;
                }
            }

            if (Id == Guid.Empty)
                return false;

            return true;
        }
コード例 #2
0
 private void OnIsStringCheckedChanged(bool newValue)
 {
     if (newValue)
     {
         IsWildcardChecked = false;
         IsRegexChecked = false;
         QuickFilterMatchType = QuickFilterMatchType.StringFilter;
     }
 }
コード例 #3
0
 private void OnQuickFilterTypeChanged(QuickFilterMatchType newValue)
 {
     IsStringChecked = newValue == QuickFilterMatchType.StringFilter;
     IsWildcardChecked = newValue == QuickFilterMatchType.WildcardFilter;
     IsRegexChecked = newValue == QuickFilterMatchType.RegexpFilter;
 }