private bool ProcessVirtualPointAssociation(ref DataTable p_associatedFeaturesRs) { IGTGeometry primaryGeometry = null; IGTGeometry tempGeometry = null; double locateRange = 0.0; bool process = false; try { IGTKeyObject virtualPtFeature = DataContext.OpenFeature(m_gtFeature.FNO, m_gtFeature.FID); m_relatedFeatures = new Dictionary <short, string>(); DataAccess dataAccess = new DataAccess(m_gtApplication); dataAccess.GetPrimaryGeometry(virtualPtFeature, ref primaryGeometry); if (primaryGeometry != null) { process = true; dataAccess.GetRangeValueToLocateAssociateFeatures(ref locateRange); dataAccess.GetListOfRelatedFeaturesOfVP(m_gtFeature.FNO, ref m_relatedFeatures); VirtualPointAssociationUtility associationUtility = new VirtualPointAssociationUtility(m_gtApplication); associationUtility.CreateTemporaryGeometryForVirtualPoint(primaryGeometry, locateRange, ref tempGeometry); associationUtility.GetRecorsetOfAssociateFeaturesForVP(tempGeometry, m_relatedFeatures.Keys.ToArray(), ref p_associatedFeaturesRs, m_gtFeature.FNO, m_relatedFeatures); } } catch { throw; } return(process); }
private void gridVPAssocFeatures_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { try { VirtualPointAssociationUtility associationUtility = new VirtualPointAssociationUtility(gTApplication); associationUtility.HighLightOnMapWindow(Convert.ToInt16(gridVPAssocFeatures.SelectedRows[0].Cells["G3E_FNO"].Value), Convert.ToInt32(gridVPAssocFeatures.SelectedRows[0].Cells["Feature Instance"].Value)); if (!reviewMode) { btnOK.Enabled = true; } } catch (Exception ex) { MessageBox.Show("Error in VirtualPointAssociatedFeaturesForm: " + ex.Message, "G/Technology", MessageBoxButtons.OK, MessageBoxIcon.Error); Close(); } }