//------------------------------------------------------------------------------
//
// 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 ESRI.ArcGIS.ArcMapUI;
using ESRI.ArcGIS.Catalog;
using ESRI.ArcGIS.CatalogUI;
///
/// TODO - Add class summary
///
[ClassInterface(ClassInterfaceType.None)]
[Guid("43C3B235-C104-46C4-83E8-B6B6587F8C5E")]
public class CatalogView : object, IContentsView {
/*[DllImport("user32.dll")]
static extern long ShowWindow(long hwnd, long CmdShow);*/
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
private int IHWnd;
private bool bIsVisible;
private IGxApplication gxApp;
private IGxView gxView;
private IGxCatalog gxCatalog;
const int SW_HIDE = 0;
const int SW_SHOWNORMAL = 1;
const int SW_NORMAL = 1;
const int SW_SHOWMINIMIZED = 2;
const int SW_SHOWMAXIMIZED = 3;
const int SW_MAXIMIZE = 3;
const int SW_SHOWNOACTIVATE = 4;
const int SW_SHOW = 5;
const int SW_MINIMIZE = 6;
const int SW_SHOWMINNOACTIVE = 7;
const int SW_SHOWNA = 8;
const int SW_RESTORE = 9;
const int SW_SHOWDEFAULT = 10;
const int SW_FORCEMINIMIZE = 11;
const int SW_MAX = 11;
public CatalogView() {
bIsVisible = true;
gxApp = new GxApplication();
gxCatalog = gxApp.Catalog;
gxView = (IGxView) gxApp.TreeView;
gxView.Activate(gxApp, gxCatalog);
IHWnd = gxView.hWnd;
}
public virtual string Name {
get {
return "Catalog";
}
}
public virtual int hWnd {
get {
return IHWnd;
}
}
public virtual object SelectedItem {
get {
if (gxApp != null)
{
if (gxApp.SelectedObject != null)
{
return gxApp.SelectedObject;
}
else
{
return null;
}
}
else
{
return null;
}
}
set {
throw new System.NotImplementedException();
}
}
public virtual object ContextItem {
get {
throw new System.NotImplementedException();
}
set {
throw new System.NotImplementedException();
}
}
public virtual bool ShowLines {
get {
throw new System.NotImplementedException();
}
set {
throw new System.NotImplementedException();
}
}
public virtual bool Visible {
get {
return bIsVisible;
}
set {
bIsVisible = value;
}
}
public virtual bool ProcessEvents {
set {
throw new System.NotImplementedException();
}
}
public virtual void RemoveFromSelectedItems(object item) {
}
public virtual void AddToSelectedItems(object item) {
}
public virtual void Refresh(object item) {
}
public virtual void Deactivate() {
System.IntPtr ip;
ip = new IntPtr(IHWnd);
ShowWindow(ip, SW_HIDE);
}
public virtual void Activate(int parentHWnd, ESRI.ArcGIS.ArcMapUI.IMxDocument Document) {
System.IntPtr ip;
ip = new IntPtr(IHWnd);
ShowWindow(ip, SW_SHOW);
}
}
}