public FiberTraceWindow(object hook) { InitializeComponent(); this.Hook = hook; _hookHelper = HookHelperExt.Instance(hook); }
public FiberTraceCommand() { try { // ----------------------------------- // Build trace helper that does all // the work // ----------------------------------- _fiberTraceHelper = new FiberTraceHelper(HookHelperExt.Instance(this.Hook)); // ----------------------------------- // Always hide trace windows on // any initialization // ----------------------------------- UID dockWinID = new UIDClass(); dockWinID.Value = @"esriTelcoTools_FiberTraceWindow"; IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID); dockWindow.Show(false); dockWinID.Value = @"esriTelcoTools_FiberTraceReportWindow"; dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID); dockWindow.Show(false); } catch (Exception ex) { _logHelper.addLogEntry(DateTime.Now.ToString(), "ERROR", "FiberTraceCommand()", ex.Message); } }
public FiberEditorExtension() { try { // -------------------------------------- // Initialize log window with log helper // -------------------------------------- _logHelper = LogHelper.Instance(); TelecomToolsLogWindow.AddinImpl winImpl = AddIn.FromID <TelecomToolsLogWindow.AddinImpl>( ThisAddIn.IDs.Esri_Telecom_Tools_Windows_TelecomToolsLogWindow); TelecomToolsLogWindow logWindow = winImpl.UI; logWindow.InitLog(_logHelper); // -------------------- // Build a hook helper // -------------------- _hookHelper = HookHelperExt.Instance(this.Hook); // ------------------------------------------- // Initialize telecom workspace helper. // // Listen to ActiveViewChanged event. // // If this happens the focus map more than // likely changed. Since the tools go after // layers in the TOC we probably need to close // the current telecom workspace since // editing etc could not longer be done. // Should add code to ask for saving changes. // ------------------------------------------- _wkspHelper = TelecomWorkspaceHelper.Instance(); _wkspHelper.ActiveViewChanged += new EventHandler(_wkspHelper_ActiveViewChanged); // ------------------------------------------- // Build helpers that actually do all object // creation work for special feature types // ------------------------------------------- _fiberCableHelper = new FiberCableConfigHelper(_hookHelper, ArcMap.Editor as IEditor3); _fiberDeviceHelper = new FiberDeviceConfigHelper(_hookHelper, ArcMap.Editor as IEditor3); // -------------------------------------------- // Splice and Connection helpers // -------------------------------------------- _spliceHelper = new FiberSpliceHelper(_hookHelper, ArcMap.Editor as IEditor3); _connectionHelper = new FiberDeviceConnectionHelper(_hookHelper, ArcMap.Editor as IEditor3); _logHelper.addLogEntry(DateTime.Now.ToString(), "INFO", "Telecom Extension Constructed."); } catch (Exception ex) { _logHelper.addLogEntry(DateTime.Now.ToString(), "ERROR", "General error.", ex.ToString()); } }
public FiberSpliceWindow(object hook) { InitializeComponent(); this.Hook = hook; _hookHelper = HookHelperExt.Instance(hook); // -------------------------------------------- // Listen to workspace changes. Wire up events // only when a valid workspace is selected. // -------------------------------------------- _wkspHelper.ValidWorkspaceSelected += new EventHandler(_wkspHelper_ValidWorkspaceSelected); _wkspHelper.WorkspaceClosed += new EventHandler(_wkspHelper_WorkspaceClosed); }
public FiberDeviceConnectionCommand() { try { if (ArcMap.Editor == null) { _logHelper.addLogEntry(DateTime.Now.ToString(), "ERROR", "Editor License not found.", "FiberDeviceConnectionCommand()"); return; } // ----------------------------------- // Construct a new hook helper and a // connections helper that does all the // cable to device connection work // ----------------------------------- _hookHelper = HookHelperExt.Instance(this.Hook); _deviceConnectionHelper = new FiberDeviceConnectionHelper(_hookHelper, ArcMap.Editor as IEditor3); // ----------------------------------- // Always hide connections window on // any initialization // ----------------------------------- UID dockWinID = new UIDClass(); dockWinID.Value = @"esriTelcoTools_FiberDeviceConnectionWindow"; IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID); dockWindow.Show(false); // ----------------------------------- // Track the start and stop of editing // ----------------------------------- Events.OnStartEditing += new IEditEvents_OnStartEditingEventHandler(Events_OnStartEditing); Events.OnStopEditing += new IEditEvents_OnStopEditingEventHandler(Events_OnStopEditing); } catch (Exception ex) { _logHelper.addLogEntry(DateTime.Now.ToString(), "ERROR", "FiberDeviceConnectionCommand()", ex.Message); } }