Exemplo n.º 1
0
        /// <summary>
        /// Runs the file check.
        /// </summary>
        /// <returns>True if file check was initiated.</returns>
        internal bool Run()
        {
            // Get the user to specify what needs to be checked.
            FileCheckForm dial = new FileCheckForm();
            if (dial.ShowDialog()!=DialogResult.OK)
            {
                dial.Dispose();
                return false;
            }

            m_Options = dial.Options;
            dial.Dispose();

            // Confirm that at least one type of check has been specified
            if (m_Options==CheckType.Null)
            {
                MessageBox.Show("You must pick something you want to check.");
                return false;
            }

            // Start the item dialog (modeless).
            m_Status = new CheckReviewForm(this);
            m_Status.Show();

            // Make the initial check.
            int nCheck = CheckMap();

            // Let the review dialog know.
            m_Status.OnFinishCheck(nCheck, m_Results.Count);

            // Paint any markers... will be done by controller in idle time
            // Paint(false);

            // The check may have failed if an edit was in progress.
            return (nCheck>=0);
        }