public void Startup(ref object initializationData) { try { m_application = initializationData as IApplication; if (m_application == null) { return; } ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory; m_wgs84 = spatialReferenceFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984) as ISpatialReference; //Get the editor. UID editorUid = new UID(); editorUid.Value = "esriEditor.Editor"; m_editor3 = m_application.FindExtensionByCLSID(editorUid) as IEditor3; m_editEvents2 = m_editor3 as IEditEvents2_Event; m_editEvents = m_editor3 as IEditEvents_Event; m_editEvents.OnCreateFeature += new IEditEvents_OnCreateFeatureEventHandler(m_editEvents_OnCreateFeature); m_editEvents.OnChangeFeature += new IEditEvents_OnChangeFeatureEventHandler(m_editEvents_OnChangeFeature); m_editEvents.OnDeleteFeature += new IEditEvents_OnDeleteFeatureEventHandler(m_editEvents_OnDeleteFeature); m_editEvents.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(m_editEvents_OnStartEditing); resourceManager = new ResourceManager("ESRI.ArcGIS.OSM.Editor.OSMFeatureInspectorStrings", this.GetType().Assembly); _osmUtility = new OSMClassExtension.OSMUtility(); // retrtrieve osm editor specfic information m_editorConfigurationSettings = OSMGPFactory.ReadOSMEditorSettings(); } catch { } }
public void Startup(ref object initializationData) { try { m_application = initializationData as IApplication; if (m_application == null) return; ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory; m_wgs84 = spatialReferenceFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984) as ISpatialReference; //Get the editor. UID editorUid = new UID(); editorUid.Value = "esriEditor.Editor"; m_editor3 = m_application.FindExtensionByCLSID(editorUid) as IEditor3; m_editEvents2 = m_editor3 as IEditEvents2_Event; m_editEvents = m_editor3 as IEditEvents_Event; m_editEvents.OnCreateFeature += new IEditEvents_OnCreateFeatureEventHandler(m_editEvents_OnCreateFeature); m_editEvents.OnChangeFeature += new IEditEvents_OnChangeFeatureEventHandler(m_editEvents_OnChangeFeature); m_editEvents.OnDeleteFeature += new IEditEvents_OnDeleteFeatureEventHandler(m_editEvents_OnDeleteFeature); m_editEvents.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(m_editEvents_OnStartEditing); resourceManager = new ResourceManager("ESRI.ArcGIS.OSM.Editor.OSMFeatureInspectorStrings", this.GetType().Assembly); _osmUtility = new OSMClassExtension.OSMUtility(); // retrtrieve osm editor specfic information m_editorConfigurationSettings = OSMGPFactory.ReadOSMEditorSettings(); } catch { } }