Beispiel #1
0
        /// <summary>
        /// Update file progress indicator.
        /// </summary>
        void moSearch_EventUpdateProgress(object poSender, SearchEngine.EventParameters poEventArgs)
        {
            if (System.Windows.Forms.Cursor.Current != System.Windows.Forms.Cursors.WaitCursor)
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
            }
            int    nIncrement = poEventArgs.Number;
            string sMessage   = poEventArgs.Text;

            staStatusStrip.Text       = sMessage;
            toolStripStatusLabel.Text = sMessage;
            try
            {
                if (pbrPprogressBar.Value + nIncrement > pbrPprogressBar.Maximum)
                {
                    pbrPprogressBar.Maximum      += Math.Max(pbrPprogressBar.Maximum, nIncrement);
                    toolStripProgressBar.Maximum += Math.Max(toolStripProgressBar.Maximum, nIncrement);
                }
                pbrPprogressBar.Value      += nIncrement;
                toolStripProgressBar.Value += nIncrement;
            }
            catch
            {
            }
            finally
            {
                System.Windows.Forms.Application.DoEvents();
            }
        }
Beispiel #2
0
        /// <summary>
        /// End file progress indicator.
        /// </summary>
        void moSearch_EventEndOfProgress(object poSender, SearchEngine.EventParameters poEventArgs)
        {
            pbrPprogressBar.Value = pbrPprogressBar.Maximum;
            string sMessage = poEventArgs.Text;

            staStatusStrip.Text                 = sMessage;
            toolStripStatusLabel.Text           = sMessage;
            toolStripProgressBar.Value          = toolStripProgressBar.Maximum;
            cmdSearch.Enabled                   = true;
            cmdCancel.Enabled                   = false;
            cmdClose.Enabled                    = true;
            System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            System.Windows.Forms.Application.DoEvents();
        }
Beispiel #3
0
        /// <summary>
        /// Start file progress indicator.
        /// </summary>
        void moSearch_EventBeginProgress(object poSender, SearchEngine.EventParameters poEventArgs)
        {
            System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
            cmdSearch.Enabled = false;
            cmdCancel.Enabled = true;
            cmdClose.Enabled  = false;
            int    nMaximum = poEventArgs.Number;
            string sMessage = poEventArgs.Text;

            staStatusStrip.Text          = sMessage;
            toolStripStatusLabel.Text    = sMessage;
            toolStripProgressBar.Minimum = 0;
            toolStripProgressBar.Maximum = nMaximum;
            toolStripProgressBar.Value   = 0;
            pbrPprogressBar.Minimum      = 0;
            pbrPprogressBar.Maximum      = nMaximum;
            pbrPprogressBar.Value        = 0;
            System.Windows.Forms.Application.DoEvents();
        }
Beispiel #4
0
        /// <summary>
        /// Display found data in context.
        /// </summary>
        void moSearch_EventCriteriaPass(object poSender, SearchEngine.EventParameters poEventArgs)
        {
            string sData = poEventArgs.Text;

            if (txtResults.Text.Length <= 8192)
            {
                txtResults.Text += sData + Environment.NewLine;
            }
            else
            {
                if (!_resultsDisplayLimitReached)
                {
                    txtResults.Text            += "*************************" + Environment.NewLine;
                    txtResults.Text            += "* Display Limit Reached *" + Environment.NewLine;
                    txtResults.Text            += "*************************" + Environment.NewLine;
                    _resultsDisplayLimitReached = true;
                }
            }
            System.Windows.Forms.Application.DoEvents();
        }