Config.Designer.cs
// Copyright 2012 ESRI // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // You may freely redistribute and use this sample code, with or // without modification, provided you include the original copyright // notice and use restrictions. // // See the use restrictions. // //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:2.0.50727.4927 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace CustomGxFilter_CS { using ESRI.ArcGIS.Desktop.AddIns; using ESRI.ArcGIS.CatalogUI; using ESRI.ArcGIS.Framework; using ESRI.ArcGIS.ArcCatalog; using System; using System.Collections.Generic; /// <summary> /// A class for looking up declarative information in the associated configuration xml file (.esriaddinx). /// </summary> internal class ThisAddIn { internal static string Name { get { return "CustomGxFilter_CS"; } } internal static string AddInID { get { return "{63e30311-197f-4a5e-a3b7-25ac5795c23c}"; } } internal static string Company { get { return "ESRI"; } } internal static string Version { get { return "1.0"; } } internal static string Description { get { return "This sample code demonstrates how to create a custom object filter in ArcCatalog " + "and use it through a custom command to select a Python file. "; } } internal static string Author { get { return "ESRI"; } } internal static string Date { get { return "8/31/2010"; } } /// <summary> /// A class for looking up Add-in id strings declared in the associated configuration xml file (.esriaddinx). /// </summary> internal class IDs { /// <summary> /// Returns 'ESRI_CustomGxFilter_CS_CustomCommand', the id declared for Add-in Button class 'CustomCommand' /// </summary> internal static string CustomCommand { get { return "ESRI_CustomGxFilter_CS_CustomCommand"; } } } } internal static class ArcCatalog { private static IApplication s_app; private static IGxDocumentEvents_Event s_docEvent; public static IApplication Application { get { if (s_app == null) s_app = Internal.AddInStartupObject.GetHook<IGxApplication>() as IApplication; return s_app; } } public static IDocument Document { get { if (Application != null) return Application.Document; return null; } } public static IGxApplication ThisApplication { get { return Application as IGxApplication; } } public static IDockableWindowManager DockableWindowManager { get { return Application as IDockableWindowManager; } } public static IGxDocumentEvents_Event Events { get { s_docEvent = Document as IGxDocumentEvents_Event; return s_docEvent; } } } namespace Internal { [StartupObjectAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public sealed partial class AddInStartupObject : AddInEntryPoint { private static AddInStartupObject _sAddInHostManager; private List<object> m_addinHooks = null; [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] public AddInStartupObject() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] protected override bool Initialize(object hook) { bool createSingleton = _sAddInHostManager == null; if (createSingleton) { _sAddInHostManager = this; m_addinHooks = new List<object>(); m_addinHooks.Add(hook); } else if (!_sAddInHostManager.m_addinHooks.Contains(hook)) _sAddInHostManager.m_addinHooks.Add(hook); return createSingleton; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] protected override void Shutdown() { _sAddInHostManager = null; m_addinHooks = null; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)] internal static T GetHook<T>() where T : class { if (_sAddInHostManager != null) { foreach (object o in _sAddInHostManager.m_addinHooks) { if (o is T) return o as T; } } return null; } // Expose this instance of Add-in class externally public static AddInStartupObject GetThis() { return _sAddInHostManager; } } } }