コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EditingController"/> class.
        /// </summary>
        /// <param name="main">The main dialog for the Cadastral Editor application</param>
        internal EditingController(MainForm main)
            : base()
        {
            if (main == null)
            {
                throw new ArgumentNullException();
            }

            m_Project             = null;
            m_ActiveLayer         = null;
            m_Main                = main;
            m_IsAutoSelect        = 0;
            m_Inverse             = null;
            m_Check               = null;
            m_Sel                 = null;
            m_HasSelectionChanged = false;
            m_DataServer          = null;

            // If we know of a database, create the access class
            string cs = LastDatabase.ConnectionString;

            if (!String.IsNullOrWhiteSpace(cs))
            {
                m_DataServer = new DataServer(cs);
            }
        }
コード例 #2
0
        /// <summary>
        /// Starts a new file check. Prior to call, you should ensure that a check is not already
        /// running (see the <see cref="IsChecking"/> property).
        /// </summary>
        /// <exception cref="InvalidOperationException">If a file check is already underway</exception>
        /// <returns>True if check started ok. False if the <see cref="FileCheckUI.Run"/> method
        /// returned false.</returns>
        internal bool StartCheck()
        {
            if (m_Check != null)
            {
                throw new InvalidOperationException("File check is already running");
            }

            m_Check = new FileCheckUI();
            if (m_Check.Run())
            {
                TextFeature.AreReferencePointsDrawn = true;
                return(true);
            }

            m_Check = null;
            return(false);
        }
コード例 #3
0
 /// <summary>
 /// Performs any processing when a file check is being terminated. This nulls out the
 /// reference the controller has to the check driver object, and ensures all map displays
 /// have been refreshed (in case the check has left over any transient draw stuff).
 /// </summary>
 internal void OnFinishCheck()
 {
     m_Check = null;
     TextFeature.AreReferencePointsDrawn = false;
     RefreshAllDisplays();
 }
コード例 #4
0
 /// <summary>
 /// Performs any processing when a file check is being terminated. This nulls out the
 /// reference the controller has to the check driver object, and ensures all map displays
 /// have been refreshed (in case the check has left over any transient draw stuff).
 /// </summary>
 internal void OnFinishCheck()
 {
     m_Check = null;
     TextFeature.AreReferencePointsDrawn = false;
     RefreshAllDisplays();
 }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="EditingController"/> class.
        /// </summary>
        /// <param name="main">The main dialog for the Cadastral Editor application</param>
        internal EditingController(MainForm main)
            : base()
        {
            if (main==null)
                throw new ArgumentNullException();

            m_Project = null;
            m_ActiveLayer = null;
            m_Main = main;
            m_IsAutoSelect = 0;
            m_Inverse = null;
            m_Check = null;
            m_Sel = null;
            m_HasSelectionChanged = false;
            m_DataServer = null;

            // If we know of a database, create the access class
            string cs = LastDatabase.ConnectionString;
            if (!String.IsNullOrWhiteSpace(cs))
                m_DataServer = new DataServer(cs);
        }
コード例 #6
0
        /// <summary>
        /// Starts a new file check. Prior to call, you should ensure that a check is not already
        /// running (see the <see cref="IsChecking"/> property).
        /// </summary>
        /// <exception cref="InvalidOperationException">If a file check is already underway</exception>
        /// <returns>True if check started ok. False if the <see cref="FileCheckUI.Run"/> method
        /// returned false.</returns>
        internal bool StartCheck()
        {
            if (m_Check != null)
                throw new InvalidOperationException("File check is already running");

            m_Check = new FileCheckUI();
            if (m_Check.Run())
            {
                TextFeature.AreReferencePointsDrawn = true;
                return true;
            }

            m_Check = null;
            return false;
        }