/// <summary> /// Frees any area selection tool. /// </summary> void FreeAreaSelectionTool() { if (m_Sel!=null) { m_Sel = null; ActiveDisplay.MapPanel.Cursor = Cursors.Default; } }
/// <summary> /// Ensures the area selection tool has been created. /// </summary> /// <returns>The area selection tool (never null)</returns> /// <remarks> /// The selection tool should get created when the user moves the mouse while /// holding down the CTRL key. However, it's possible the user might do something /// like press CTRL and then do a mouse down (without moving the mouse). /// </remarks> SelectionTool GetAreaSelectionTool() { // If we're currently auto-highlighting, get rid of it altogether (confuses things). if (m_IsAutoSelect != 0) AutoSelect = false; // Ensure any property window has been removed m_Main.ClosePropertiesWindow(); if (m_Sel==null) { m_Sel = new SelectionTool(this); ActiveDisplay.MapPanel.Cursor = SelectionTool.Cursor; } return m_Sel; }
/// <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); }