Ejemplo n.º 1
0
 public void Init(object object_0)
 {
     this.ipopuMenuWrap_0 = object_0 as IPopuMenuWrap;
     this.ipopuMenuWrap_0.Clear();
     this.ipopuMenuWrap_0.AddItem("Catalog_Connection", true);
     this.ipopuMenuWrap_0.AddItem("Catalog_Disconnection", false);
 }
Ejemplo n.º 2
0
 public static void StartCreateBar(IPopuMenuWrap ipopuMenuWrap_0, string string_0)
 {
     try
     {
         XmlDocument document = new XmlDocument();
         try
         {
             document.Load(string_0);
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
         }
         XmlElement documentElement = document.DocumentElement;
         for (int i = 0; i < documentElement.ChildNodes.Count; i++)
         {
             XmlNode node = documentElement.ChildNodes[i];
             ReadBarItems(ipopuMenuWrap_0, node);
         }
     }
     catch (Exception exception2)
     {
         MessageBox.Show(exception2.ToString());
     }
 }
Ejemplo n.º 3
0
 public void Init(object object_0)
 {
     this.ipopuMenuWrap_0 = object_0 as IPopuMenuWrap;
     this.ipopuMenuWrap_0.Clear();
     this.ipopuMenuWrap_0.AddItem("Catalog_Copy", false);
     this.ipopuMenuWrap_0.AddItem("Catalog_Delete", true);
     this.ipopuMenuWrap_0.AddItem("Catalog_Rename", false);
     this.ipopuMenuWrap_0.AddItem("Catalog_GxObjectProperty", true);
     this.ipopuMenuWrap_0.UpdateUI();
 }
Ejemplo n.º 4
0
 public CreateBarsHelper(BarManager barManager_1, PopupMenu popupMenu_1, IFramework iframework_1,
                         List <ICommand> list_1, IPopuMenuWrap ipopuMenuWrap_1)
 {
     this.CreateHandle();
     base.CreateControl();
     this.popupMenu_0     = popupMenu_1;
     this.barManager_0    = barManager_1;
     this.iframework_0    = iframework_1;
     this.list_0          = list_1;
     this.ipopuMenuWrap_0 = ipopuMenuWrap_1;
     this.sysGrants_0     = new SysGrants(AppConfigInfo.UserID);
 }
Ejemplo n.º 5
0
 public void Init(object object_0)
 {
     this.ipopuMenuWrap_0 = object_0 as IPopuMenuWrap;
     this.ipopuMenuWrap_0.Clear();
     this.ipopuMenuWrap_0.AddItem("Catalog_Paste", false);
     this.ipopuMenuWrap_0.AddItem("Catalog_Refresh", true);
     this.ipopuMenuWrap_0.ClearSubItem("NewBarSubItem");
     this.ipopuMenuWrap_0.AddSubmenuItem("NewBarSubItem", "新建", "", true);
     this.ipopuMenuWrap_0.AddItem("Catalog_NewFolder", "NewBarSubItem", false);
     this.ipopuMenuWrap_0.AddItem("Catalog_NewPGDB", "NewBarSubItem", true);
     this.ipopuMenuWrap_0.AddItem("Catalog_NewFGDB", "NewBarSubItem", false);
     this.ipopuMenuWrap_0.AddItem("Catalog_NewShapefile", "NewBarSubItem", false);
 }
Ejemplo n.º 6
0
        public void Init(object object_0)
        {
            IPopuMenuWrap wrap = null;

            wrap = object_0 as IPopuMenuWrap;
            wrap.Clear();
            if (this.int_0 > 0)
            {
                wrap.AddItem("Catalog_StartServer", true);
                wrap.AddItem("Catalog_StopServer", true);
                wrap.AddItem("Catalog_ServiceProperty", true);
            }
            wrap.AddItem("Catalog_GxObjectProperty", true);
        }
Ejemplo n.º 7
0
        private static void ReadBarItems(IPopuMenuWrap ipopuMenuWrap_0, XmlNode xmlNode_0)
        {
            MenuItemDef itemAttribute = GetItemAttribute(xmlNode_0);

            if (xmlNode_0.ChildNodes.Count > 0)
            {
                itemAttribute.HasSubMenu = true;
            }
            ipopuMenuWrap_0.AddItem(itemAttribute);
            for (int i = 0; i < xmlNode_0.ChildNodes.Count; i++)
            {
                ReadBarItems(ipopuMenuWrap_0, itemAttribute.Name, xmlNode_0.ChildNodes[i]);
            }
        }
Ejemplo n.º 8
0
 public void Init(object object_0)
 {
     this.ipopuMenuWrap_0 = object_0 as IPopuMenuWrap;
     this.ipopuMenuWrap_0.Clear();
     if (this.idatasetName_0.Type == esriDatasetType.esriDTRasterDataset)
     {
         this.ipopuMenuWrap_0.AddItem("Catalog_Copy", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_Delete", true);
         this.ipopuMenuWrap_0.AddItem("Catalog_Rename", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_Refresh", true);
         this.ipopuMenuWrap_0.UpdateUI();
     }
     else if ((this.idatasetName_0.Type != esriDatasetType.esriDTRasterBand) &&
              (this.idatasetName_0.Type == esriDatasetType.esriDTRasterCatalog))
     {
         this.ipopuMenuWrap_0.AddItem("Catalog_Delete", false);
     }
 }
Ejemplo n.º 9
0
 public void Init(object object_1)
 {
     if (object_1 != null)
     {
         this.ipopuMenuWrap_0 = object_1 as IPopuMenuWrap;
     }
     this.ipopuMenuWrap_0.Clear();
     this.ipopuMenuWrap_0.AddItem("Catalog_Delete", true);
     this.ipopuMenuWrap_0.AddItem("Catalog_Rename", false);
     this.ipopuMenuWrap_0.AddItem("Catalog_Refresh", true);
     this.ipopuMenuWrap_0.AddItem("Catalog_Connection", true);
     this.ipopuMenuWrap_0.AddItem("Catalog_Disconnection", false);
     if (this.IsConnected)
     {
         this.ipopuMenuWrap_0.AddItem("Catalog_ServerProperty", true);
     }
     this.ipopuMenuWrap_0.AddItem("Catalog_GxObjectProperty", true);
 }
Ejemplo n.º 10
0
        public void Init(object object_0)
        {
            this.ipopuMenuWrap_0 = object_0 as IPopuMenuWrap;
            this.ipopuMenuWrap_0.Clear();
            bool flag = this.bool_1;

            if (this.IsRemoteDatabase)
            {
                if (!this.bool_0)
                {
                    this.bool_0 = true;
                    if (this.iworkspace_0 == null)
                    {
                        flag = WorkspaceOperator.IsConnectedToGeodatabase(this.iworkspaceName_0);
                    }
                    else
                    {
                        flag = WorkspaceOperator.IsConnectedToGeodatabase(this.iworkspace_0);
                    }
                    this.bool_1 = flag;
                }
            }
            else
            {
                flag = true;
            }
            this.ipopuMenuWrap_0.AddItem("Catalog_Copy", false);
            this.ipopuMenuWrap_0.AddItem("Catalog_Paste", false);
            this.ipopuMenuWrap_0.AddItem("Catalog_Refresh", false);
            this.ipopuMenuWrap_0.AddItem("Catalog_Delete", true);
            this.ipopuMenuWrap_0.AddItem("Catalog_Rename", false);
            this.ipopuMenuWrap_0.ClearSubItem("NewBarSubItem");
            this.ipopuMenuWrap_0.AddSubmenuItem("NewBarSubItem", "新建", "", true);
            if (flag)
            {
                this.ipopuMenuWrap_0.AddItem("Catalog_NewFeatureDataset", "NewBarSubItem", false);
            }
            this.ipopuMenuWrap_0.AddItem("Catalog_NewFeatureClass", "NewBarSubItem", false);
            this.ipopuMenuWrap_0.AddItem("Catalog_NewTable", "NewBarSubItem", false);
            if (flag)
            {
                this.ipopuMenuWrap_0.AddItem("Catalog_NewRelationClass", "NewBarSubItem", false);
                this.ipopuMenuWrap_0.AddItem("Catalog_NewRasterFolder", "NewBarSubItem", true);
                this.ipopuMenuWrap_0.AddItem("Catalog_NewRasterDataset", "NewBarSubItem", false);
            }
            this.ipopuMenuWrap_0.ClearSubItem("ImportBarSubItem");
            this.ipopuMenuWrap_0.AddSubmenuItem("ImportBarSubItem", "导入", "", true);
            this.ipopuMenuWrap_0.AddItem("Catalog_ImportSingleFeatureClass", "ImportBarSubItem", false);
            this.ipopuMenuWrap_0.AddItem("Catalog_ImportMultiFeatureClasses", "ImportBarSubItem", false);
            this.ipopuMenuWrap_0.AddItem("Catalog_ImportSingleTable", "ImportBarSubItem", false);
            this.ipopuMenuWrap_0.AddItem("Catalog_ImportMultiTables", "ImportBarSubItem", false);
            if (flag)
            {
                this.ipopuMenuWrap_0.AddItem("Catalog_RasterToGDB", "ImportBarSubItem", false);
            }
            this.ipopuMenuWrap_0.AddItem("Catalog_ImportXY", "ImportBarSubItem", false);
            if (this.IsRemoteDatabase)
            {
                if (!flag)
                {
                    this.ipopuMenuWrap_0.AddItem("Catalog_EnableSDE", true);
                }
                this.ipopuMenuWrap_0.AddItem("Catalog_VersionInfo", true);
                this.ipopuMenuWrap_0.AddItem("Catalog_Connection", false);
                this.ipopuMenuWrap_0.AddItem("Catalog_Disconnection", false);
                this.ipopuMenuWrap_0.AddItem("Catalog_ConnectionProperty", false);
            }
            this.ipopuMenuWrap_0.AddItem("Catalog_GxObjectProperty", true);
        }
Ejemplo n.º 11
0
 public void Init(object object_0)
 {
     this.ipopuMenuWrap_0 = object_0 as IPopuMenuWrap;
     this.ipopuMenuWrap_0.Clear();
     this.ipopuMenuWrap_0.AddItem("Catalog_Refresh", false);
 }
Ejemplo n.º 12
0
 public void Init(object object_0)
 {
     this.ipopuMenuWrap_0 = object_0 as IPopuMenuWrap;
     this.ipopuMenuWrap_0.Clear();
     if (this.idatasetName_0.Type == esriDatasetType.esriDTFeatureDataset)
     {
         this.ipopuMenuWrap_0.AddItem("Catalog_Copy", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_Paste", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_Delete", true);
         this.ipopuMenuWrap_0.AddItem("Catalog_Rename", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_Refresh", true);
         if (this.idatasetName_0.WorkspaceName.Type == esriWorkspaceType.esriRemoteDatabaseWorkspace)
         {
             this.ipopuMenuWrap_0.ClearSubItem("ArchivingSubItem");
             this.ipopuMenuWrap_0.AddSubmenuItem("ArchivingSubItem", "管理", "", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_RegisterAsVersion", "ArchivingSubItem", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_UnregisterVersion", "ArchivingSubItem", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_EnableArchiving", "ArchivingSubItem", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_DisableArchiving", "ArchivingSubItem", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_CreateVersionView", "ArchivingSubItem", false);
         }
         this.ipopuMenuWrap_0.ClearSubItem("NewBarSubItem");
         this.ipopuMenuWrap_0.AddSubmenuItem("NewBarSubItem", "新建", "", true);
         this.ipopuMenuWrap_0.AddItem("Catalog_NewFeatureClass", "NewBarSubItem", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_NewRelationClass", "NewBarSubItem", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_NewNetworkDataset", "NewBarSubItem", true);
         this.ipopuMenuWrap_0.AddItem("Catalog_NewTopology", "NewBarSubItem", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_NewNetwork", "NewBarSubItem", false);
         this.ipopuMenuWrap_0.ClearSubItem("ImportBarSubItem");
         this.ipopuMenuWrap_0.AddSubmenuItem("ImportBarSubItem", "导入", "", true);
         this.ipopuMenuWrap_0.AddItem("Catalog_ImportSingleFeatureClass", "ImportBarSubItem", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_ImportMultiFeatureClasses", "ImportBarSubItem", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_ImportXY", "ImportBarSubItem", false);
         this.ipopuMenuWrap_0.ClearSubItem("ExportBarSubItem");
         this.ipopuMenuWrap_0.AddSubmenuItem("ExportBarSubItem", "导出", "", true);
         this.ipopuMenuWrap_0.AddItem("Catalog_ExportMultiFeatureClasses", "ExportBarSubItem", false);
         this.ipopuMenuWrap_0.AddItem("Catalog_GxObjectProperty", true);
         this.ipopuMenuWrap_0.UpdateUI();
     }
     else
     {
         IObjectClass dataset;
         if (this.idatasetName_0.Type == esriDatasetType.esriDTFeatureClass)
         {
             this.ipopuMenuWrap_0.AddItem("Catalog_Copy", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_Delete", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_Rename", false);
             this.ipopuMenuWrap_0.ClearSubItem("ArchivingSubItem");
             this.ipopuMenuWrap_0.AddSubmenuItem("ArchivingSubItem", "管理", "", true);
             if ((this.idatasetName_0.WorkspaceName.Type == esriWorkspaceType.esriRemoteDatabaseWorkspace) &&
                 ((this.idatasetName_0 as IFeatureClassName).FeatureDatasetName == null))
             {
                 this.ipopuMenuWrap_0.AddItem("Catalog_RegisterAsVersion", "ArchivingSubItem", true);
                 this.ipopuMenuWrap_0.AddItem("Catalog_UnregisterVersion", "ArchivingSubItem", false);
                 this.ipopuMenuWrap_0.AddItem("Catalog_EnableArchiving", "ArchivingSubItem", false);
                 this.ipopuMenuWrap_0.AddItem("Catalog_DisableArchiving", "ArchivingSubItem", false);
                 this.ipopuMenuWrap_0.AddItem("Catalog_CreateVersionView", "ArchivingSubItem", false);
             }
             this.ipopuMenuWrap_0.AddItem("Catalog_CreateAttachments", "ArchivingSubItem", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_DeleteAttachments", "ArchivingSubItem", false);
             dataset = this.Dataset as IObjectClass;
             if (dataset.ObjectClassID == -1)
             {
                 this.ipopuMenuWrap_0.AddItem("Catalog_RegisterAsObjectClass", "ArchivingSubItem", true);
             }
             this.ipopuMenuWrap_0.AddItem("Catalog_DataLoader", true);
             this.ipopuMenuWrap_0.ClearSubItem("ExportBarSubItem");
             this.ipopuMenuWrap_0.AddSubmenuItem("ExportBarSubItem", "导出", "", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_ExportSingleToGDB", "ExportBarSubItem", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_ExportShapefile", "ExportBarSubItem", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_GxObjectProperty", true);
             this.ipopuMenuWrap_0.UpdateUI();
         }
         else if (this.idatasetName_0.Type == esriDatasetType.esriDTTable)
         {
             this.ipopuMenuWrap_0.AddItem("Catalog_Copy", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_Paste", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_Delete", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_Rename", false);
             this.ipopuMenuWrap_0.ClearSubItem("ArchivingSubItem");
             this.ipopuMenuWrap_0.AddSubmenuItem("ArchivingSubItem", "管理", "", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_RegisterAsVersion", "ArchivingSubItem", true);
             if (this.idatasetName_0.WorkspaceName.Type == esriWorkspaceType.esriRemoteDatabaseWorkspace)
             {
                 this.ipopuMenuWrap_0.AddItem("Catalog_UnregisterVersion", "ArchivingSubItem", false);
                 this.ipopuMenuWrap_0.AddItem("Catalog_EnableArchiving", "ArchivingSubItem", false);
                 this.ipopuMenuWrap_0.AddItem("Catalog_DisableArchiving", "ArchivingSubItem", false);
                 this.ipopuMenuWrap_0.AddItem("Catalog_CreateVersionView", "ArchivingSubItem", false);
             }
             this.ipopuMenuWrap_0.AddItem("Catalog_CreateAttachments", "ArchivingSubItem", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_DeleteAttachments", "ArchivingSubItem", false);
             dataset = this.Dataset as IObjectClass;
             if (dataset.ObjectClassID == -1)
             {
                 this.ipopuMenuWrap_0.AddItem("Catalog_RegisterAsObjectClass", "ArchivingSubItem", true);
             }
             this.ipopuMenuWrap_0.AddItem("Catalog_DataLoader", true);
             this.ipopuMenuWrap_0.ClearSubItem("ExportBarSubItem");
             this.ipopuMenuWrap_0.AddSubmenuItem("ExportBarSubItem", "导出", "", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_ExportSingleToGDB", "ExportBarSubItem", false);
             this.ipopuMenuWrap_0.AddItem("Catalog_GxObjectProperty", true);
             this.ipopuMenuWrap_0.UpdateUI();
         }
         else if (this.idatasetName_0.Type == esriDatasetType.esriDTTopology)
         {
             this.ipopuMenuWrap_0.AddItem("Catalog_Delete", false);
             this.ipopuMenuWrap_0.AddItem("ValidateTopologyCommand", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_GxObjectProperty", true);
             this.ipopuMenuWrap_0.UpdateUI();
         }
         else if (this.idatasetName_0.Type == esriDatasetType.esriDTNetworkDataset)
         {
             this.ipopuMenuWrap_0.AddItem("Catalog_Delete", false);
             this.ipopuMenuWrap_0.AddItem("BuildNetworkCommand", true);
             this.ipopuMenuWrap_0.AddItem("Catalog_GxObjectProperty", true);
             this.ipopuMenuWrap_0.UpdateUI();
         }
         else
         {
             this.ipopuMenuWrap_0.AddItem("Catalog_Delete", false);
             this.ipopuMenuWrap_0.UpdateUI();
         }
     }
 }