//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version: 1.1.4322.2300 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace CatalogView { using System; using System.Runtime.InteropServices; using System.Windows.Forms; using ESRI.ArcGIS.Catalog; using ESRI.ArcGIS.CatalogUI; using ESRI.ArcGIS.Display; using ESRI.ArcGIS.Geometry; using ESRI.ArcGIS.esriSystem; using ESRI.ArcGIS.SystemUI; /// /// TODO - Add class summary /// [ClassInterface(ClassInterfaceType.None)] [Guid("4D62E14B-9033-4B45-885F-7B6A12250924")] public class GxApplication : object, IGxApplication { private IGxCatalog gxCatalog; private IGxView gxView; private string sLocation; private IEnvelope pAreaEnv; private UID pViewClassID; public GxApplication() { gxCatalog = new GxCatalog(); gxView = (IGxView) new GxTreeView(); pAreaEnv = (IEnvelope) new Envelope(); pViewClassID = new UID(); pViewClassID.Value = "CatalogView.GxApplication"; } public virtual ESRI.ArcGIS.Catalog.IGxCatalog Catalog { get { return gxCatalog; } } public virtual ESRI.ArcGIS.CatalogUI.IGxView View { get { return gxView; } } public virtual ESRI.ArcGIS.esriSystem.UID ViewClassID { get { return pViewClassID; } set { pViewClassID = value; } } public virtual ESRI.ArcGIS.CatalogUI.IGxTreeView TreeView { get { return (IGxTreeView) gxView; } } public virtual ESRI.ArcGIS.Catalog.IGxSelection Selection { get { if (gxCatalog.Selection != null) { if (gxCatalog.Selection is IGxSelection) { return gxCatalog.Selection; } else { return null; } } else { return null; } } } public virtual ESRI.ArcGIS.Catalog.IGxObject SelectedObject { get { if (gxCatalog.SelectedObject != null) { if (gxCatalog.SelectedObject is IGxObject) { return gxCatalog.SelectedObject; } else { return null; } } else { return null; } } } public virtual string Location { set { sLocation = value; } } public virtual bool CanDeleteSelection { get { return false; } } public virtual bool CanRenameSelection { get { return false; } } public virtual ESRI.ArcGIS.Geometry.IEnvelope AreaOfInterest { get { return pAreaEnv; } set { pAreaEnv = value; } } public virtual void RenameSelection() { } public virtual void DeleteSelection() { } public virtual void ExpandSelection() { } public virtual void ShowContextMenu(int x, int y) { if (gxCatalog.SelectedObject != null) { if (gxCatalog.SelectedObject is IGxDataset) { MessageBox.Show("Drag this object into the map " + gxCatalog.SelectedObject.BaseName, "", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); } } } public virtual void Refresh(string startingPath) { if (gxView != null) { gxView.Refresh(); } } } }