public ApplicationEventFilterControl()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            _filter = new ApplicationEventFilter();

            filterTreeView.ImageList = filterImageList;

            createTreeView(filterTreeView, null);

            filterTreeView.KeyDown += filterTreeView_KeyDown;
            filterTreeView.KeyUp += filterTreeView_KeyUp;

            //filter view
            filterView = new FilterViewControl();
            filterView.Left = filterSplitter.Right;
            filterView.Height = filterPropertyGrid.Top;
            filterView.Width = Width - filterSplitter.Width - filterTreeView.Width;
            filterView.Top = 0;
            filterView.Dock = DockStyle.Fill;
            panel2.Controls.Add(filterView);
        }
        public EventMultiTracerControl()
        {
            try
            {
                InitializeComponent();

                _tracingOptions = new TracingOptions();
                tracingOptionsPropertyGrid.SelectedObject = _tracingOptions;

                _filterViewControl = new FilterViewControl();
                _filterViewControl.Dock = DockStyle.Fill;
                FilterTabPage.Controls.Add(_filterViewControl);
                //
                xPathStatementControl = new DescriptiveListEditorControl();
                xPathStatementControl.Dock = DockStyle.Fill;
                xPathStatementControl.LoadFromFile(TracingOptions.XPathFilePath);
                xPathTabPage.Controls.Add(xPathStatementControl);

                //_filterViewControl.Filter =
                // TODO: This will be a dynamic section (SD)
                logTransform1TabPage = new TextTransformerTabPage();
                logTransform2TabPage = new TextTransformerTabPage
                    (
                    new XsltTextTransformer
                        (
                        AppDomain.CurrentDomain.SetupInformation.ApplicationBase +
                        @"XsltEventTransform.xslt"
                        ));
                //
                // logTransform1TabPage
                //
                logTransform1TabPage.Location = new Point(4, 22);
                logTransform1TabPage.Name = "logTransform1TabPage";
                logTransform1TabPage.Size =
                    new Size
                        (
                        logEntryViewsTabControl.Width,
                        logEntryViewsTabControl.Height - 22
                        );
                logTransform1TabPage.TabIndex = 0;
                logTransform1TabPage.Text = "Xml";
                //
                // logTransform2TabPage
                //
                logTransform2TabPage.Location = new Point(4, 22);
                logTransform2TabPage.Name = "logTransform2TabPage";
                logTransform2TabPage.Size =
                    new Size
                        (
                        logEntryViewsTabControl.Width,
                        logEntryViewsTabControl.Height - 22
                        );
                logTransform2TabPage.TabIndex = 1;
                logTransform2TabPage.Text = "Message";
                //
                logEntryViewsTabControl.Controls.Add(logTransform1TabPage);
                logEntryViewsTabControl.Controls.Add(logTransform2TabPage);
                //
                //
                Resize += LogControl_Resize;

                #region  xpath quering proof of concept

                XmlElement xRoot = xEventsCache.CreateElement(null, "ArrayOfApplicationEvent", null);
                xEventsCache.AppendChild(xRoot);

                if (xPathStatementControl.ContextMenuStrip == null)
                {
                    xPathStatementControl.ContextMenuStrip =
                        new ContextMenuStrip();
                }
                xPathStatementControl.ContextMenuStrip.Items.AddRange
                    (
                    new ToolStripMenuItem[2]
                        {
                            applyFilterToolStripMenuItem,
                            cancelFilterToolStripMenuItem
                        });
                applyFilterToolStripMenuItem.Click += applyMenuItem_Click;
                cancelFilterToolStripMenuItem.Click += cancelFilterMenuItem_Click;

                XmlElement xFilterRoot = xEventsFilteredCache.CreateElement
                    (
                    null,
                    "ArrayOfApplicationEvent",
                    null
                    );
                xEventsFilteredCache.AppendChild(xFilterRoot);

                //xPathStatementControl.applyMenuItem.Click +=new EventHandler(applyMenuItem_Click);
                //xPathStatementControl.cancelFilterMenuItem.Click +=new EventHandler(cancelFilterMenuItem_Click);

                #endregion  xpath quering proof of concept

                #region Subscribing to the list view scroll event

                monitorPanel.Scroll += listView1_Scrolled;

                #endregion Subscribing to the list view scroll event

                keysControl = new ContextHolderPointersControl();
                keysControl.Dock = DockStyle.Fill;

                xQueryTabPage.Controls.Add(keysControl);

                monitorPanel.ContextMenu = monitorContolContextMenu;
                monitorPanel.ItemsListView.SelectedIndexChanged += listView1_SelectedIndexChanged;
                monitorPanel.ItemsListView.SetScrollBarMaxValue(1);
                countToShow = 20; //listView1.DisplayRectangle.Height / Convert.ToUInt16(listView1.Font.GetHeight());
                filterBySameFieldToolStripComboBox.ComboBox.DataSource = TraceRecord.CorrelationFieldNames;

                searchBackgroundWorker.DoWork += searchBackgroundWorker_DoFilterBySameFieldWork;
                searchBackgroundWorker.RunWorkerCompleted += searchBackgroundWorker_RunWorkerCompleted;

                navigator = xEventsCache.CreateNavigator();
                navigator.MoveToChild(XPathNodeType.Element);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }