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 ESRI.ArcGIS.Carto; christian@0: using ESRI.ArcGIS.Geodatabase; christian@0: using System.Windows.Forms; christian@0: christian@0: namespace Postarc.GUI christian@0: { christian@0: class ButtonNewPostGISLayer : ESRI.ArcGIS.Desktop.AddIns.Button christian@0: { christian@0: private FormNewPostGISFeatClass form = new FormNewPostGISFeatClass(); christian@0: christian@0: protected override void OnClick() christian@0: { christian@0: try christian@0: { christian@0: form.Show(); christian@0: } christian@0: catch (Exception ex) christian@0: { christian@0: MessageBox.Show(ex.Message + "\n" + ex.StackTrace); christian@0: } christian@0: } christian@0: christian@0: protected override void OnUpdate() christian@0: { christian@0: Enabled = ArcMap.Application != null; christian@0: } christian@0: } christian@0: }