christian@0: /* christian@0: * Postarc christian@0: * christian@0: * Author: christian@0: * Christian Lins christian@0: * christian@0: * Copyright: christian@0: * Copyright (C) 2012 Intevation GmbH christian@0: * christian@0: * This program is free software: you can redistribute it and/or modify christian@0: * it under the terms of the GNU Lesser General Public License as published by christian@0: * the Free Software Foundation, either version 3 of the License, or christian@0: * (at your option) any later version. christian@0: * christian@0: * This program is distributed in the hope that it will be useful, christian@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of christian@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the christian@0: * GNU General Public License for more details. christian@0: * christian@0: * You should have received a copy of the GNU Lesser General Public License christian@0: * along with this program. If not, see . christian@0: */ christian@0: christian@0: using System; christian@0: using System.Collections.Generic; christian@0: using System.Linq; christian@0: using System.Text; christian@0: using System.Runtime.InteropServices; christian@0: using ESRI.ArcGIS.ADF.CATIDs; christian@0: using Postarc.Catalog; christian@0: using Postarc.Feature; christian@0: christian@0: namespace Postarc christian@0: { christian@0: public class PostarcCOMHelper christian@0: { christian@0: #region COM Registration christian@0: christian@0: [ComRegisterFunction] christian@0: static void Register(string key) christian@0: { christian@0: //System.Windows.Forms.MessageBox.Show("Postarc::Register(" + key + ")"); christian@0: christian@0: // Register PostGISFeatureClass christian@0: System.Type type = typeof(PostarcClassDescription); christian@0: GeoObjectClassExtensions.Register(type.GUID.ToString()); christian@0: GeoObjectClassDescriptions.Register(type.GUID.ToString()); christian@0: christian@0: //System.Windows.Forms.MessageBox.Show(type.GUID.ToString()); christian@0: christian@0: // Register ArcCatalog extension christian@0: type = typeof(GxAddNewPostGISConnection); christian@0: GxFolderNewMenuCommands.Register(type.GUID.ToString()); christian@0: GxDatabaseExtensions.Register(type.GUID.ToString()); christian@0: GxRootObjects.Register(type.GUID.ToString()); christian@0: } christian@0: christian@0: [ComUnregisterFunction] christian@0: static void Unregister(string key) christian@0: { christian@0: ESRI.ArcGIS.ADF.CATIDs.GeoObjectClassExtensions.Unregister(key); christian@0: ESRI.ArcGIS.ADF.CATIDs.GeoObjectClassDescriptions.Unregister(key); christian@0: } christian@0: christian@0: #endregion christian@0: } christian@0: }