/// <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); } }
/// <summary> /// FormClosing event handler that's called when inverse calculator dialog /// is closed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void InverseFormClosing(object sender, FormClosingEventArgs e) { m_Inverse = null; ISpatialDisplay display = EditingController.Current.ActiveDisplay; display.RestoreLastDraw(); display.PaintNow(); }
public override void Close() { // Shut down any inverse calculator if (m_Inverse != null) { m_Inverse.Dispose(); m_Inverse = null; } // Write out the project settings if (m_Project != null) { new ProjectDatabase().CloseProject(m_Project); m_Project = null; } }
/// <summary> /// Starts the specified inverse calculation dialog. /// </summary> /// <param name="invCalcForm">The dialog to start</param> internal void StartInverseCalculator(InverseForm invCalcForm) { m_Inverse = invCalcForm; m_Inverse.FormClosing += new FormClosingEventHandler(InverseFormClosing); m_Inverse.Show(); }