/// <summary> /// Updates a specific feature. /// </summary> /// <param name="update">The feature selected for update.</param> /// <returns>True if feature accepted for update. False if an update is already in progress.</returns> internal bool Run(Feature update) { // Return if we're currently updating something, or we've // hit a problem during rollforward. if (m_Cmd != null || m_Problem != null) { return(false); } // If we prevously had something selected for update, // undo any drawing that we did for it. ErasePainting(); // Remember the specified feature. m_SelectedFeature = update; // If the info dialog has not already been displayed, display it now. if (m_Info == null) { m_Info = new UpdateForm(this); m_Info.Show(); } // Get the info window to display stuff about the selected feature. m_Info.Display(m_SelectedFeature); // Leave keyboard focus with the info dialog. m_Info.Focus(); // Draw stuff. Draw(); ActiveDisplay.PaintNow(); return(true); }
internal void FinishCommand(CommandUI cmd) { if (!Object.ReferenceEquals(cmd, m_Command)) { throw new InvalidOperationException(); } /* * if ( pCmd->GetCommandId() == ID_FILE_PRINT_WINDOW ) * { * CuiGetRectangle* pRect = dynamic_cast<CuiGetRectangle*>(pCmd); * CeVertex corners[5]; * if ( pRect->GetCorners(corners) ) * m_PrintData.SetPrintCorners(corners); * else * { * m_PrintData.SetPrintCorners(0); * m_PrintData.SetRotation(0.0); * } * } */ SetNormalCursor(); // Refresh everything from the model. This may seem a bit of an effort, considering // that many edits don't do much to the display (some don't do anything). However, // it's fast and keeps things clean in more complex cases. Do it before saving the // map model, since it gives the impression that things are more responsive than // they actually are! RefreshAllDisplays(); // Notify any check dialog (re-check all potential problems). // And repaint immediately to avoid flicker (icons wouldn't otherwise be repainted // until the idle handler gets called) if (m_Check != null) { m_Check.OnFinishOp(); ActiveDisplay.PaintNow(); } // Re-enable auto-highlighting if it was on before. if (m_IsAutoSelect < 0) { m_IsAutoSelect = -m_IsAutoSelect; } /* * if ( pCmd->GetCommandId() == ID_FEATURE_UPDATE ) * GetDocument()->OnFinishUpdate(); * else * FinishEdit((INT4)m_pCommand); * // m_pAutoSaver->FinishEdit(edid); */ m_Command.Dispose(); m_Command = null; }