コード例 #1
0
        protected override void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent)
        {
            NumberMatcher backingMatcher = (NumberMatcher)matcher;

            backingMatcher.ignoredPrefix = parent.Prefix;
            backingMatcher.ignoredSuffix = parent.Suffix;

            if (DecimalSeparator != "")
            {
                backingMatcher.decimalSeparator = DecimalSeparator[0];
            }
            else
            {
                backingMatcher.decimalSeparator = null;
            }

            if (GroupSeparator != "")
            {
                backingMatcher.groupSeparator = GroupSeparator[0];
            }
            else
            {
                backingMatcher.groupSeparator = null;
            }
        }
コード例 #2
0
ファイル: TextMatcherVM.cs プロジェクト: Katharsas/LogViewer
        protected override void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent)
        {
            TextConfigurableMatcher backingMatcher = (TextConfigurableMatcher)matcher;

            backingMatcher.ignoredPrefix = parent.Prefix;
            backingMatcher.ignoredSuffix = parent.Suffix;
            backingMatcher.Separator     = parent.Separator;
        }
コード例 #3
0
        protected override void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent)
        {
            DateTimeFormatMatcher backingMatcher = (DateTimeFormatMatcher)matcher;

            backingMatcher.Format        = DateTimeFormat;
            backingMatcher.ignoredPrefix = parent.Prefix;
            backingMatcher.ignoredSuffix = parent.Suffix;
            backingMatcher.Separator     = parent.Separator;
        }
コード例 #4
0
        public void propagateToBackingMatchers(MyBindingList <IMatcher <IComparable> > matchers, GeneralMatcherVM parent)
        {
            Console.WriteLine("At matcher");
            if (backingMatcher == null)
            {
                // if new matcher was removed before being applied
                if (removed)
                {
                    return;
                }

                // if matcher is new
                backingMatcher = createBackingMatcher();
                updateBackingMatcher(backingMatcher, parent);
                matchers.Add(backingMatcher);
            }
            else
            {
                if (removed)
                {
                    // if existing matcher is removed
                    matchers.Remove(backingMatcher);
                }
                else
                {
                    // if existing matcher was changed
                    updateBackingMatcher(backingMatcher, parent);
                }
            }
        }
コード例 #5
0
 protected abstract void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent);
コード例 #6
0
ファイル: RegexMatcherVM.cs プロジェクト: Katharsas/LogViewer
        protected override void updateBackingMatcher(IMatcher <IComparable> matcher, GeneralMatcherVM parent)
        {
            InlineRegexMatcher backingMatcher = (InlineRegexMatcher)matcher;

            backingMatcher.Pattern = Pattern;
        }