Exemplo n.º 1
0
        private void TvLoggerTreeAfterSelect(object sender, TreeViewEventArgs e)
        {
            if (tvLoggerTree.Nodes.Count == 0)
            {
                return;
            }

            tvLoggerTree.SuspendDrawing();

            try
            {
                SetNodeColor(
                    tvLoggerTree.Nodes[0]
                    , SystemColors.ControlDarkDark
                    , true);

                if (e.Node != null)
                {
                    SetNodeColor(
                        e.Node
                        , SystemColors.ControlText
                        , tsbFilterRecursive.Checked);
                }
            }
            finally
            {
                tvLoggerTree.ResumeDrawing();

                if (mLogFilterHandler != null)
                {
                    mLogFilter = tvLoggerTree.SelectedNode.Parent == null
            ? null
            : new LogFilterLogger(e.Node.GetLoggerPath(), tsbFilterRecursive.Checked);

                    mLogFilterHandler.FilterChanged();
                }
            }
        }
Exemplo n.º 2
0
        private void TvLoggerTreeAfterSelect(object sender, TreeViewEventArgs e)
        {
            if (tvLoggerTree.Nodes.Count == 0)
            {
                return;
            }

            try
            {
                SetNodeColor(tvLoggerTree.Nodes[0]
                             , ThemeManager.CurrentApplicationTheme.ColorPalette.ContentForegroundDimmed
                             , ThemeManager.CurrentApplicationTheme.ColorPalette.SelectionForeground
                             , ThemeManager.CurrentApplicationTheme.ColorPalette.SelectionForegroundFocused
                             , true);

                if (e.Node != null)
                {
                    SetNodeColor(e.Node
                                 , ThemeManager.CurrentApplicationTheme.ColorPalette.ContentForeground
                                 , ThemeManager.CurrentApplicationTheme.ColorPalette.SelectionForeground
                                 , ThemeManager.CurrentApplicationTheme.ColorPalette.SelectionForegroundFocused
                                 , tsbFilterRecursive.Checked);
                }
            }
            finally
            {
                if (mLogFilterHandler != null)
                {
                    mLogFilter = tvLoggerTree.SelectedNode.Parent == null
            ? null
            : new LogFilterLogger(e.Node.GetLoggerPath(), tsbFilterRecursive.Checked);

                    mLogFilterHandler.FilterChanged();
                }
            }
        }