Example #1
0
        /// <summary>
        /// Re-checks the map. This is invoked by the <see cref="CheckReviewForm"/> sub-dialog
        /// when the user hits the end of the list having made at least one edit.
        /// </summary>
        /// <returns>The number of objects checked (-1 if the map currently has an active
        /// operation in progress).</returns>
        internal int ReCheck()
        {
            // Update the last operation prior to the check results.
            m_OpSequence = CadastralMapModel.Current.LastOpSequence;

            // Redo the check.
            int nCheck = CheckMap();

            if (nCheck < 0)
            {
                return(nCheck);
            }

            // Make sure the review dialog knows that the check is done.
            if (m_Status != null)
            {
                m_Status.OnFinishCheck(nCheck, m_Results.Count);
            }

            return(nCheck);
        }
Example #2
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);
        }