public CreatePointAndRefPoint() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public PointsAlongLineTool() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public CreateLineAndSplitIntersectingLines() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddPointSplitLine() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
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 { } }
private void Initialize() { _mxdocument = (IMxDocument)_application.Document; _map = _mxdocument.FocusMap; _activeView = _mxdocument.ActiveView; _editor = GetEditorFromArcMap(_application as IMxApplication); _editEvents = (IEditEvents_Event)_editor; _editEvents.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(OnStopEditing); _utilitiesArcmap = new Utilities_ArcMap(_map); if (this.cboTargetLayer.Items.Count > 0) { this.cboTargetLayer.Items.Clear(); } this.cboTargetLayer.Items.AddRange(_utilitiesArcmap.FeatureLayers().Select(item => item.Name).ToArray()); if (this.cboTargetLayer.Items.Count > 0) { this.cboTargetLayer.SelectedIndex = 0; if (this.cboTargetLayer.Items.IndexOf(_targetlayer) > -1) { this.cboTargetLayer.Text = _targetlayer; } } }
public ParcelConstruction() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddLineWithEndPoints() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddLateralsConstructionTool() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public SampleTraceTool1() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public ConnectClosestsConstructTool() { // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
private void Uninitialize() { if (s_extension == null) { return; } UID editorUid = new UIDClass(); editorUid.Value = "esriEditor.Editor"; IEditor m_pEditor = m_pApp.FindExtensionByCLSID(editorUid) as IEditor; m_editorEvents = m_pEditor as IEditEvents_Event; IEditEvents_OnSelectionChangedEventHandler editEvents_OnSelectionChangedEventHandler = new IEditEvents_OnSelectionChangedEventHandler(this.Editor_OnSelectionChanged); m_editorEvents.OnSelectionChanged -= editEvents_OnSelectionChangedEventHandler; // Update UI SF10_cmbLayers selCombo = SF10_cmbLayers.GetSelectionComboBox(); if (selCombo != null) { selCombo.ClearAll(); } }
public AddPointSplitLine() { ConfigUtil.type = "water"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public ConnectClosestsConstructTool() { ConfigUtil.type = "water"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public PointsAlongLineTool() { ConfigUtil.type = "water"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
protected override void OnStartup() { IEditor theEditor = ArcMap.Editor; m_editEvents = ArcMap.Editor as IEditEvents_Event; m_editEvents.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(m_editEvents_OnStartEditing); m_editEvents.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(m_editEvents_OnStopEditing); }
public AddLateralsConstructionTool() { ConfigUtil.type = "water"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public CreateLineAndSplitIntersectingLines() { ConfigUtil.type = "address"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public CreatePointAndRefPoint() { ConfigUtil.type = "address"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddLateralsFromMainPointConstructionTool() { ConfigUtil.type = "gas"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddLineWithEndPoints() { ConfigUtil.type = "gas"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddLateralsConstructionTool() { ConfigUtil.configFileName = "gas.config"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public PointsAlongLineTool() { ConfigUtil.configFileName = "gas.config"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public ConnectClosestsConstructTool() { ConfigUtil.configFileName = "gas.config"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddPointSplitLine() { ConfigUtil.configFileName = "gas.config"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
/// <summary> /// Occurs when this tool is created /// </summary> /// <param name="hook">Instance of the application</param> public override void OnCreate(object hook) { m_application = hook as IApplication; //get the editor UID editorUid = new UID(); editorUid.Value = "esriEditor.Editor"; m_editor = m_application.FindExtensionByCLSID(editorUid) as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
/// <summary> /// Occurs when this command is created /// </summary> /// <param name="hook">Instance of the application</param> public override void OnCreate(object hook) { if (hook == null) { return; } m_application = hook as IApplication; //Disable if it is not ArcMap if (hook is IMxApplication) { base.m_enabled = true; } else { base.m_enabled = false; } base.m_category = resourceManager.GetString("OSMEditor_ConflictEditor_category"); base.m_caption = resourceManager.GetString("OSMEditor_ConflictEditor_caption"); base.m_message = resourceManager.GetString("OSMEditor_ConflictEditor_message"); base.m_toolTip = resourceManager.GetString("OSMEditor_ConflictEditor_tooltip"); if (m_osmConflictEditorUI != null) { m_osmConflictEditorUI.Text = resourceManager.GetString("OSMEditor_ConflictEditor_formtitle"); } UID editorUID = new UIDClass(); editorUID.Value = "esriEditor.Editor"; IEditor editor = m_application.FindExtensionByCLSID(editorUID) as IEditor; base.m_enabled = false; if (editor != null) { IEditEvents_Event editorEvents = editor as IEditEvents_Event; if (editorEvents != null) { editorEvents.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(editorEvents_OnStartEditing); editorEvents.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(editorEvents_OnStopEditing); } if (editor.EditState != esriEditState.esriStateNotEditing) { base.m_enabled = true; } } }
public void Shutdown() { // persist osm editor specific information like the osm base url, etc. OSMGPFactory.StoreOSMEditorSettings(m_editorConfigurationSettings); m_editEvents.OnDeleteFeature -= new IEditEvents_OnDeleteFeatureEventHandler(m_editEvents_OnDeleteFeature); m_editEvents.OnChangeFeature -= new IEditEvents_OnChangeFeatureEventHandler(m_editEvents_OnChangeFeature); m_editEvents.OnCreateFeature -= new IEditEvents_OnCreateFeatureEventHandler(m_editEvents_OnCreateFeature); m_editEvents.OnStartEditing -= new IEditEvents_OnStartEditingEventHandler(m_editEvents_OnStartEditing); m_editEvents2 = null; m_editEvents = null; m_editor3 = null; m_application = null; }
private void SubscribeForEvents() { IEditEvents_Event editEvent = (IEditEvents_Event)ArcMap.Editor; editEvent.OnCreateFeature += controller.OnCreateFeature; ArcMap.Events.OpenDocument += delegate() { IActiveViewEvents_Event activeViewEvent = (IActiveViewEvents_Event)ActiveView; activeViewEvent.SelectionChanged += OnContentsChanged; activeViewEvent.ItemAdded += OnItemAdded; OnContentsChanged(); }; }
protected override void OnStartup() { //AdjustmentDockWindow pDock= Utilities UTIL = new Utilities(); s_extension = this; m_SpiralIsPending = false; //initialize false try { string sDesktopVers = UTIL.GetDesktopVersionFromRegistry(); if (sDesktopVers.Trim() == "") { sDesktopVers = "Desktop10.0"; } else { sDesktopVers = "Desktop" + sDesktopVers; } string sValues = UTIL.ReadFromRegistry(RegistryHive.CurrentUser, "Software\\ESRI\\" + sDesktopVers + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper", "Options", false); string[] Values = sValues.Split(','); string sVal = Values[0]; string sFieldName = Values[1]; bool bUseFieldRecord = false; if (sVal.Trim() != "") { bUseFieldRecord = ((sVal.ToUpper().Trim()) == "1"); } s_extension.FieldName = sFieldName; s_extension.RecordToField = bUseFieldRecord; } catch {} m_editEvents = ArcMap.Editor as IEditEvents_Event; m_editEvents2 = ArcMap.Editor as IEditEvents2_Event; m_editEvents.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(m_editEvents_OnStartEditing); m_editEvents.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(m_editEvents_OnStopEditing); m_editEvents2.OnVertexAdded += new IEditEvents2_OnVertexAddedEventHandler(OnVertexAdded); // m_editEvents2.OnVertexAdded += OnVertexAdded; }
public AddPointSplitLine() { ConfigUtil.type = "gas"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddLineWithEndPoints() { ConfigUtil.type = "water"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public AddLineWithEndPoints() { ConfigUtil.configFileName = "gas.config"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
private void Initialize() { // If the extension hasn't been started yet or it's been turned off, bail if (s_extension == null || this.State != ExtensionState.Enabled) return; m_pApp = ArcMap.Application; m_pDoc = ArcMap.Document; UID editorUid = new UIDClass(); editorUid.Value = "esriEditor.Editor"; IEditor m_pEditor = m_pApp.FindExtensionByCLSID(editorUid) as IEditor; m_editorEvents = m_pEditor as IEditEvents_Event; IEditEvents_OnSelectionChangedEventHandler editEvents_OnSelectionChangedEventHandler = new IEditEvents_OnSelectionChangedEventHandler(this.Editor_OnSelectionChanged); m_editorEvents.OnSelectionChanged += editEvents_OnSelectionChangedEventHandler; }
private void EnableEditListeners() { m_editEvents = m_editor as IEditEvents_Event; m_editEvents.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(m_editEvents_OnStartEditing); m_editEvents.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(m_editEvents_OnStopEditing); m_editEvents.OnDeleteFeature += new IEditEvents_OnDeleteFeatureEventHandler(m_editEvents_OnDeleteFeature); m_editEvents.OnChangeFeature += new IEditEvents_OnChangeFeatureEventHandler(m_editEvents_OnChangeFeature); m_editEvents.OnCreateFeature += new IEditEvents_OnCreateFeatureEventHandler(m_editEvents_OnCreateFeature); }
// Overrides protected override void OnStartup() { s_extension = this; // Wire up events ArcMap.Events.NewDocument += ArcMap_NewOpenDocument; ArcMap.Events.OpenDocument += ArcMap_NewOpenDocument; //Listen for a Stop Edits Events to be fired //get the editor UID editorUid = new UID(); editorUid.Value = "esriEditor.Editor"; m_editor = ArcMap.Application.FindExtensionByCLSID(editorUid) as IEditor3; m_editEvents = m_editor as IEditEvents_Event; EnableEditListeners(); _users = new List<iFormBuilderAPI.User>(); Initialize(); }
public ConnectClosestsConstructTool() { ConfigUtil.type = "gas"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
public PointsAlongLineTool() { ConfigUtil.type = "gas"; // Get the editor m_editor = ArcMap.Editor as IEditor3; m_editEvents = m_editor as IEditEvents_Event; m_editEvents5 = m_editor as IEditEvents5_Event; }
protected override void OnStartup() { //AdjustmentDockWindow pDock= Utilities UTIL = new Utilities(); s_extension = this; try { string sDesktopVers = UTIL.GetDesktopVersionFromRegistry(); if (sDesktopVers.Trim() == "") sDesktopVers = "Desktop10.0"; else sDesktopVers = "Desktop" + sDesktopVers; string sValues = UTIL.ReadFromRegistry(RegistryHive.CurrentUser, "Software\\ESRI\\" + sDesktopVers + "\\ArcMap\\Cadastral\\AddIn.ParcelEditHelper", "Options", false); string[] Values = sValues.Split(','); string sVal = Values[0]; string sFieldName = Values[1]; bool bUseFieldRecord = false; if (sVal.Trim() != "") bUseFieldRecord = ((sVal.ToUpper().Trim()) == "1"); s_extension.FieldName = sFieldName; s_extension.RecordToField = bUseFieldRecord; } catch {} m_editEvents = ArcMap.Editor as IEditEvents_Event; m_editEvents.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(m_editEvents_OnStartEditing); m_editEvents.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(m_editEvents_OnStopEditing); }
private void Uninitialize() { if (s_extension == null) return; UID editorUid = new UIDClass(); editorUid.Value = "esriEditor.Editor"; IEditor m_pEditor = m_pApp.FindExtensionByCLSID(editorUid) as IEditor; m_editorEvents = m_pEditor as IEditEvents_Event; IEditEvents_OnSelectionChangedEventHandler editEvents_OnSelectionChangedEventHandler = new IEditEvents_OnSelectionChangedEventHandler(this.Editor_OnSelectionChanged); m_editorEvents.OnSelectionChanged -= editEvents_OnSelectionChangedEventHandler; // Update UI SF10_cmbLayers selCombo = SF10_cmbLayers.GetSelectionComboBox(); if (selCombo != null) selCombo.ClearAll(); }
private void Initialize() { // If the extension hasn't been started yet or it's been turned off, bail if (s_extension == null || this.State != ExtensionState.Enabled) return; m_pApp = ArcMap.Application; m_pDoc = ArcMap.Document; SF10_clsBase.p_tNAIPF_EssPourc_1 = new SF10_clsBase.tNAIPF_EssPourc[7]; SF10_clsBase.p_tNAIPF_EssPourc_2 = new SF10_clsBase.tNAIPF_EssPourc[7]; for (int i = 0; i < 7; i++) { SF10_clsBase.p_tNAIPF_EssPourc_1[i] = new SF10_clsBase.tNAIPF_EssPourc(); SF10_clsBase.p_tNAIPF_EssPourc_2[i] = new SF10_clsBase.tNAIPF_EssPourc(); } m_Parametres = SF10_clsParametres.SF10_clsParametresDefData(); try { UID editorUid = new UIDClass(); editorUid.Value = "esriEditor.Editor"; IEditor m_pEditor = m_pApp.FindExtensionByCLSID(editorUid) as IEditor; m_editorEvents = m_pEditor as IEditEvents_Event; IEditEvents_OnSelectionChangedEventHandler editEvents_OnSelectionChangedEventHandler = new IEditEvents_OnSelectionChangedEventHandler(this.Editor_OnSelectionChanged); m_editorEvents.OnSelectionChanged += editEvents_OnSelectionChangedEventHandler; m_activeViewEvents = ArcMap.Document.FocusMap as IActiveViewEvents_Event; IActiveViewEvents_AfterDrawEventHandler activeViewEvents_AfterDrawEventHandler = new IActiveViewEvents_AfterDrawEventHandler(this.ActiveView_OnAfterDraw); m_activeViewEvents.AfterDraw += activeViewEvents_AfterDrawEventHandler; IActiveViewEvents_ViewRefreshedEventHandler activeViewEvents_ViewRefreshedEventHandler = new IActiveViewEvents_ViewRefreshedEventHandler(this.ActiveView_OnViewRefreshed); m_activeViewEvents.ViewRefreshed += activeViewEvents_ViewRefreshedEventHandler; UID uid = new UIDClass(); uid.Value = ThisAddIn.IDs.SF10_btnHauteurMin; uid.SubType = 0; m_pApp.Document.Accelerators.Add(uid, (System.Int32)System.Windows.Forms.Keys.D1, true, false, false); uid = new UIDClass(); uid.Value = ThisAddIn.IDs.SF10_btnHauteurMax; uid.SubType = 0; m_pApp.Document.Accelerators.Add(uid, (System.Int32)System.Windows.Forms.Keys.D2, true, false, false); } 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 { } }