コード例 #1
0
 void _tracer_ItemAddedEvent(TracerItemKeeperSink sink, TracerItem item)
 {
     if (toolStripButtonAutoUpdate.Checked)
     {// Only updating on new items added, when auto update is enabled.
         _itemsModified = true;
     }
 }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        public void UnLoad()
        {
            if (_timer != null)
            {
                _timer.Tick -= new EventHandler(_timer_Tick);
                _timer       = null;
            }

            if (_tracer != null)
            {
                _tracer.ItemAddedEvent -= new Tracer.ItemUpdateDelegate(_tracer_ItemAddedEvent);
                _tracer = null;
            }

            if (_targetStatusStrip != null)
            {
                _targetStatusStrip.Items.Remove(separator1);
                _targetStatusStrip.Items.Remove(separator2);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelSystemReport);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelReport);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelReportsLink);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelWarningsLink);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelErrorsLink);

                _targetStatusStrip = null;
            }

            _ownerControl   = null;
            _itemKeeperSink = null;

            lock (this)
            {
                _pendingMessageItems.Clear();
            }
        }
コード例 #3
0
        /// <summary>
        /// 
        /// </summary>
        public FormMain()
        {
            InitializeComponent();

            TracerItemKeeperSink sink = new TracerItemKeeperSink(_tracer);
            sink.MaxItems = 1000000;
            _tracer.Add(sink);

            _watcher.NotifyFilter = NotifyFilters.Attributes | NotifyFilters.CreationTime | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Size;
            _watcher.Changed += new FileSystemEventHandler(_watcher_Changed);
        }
コード例 #4
0
 void _itemKeeperSink_ItemsFilteredEvent(TracerItemKeeperSink tracer)
 {
     _itemsModified = true;
 }
コード例 #5
0
        /// <summary>
        ///
        /// </summary>
        public void Load(Control ownerControl, Timer timer, Tracer tracer, StatusStrip targetStatusStrip)
        {
            _timer       = timer;
            _timer.Tick += new EventHandler(_timer_Tick);

            _tracer = tracer;
            _tracer.ItemAddedEvent += new Tracer.ItemUpdateDelegate(_tracer_ItemAddedEvent);

            _itemKeeperSink = (TracerItemKeeperSink)_tracer.GetSinkByType(typeof(TracerItemKeeperSink));

            _targetStatusStrip = targetStatusStrip;

            _ownerControl = ownerControl;

            separator1 = new ToolStripSeparator();
            separator2 = new ToolStripSeparator();

            this.toolStripStatusLabelSystemReport = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabelReport       = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabelReportsLink  = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabelWarningsLink = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabelErrorsLink   = new System.Windows.Forms.ToolStripStatusLabel();

            //
            // toolStripStatusLabelSystemReport
            //
            this.toolStripStatusLabelSystemReport.ForeColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.toolStripStatusLabelSystemReport.Name      = "toolStripStatusLabelSystemReport";
            this.toolStripStatusLabelSystemReport.Size      = new System.Drawing.Size(78, 17);
            this.toolStripStatusLabelSystemReport.Text      = "System Report";
            //
            // toolStripStatusLabelReport
            //
            //this.toolStripStatusLabelReport.Image = ((System.Drawing.Image)(resources.GetObject("toolStripStatusLabelReport.Image")));
            this.toolStripStatusLabelReport.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.toolStripStatusLabelReport.IsLink     = false;
            this.toolStripStatusLabelReport.LinkColor  = System.Drawing.SystemColors.HighlightText;
            this.toolStripStatusLabelReport.Name       = "toolStripStatusLabelReport";
            this.toolStripStatusLabelReport.Size       = new System.Drawing.Size(127, 17);
            this.toolStripStatusLabelReport.Spring     = true;
            this.toolStripStatusLabelReport.Text       = "toolStripStatusLabel1";
            this.toolStripStatusLabelReport.TextAlign  = System.Drawing.ContentAlignment.MiddleLeft;
            //
            // toolStripStatusLabelReportsLink
            //
            this.toolStripStatusLabelReportsLink.IsLink    = false;
            this.toolStripStatusLabelReportsLink.LinkColor = System.Drawing.SystemColors.HighlightText;
            this.toolStripStatusLabelReportsLink.Name      = "toolStripStatusLabelReportsLink";
            this.toolStripStatusLabelReportsLink.Size      = new System.Drawing.Size(54, 17);
            this.toolStripStatusLabelReportsLink.Text      = "0 Reports";
            //
            // toolStripStatusLabelWarningsLink
            //
            this.toolStripStatusLabelWarningsLink.IsLink    = false;
            this.toolStripStatusLabelWarningsLink.LinkColor = System.Drawing.SystemColors.HighlightText;
            this.toolStripStatusLabelWarningsLink.Name      = "toolStripStatusLabelWarningsLink";
            this.toolStripStatusLabelWarningsLink.Size      = new System.Drawing.Size(61, 17);
            this.toolStripStatusLabelWarningsLink.Text      = "0 Warnings";
            //
            // toolStripStatusLabelErrorsLink
            //
            this.toolStripStatusLabelErrorsLink.IsLink    = false;
            this.toolStripStatusLabelErrorsLink.LinkColor = System.Drawing.SystemColors.HighlightText;
            this.toolStripStatusLabelErrorsLink.Name      = "toolStripStatusLabelErrorsLink";
            this.toolStripStatusLabelErrorsLink.Size      = new System.Drawing.Size(45, 17);
            this.toolStripStatusLabelErrorsLink.Text      = "0 Errors";

            targetStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[]
            {
//                separator1,
                this.toolStripStatusLabelSystemReport,
                this.toolStripStatusLabelReport,
                separator2,
                this.toolStripStatusLabelErrorsLink,
                this.toolStripStatusLabelWarningsLink,
                this.toolStripStatusLabelReportsLink,
            });

            ShowItem(null);
        }
コード例 #6
0
 void _tracer_ItemAddedEvent(TracerItemKeeperSink sink, TracerItem item)
 {
     _itemsModified = true;
 }
コード例 #7
0
        /// <summary>
        /// 
        /// </summary>
        public void Load(Control ownerControl, Timer timer, Tracer tracer, StatusStrip targetStatusStrip)
        {
            _timer = timer;
            _timer.Tick += new EventHandler(_timer_Tick);

            _tracer = tracer;
            _tracer.ItemAddedEvent += new Tracer.ItemUpdateDelegate(_tracer_ItemAddedEvent);

            _itemKeeperSink = (TracerItemKeeperSink)_tracer.GetSinkByType(typeof(TracerItemKeeperSink));

            _targetStatusStrip = targetStatusStrip;

            _ownerControl = ownerControl;

            separator1 = new ToolStripSeparator();
            separator2 = new ToolStripSeparator();

            this.toolStripStatusLabelSystemReport = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabelReport = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabelReportsLink = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabelWarningsLink = new System.Windows.Forms.ToolStripStatusLabel();
            this.toolStripStatusLabelErrorsLink = new System.Windows.Forms.ToolStripStatusLabel();

            //
            // toolStripStatusLabelSystemReport
            //
            this.toolStripStatusLabelSystemReport.ForeColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.toolStripStatusLabelSystemReport.Name = "toolStripStatusLabelSystemReport";
            this.toolStripStatusLabelSystemReport.Size = new System.Drawing.Size(78, 17);
            this.toolStripStatusLabelSystemReport.Text = "System Report";
            //
            // toolStripStatusLabelReport
            //
            //this.toolStripStatusLabelReport.Image = ((System.Drawing.Image)(resources.GetObject("toolStripStatusLabelReport.Image")));
            this.toolStripStatusLabelReport.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.toolStripStatusLabelReport.IsLink = false;
            this.toolStripStatusLabelReport.LinkColor = System.Drawing.SystemColors.HighlightText;
            this.toolStripStatusLabelReport.Name = "toolStripStatusLabelReport";
            this.toolStripStatusLabelReport.Size = new System.Drawing.Size(127, 17);
            this.toolStripStatusLabelReport.Spring = true;
            this.toolStripStatusLabelReport.Text = "toolStripStatusLabel1";
            this.toolStripStatusLabelReport.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            //
            // toolStripStatusLabelReportsLink
            //
            this.toolStripStatusLabelReportsLink.IsLink = false;
            this.toolStripStatusLabelReportsLink.LinkColor = System.Drawing.SystemColors.HighlightText;
            this.toolStripStatusLabelReportsLink.Name = "toolStripStatusLabelReportsLink";
            this.toolStripStatusLabelReportsLink.Size = new System.Drawing.Size(54, 17);
            this.toolStripStatusLabelReportsLink.Text = "0 Reports";
            //
            // toolStripStatusLabelWarningsLink
            //
            this.toolStripStatusLabelWarningsLink.IsLink = false;
            this.toolStripStatusLabelWarningsLink.LinkColor = System.Drawing.SystemColors.HighlightText;
            this.toolStripStatusLabelWarningsLink.Name = "toolStripStatusLabelWarningsLink";
            this.toolStripStatusLabelWarningsLink.Size = new System.Drawing.Size(61, 17);
            this.toolStripStatusLabelWarningsLink.Text = "0 Warnings";
            //
            // toolStripStatusLabelErrorsLink
            //
            this.toolStripStatusLabelErrorsLink.IsLink = false;
            this.toolStripStatusLabelErrorsLink.LinkColor = System.Drawing.SystemColors.HighlightText;
            this.toolStripStatusLabelErrorsLink.Name = "toolStripStatusLabelErrorsLink";
            this.toolStripStatusLabelErrorsLink.Size = new System.Drawing.Size(45, 17);
            this.toolStripStatusLabelErrorsLink.Text = "0 Errors";

            targetStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[]
            {
            //                separator1,
                this.toolStripStatusLabelSystemReport,
                this.toolStripStatusLabelReport,
                separator2,
                this.toolStripStatusLabelErrorsLink,
                this.toolStripStatusLabelWarningsLink,
                this.toolStripStatusLabelReportsLink,
            });

            ShowItem(null);
        }
コード例 #8
0
        /// <summary>
        /// 
        /// </summary>
        public void UnLoad()
        {
            if (_timer != null)
            {
                _timer.Tick -= new EventHandler(_timer_Tick);
                _timer = null;
            }

            if (_tracer != null)
            {
                _tracer.ItemAddedEvent -= new Tracer.ItemUpdateDelegate(_tracer_ItemAddedEvent);
                _tracer = null;
            }

            if (_targetStatusStrip != null)
            {
                _targetStatusStrip.Items.Remove(separator1);
                _targetStatusStrip.Items.Remove(separator2);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelSystemReport);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelReport);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelReportsLink);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelWarningsLink);
                _targetStatusStrip.Items.Remove(this.toolStripStatusLabelErrorsLink);

                _targetStatusStrip = null;
            }

            _ownerControl = null;
            _itemKeeperSink = null;

            lock (this)
            {
                _pendingMessageItems.Clear();
            }
        }
コード例 #9
0
 void _tracer_ItemAddedEvent(TracerItemKeeperSink sink, TracerItem item)
 {
     if (toolStripButtonAutoUpdate.Checked)
     {// Only updating on new items added, when auto update is enabled.
         _itemsModified = true;
     }
 }
コード例 #10
0
 void _itemKeeperSink_ItemsFilteredEvent(TracerItemKeeperSink tracer)
 {
     _itemsModified = true;
 }
コード例 #11
0
 void _tracer_ItemAddedEvent(TracerItemKeeperSink sink, TracerItem item)
 {
     _itemsModified = true;
 }