-
Notifications
You must be signed in to change notification settings - Fork 355
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66c1c0d
commit 10f1777
Showing
1,122 changed files
with
27,793 additions
and
6,841 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
Content/ArcGISOnlineConnect/ArcGISOnlineConnect (C# 6.0).md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
## ArcGISOnlineConnect | ||
|
||
<!-- TODO: Write a brief abstract explaining this sample --> | ||
ArcGISOnlineConnect exercises a collection of programmatic interactions with ArcGIS Online using EsriHttpClient | ||
|
||
|
||
|
||
<a href="http://pro.arcgis.com/en/pro-app/sdk/" target="_blank">View it live</a> | ||
|
||
<!-- TODO: Fill this section below with metadata about this sample--> | ||
``` | ||
Language: C# 6.0 | ||
Subject: Framework | ||
Contributor: ArcGIS Pro SDK Team <[email protected]> | ||
Organization: Esri, http://www.esri.com | ||
Date: 6/23/2017 | ||
ArcGIS Pro: 2.0 | ||
Visual Studio: 2015, 2017 | ||
.NET Target Framework: 4.6.1 | ||
``` | ||
|
||
## Resources | ||
|
||
* [API Reference online](http://pro.arcgis.com/en/pro-app/sdk/api-reference) | ||
* <a href="http://pro.arcgis.com/en/pro-app/sdk/" target="_blank">ArcGIS Pro SDK for .NET (pro.arcgis.com)</a> | ||
* [arcgis-pro-sdk-community-samples](http://github.com/Esri/arcgis-pro-sdk-community-samples) | ||
* [ArcGISPro Registry Keys](http://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-Registry-Keys) | ||
* [FAQ](http://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) | ||
* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/1.4.0.7198) | ||
* [ProConcepts: ArcGIS Pro Add in Samples](https://github.com/Esri/arcgis-pro-sdk-community-samples/wiki/ProConcepts-ArcGIS-Pro-Add-in-Samples) | ||
|
||
![ArcGIS Pro SDK for .NET Icons](https://esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") | ||
|
||
* [ProSnippets: 2.0 Migration](http://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Migrating-to-2.0) | ||
* [ProSnippets: 2.0 Migration Samples](http://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-2.0-Migration-Samples) | ||
* [ProConcepts: 2.0 Migration](http://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-2.0-Migration-Guide) | ||
|
||
### Samples Data | ||
|
||
* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. | ||
|
||
## How to use the sample | ||
<!-- TODO: Explain how this sample can be used. To use images in this section, create the image file in your sample project's screenshots folder. Use relative url to link to this image using this syntax: ![My sample Image](FacePage/SampleImage.png) --> | ||
1. This sample is using the ArcGIS REST API which is published here http://resources.arcgis.com/en/help/arcgis-rest-api | ||
1. In Visual Studio click the Build menu. Then select Build Solution. | ||
1. Click Start button to open ArcGIS Pro. | ||
1. ArcGIS Pro will open. | ||
1. Open any project file. Click on the Add-in tab on the ribbon and then on the Show "AgolDockpane" button. | ||
![UI](Screenshot/AgolInterface.png) | ||
|
||
1. On top the AgolDockpane (pane) you find the ArcGIS Online Uri used for the interaction with ArcGIS Online (your portal). | ||
1. Select from the 'AGOL operation' listbox by starting with 'GetRest' (go through the list top to bottom doing the following steps): | ||
1. Verify the Parameter(s) required for the query you just selected (note: default values are filled in by using return values from previous query results so sequence is important) | ||
1. Click on the "Run ... ArcGIS Online Query" button to execute the query. | ||
1. View the results in text box on the bottom of the AgolDockpane. | ||
1. Please note that ArcGIS Online queries return json and various content returned in json is deserialized into the respective c# class. | ||
1. Also note that permissions and content are required for various queries (i.e. content or folder queries) | ||
1. The 'GetSearch' query requires a search string which by default is set to 'Redlands'. | ||
![UI](Screenshot/Query1.png) | ||
|
||
1. The 'GetUserContent' query requires a user name, however, if you performed the 'GetSelf' query before the parameter is filled in automatically for you. | ||
![UI](Screenshot/Query2.png) | ||
|
||
1. The 'GetUserContentForFolder' query requires a user name and a folder id, however, if you performed the 'GetSelf' and 'GetUserContent' query before, those parameters are filled in automatically for you from previous query results. Also you need to have a folder under you 'My content' tab in ArcGIS Online. | ||
![UI](Screenshot/Query3.png) | ||
|
||
1. The 'GetGroupMetadata, and GetGroupContent' queries require a group id, however, if you performed the 'GetSelf' query before, those parameters are filled in automatically for you from previous query results. | ||
![UI](Screenshot/Query4.png) | ||
|
||
1. The 'GetAdditemStatus, GetItem, GetItemPkInfo, GetItemData, and GetItemComments' queries require an item id, however, if you performed the 'GetUserContent' query before, those parameters are filled in automatically for you from previous query results. | ||
![UI](Screenshot/Query5.png) | ||
|
||
1. The 'GetGroupUsers, and GetUserTags' queries require a group id, however, if you performed the 'GetSelf' query before, those parameters are filled in automatically for you from previous query results. | ||
![UI](Screenshot/Query6.png) | ||
|
||
|
||
|
||
<!-- End --> | ||
|
||
<img src="http://esri.github.io/arcgis-pro-sdk/images/ArcGISPro.png" alt="ArcGIS Pro SDK for Microsoft .NET Framework" height = "20" width = "20" align="top" > | ||
| ||
[Home](https://github.com/Esri/arcgis-pro-sdk/wiki) | <a href="http://pro.arcgis.com/en/pro-app/sdk/api-reference" target="_blank">API Reference</a> | [Requirements](https://github.com/Esri/arcgis-pro-sdk/wiki#requirements) | [Download](https://github.com/Esri/arcgis-pro-sdk/wiki#installing-arcgis-pro-sdk-for-net) | <a href="http://github.com/esri/arcgis-pro-sdk-community-samples" target="_blank">Samples</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,9 @@ Language: C# | |
Subject: Framework | ||
Contributor: ArcGIS Pro SDK Team <[email protected]> | ||
Organization: Esri, http://www.esri.com | ||
Date: 5/5/2017 | ||
ArcGIS Pro: 1.4 | ||
Visual Studio: 2013, 2015 | ||
Date: 4/20/2017 | ||
ArcGIS Pro: 2.0 | ||
Visual Studio: 2015, 2017 | ||
.NET Target Framework: 4.6.1 | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
|
||
|
||
|
||
|
||
<ArcGIS defaultAssembly="ArcGISOnlineConnect.dll" defaultNamespace="ArcGISOnlineConnect" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd"> | ||
<!--// Copyright 2017 Esri | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
|
@@ -17,12 +13,12 @@ | |
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
--> | ||
<AddInInfo id="{ef0d3f3a-7faa-4a4a-a800-fff87a824883}" version="1.0" desktopVersion="1.4.7198"> | ||
<AddInInfo id="{ef0d3f3a-7faa-4a4a-a800-fff87a824883}" version="1.0" desktopVersion="2.0.0"> | ||
<Name>ArcGISOnlineConnect</Name> | ||
<Description>ArcGISOnlineConnect description</Description> | ||
<Image>Images\AddinDesktop32.png</Image> | ||
<Author>Wolfgang</Author> | ||
<Company>Acme</Company> | ||
<Author>ArcGIS Pro SDK Team, [email protected]</Author> | ||
<Company>esri, http://www.esri.com</Company> | ||
<Date>5/26/2015 12:13:44 PM, 2015</Date> | ||
<Subject>Framework</Subject> | ||
<!-- Note subject can be one or more of these topics: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,13 @@ ArcGISOnlineConnect exercises a collection of programmatic interactions with Arc | |
|
||
<!-- TODO: Fill this section below with metadata about this sample--> | ||
``` | ||
Language: C# | ||
Language: C# 6.0 | ||
Subject: Framework | ||
Contributor: ArcGIS Pro SDK Team <[email protected]> | ||
Organization: Esri, http://www.esri.com | ||
Date: 5/5/2017 | ||
ArcGIS Pro: 1.4 | ||
Visual Studio: 2013, 2015 | ||
Date: 6/23/2017 | ||
ArcGIS Pro: 2.0 | ||
Visual Studio: 2015, 2017 | ||
.NET Target Framework: 4.6.1 | ||
``` | ||
|
||
|
@@ -31,6 +31,10 @@ Visual Studio: 2013, 2015 | |
|
||
![ArcGIS Pro SDK for .NET Icons](https://esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") | ||
|
||
* [ProSnippets: 2.0 Migration](http://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Migrating-to-2.0) | ||
* [ProSnippets: 2.0 Migration Samples](http://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-2.0-Migration-Samples) | ||
* [ProConcepts: 2.0 Migration](http://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-2.0-Migration-Guide) | ||
|
||
### Samples Data | ||
|
||
* Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the [repo releases](https://github.com/Esri/arcgis-pro-sdk-community-samples/releases) page. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net461" /> | ||
</packages> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
Copyright 2017 Esri | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<ArcGIS defaultAssembly="CustomCatalogContext.dll" defaultNamespace="CustomCatalogContext" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd"> | ||
<AddInInfo id="{a4f746a5-555b-4274-9394-266aab8ece04}" version="1.0" desktopVersion="2.0.8533"> | ||
<Name>CustomCatalogContext</Name> | ||
<Description>CustomCatalogContext description</Description> | ||
<Image>Images\AddinDesktop32.png</Image> | ||
<Author>ArcGIS Pro SDK Team, [email protected]</Author> | ||
<Company>esri, http://www.esri.com</Company> | ||
<Date>5/30/2017 1:16:14 PM, 2017</Date> | ||
<Subject>Content</Subject> | ||
<!-- Note subject can be one or more of these topics: | ||
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration --> | ||
</AddInInfo> | ||
<dependencies> | ||
<dependency name="ADMapping.daml" /> | ||
<dependency name="ADGeoDatabase.daml" /> | ||
</dependencies> | ||
<modules> | ||
<insertModule id="CustomCatalogContext_Module" className="Module1" autoLoad="false" caption="Module1"> | ||
<!-- uncomment to have the control hosted on a separate tab--> | ||
<tabs> | ||
<!--<tab id="CustomCatalogContext_Tab1" caption="New Tab"> | ||
<group refID="CustomCatalogContext_Group1"/> | ||
</tab>--> | ||
</tabs> | ||
<groups></groups> | ||
<controls> | ||
<!-- add your controls here --> | ||
<button id="CustomCatalogContext_CustomCatalogButton" caption="CustomCatalogButton" className="CustomCatalogButton" loadOnClick="true" smallImage="Images\GenericButtonBlue16.png" largeImage="Images\GenericButtonBlue32.png"> | ||
<tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip> | ||
</button> | ||
</controls> | ||
</insertModule> | ||
<updateModule refID="esri_mapping"> | ||
<menus> | ||
<updateMenu refID="esri_mapping_map2DContextMenu"> | ||
<insertButton refID="CustomCatalogContext_CustomCatalogButton" insert="after" placeWith="esri_mapping_mapContextMenuConvertToBasemapButton" /> | ||
</updateMenu> | ||
<updateMenu refID="esri_mapping_map3DContextMenu"> | ||
<insertButton refID="CustomCatalogContext_CustomCatalogButton" insert="after" placeWith="esri_mapping_mapContextMenuConvertToBasemapButton" /> | ||
</updateMenu> | ||
<updateMenu refID="esri_mapping_StyleContextMenu"> | ||
<insertButton refID="CustomCatalogContext_CustomCatalogButton" /> | ||
</updateMenu> | ||
</menus> | ||
</updateModule> | ||
<updateModule refID="esri_geodatabase_module"> | ||
<menus> | ||
<updateMenu refID="folderConnectionItemMenu"> | ||
<insertButton refID="CustomCatalogContext_CustomCatalogButton" insert="after" placeWith="esri_addProjectItemToNewProjectsButton" /> | ||
</updateMenu> | ||
<updateMenu refID="GDBProjectItemMenu"> | ||
<insertButton refID="CustomCatalogContext_CustomCatalogButton" insert="after" placeWith="esri_addProjectItemToNewProjectsButton" /> | ||
</updateMenu> | ||
<updateMenu refID="EGDBProjectItemMenu"> | ||
<insertButton refID="CustomCatalogContext_CustomCatalogButton" insert="after" placeWith="esri_addProjectItemToNewProjectsButton" /> | ||
</updateMenu> | ||
</menus> | ||
</updateModule> | ||
</modules> | ||
</ArcGIS> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
Copyright 2017 Esri | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using ArcGIS.Desktop.Core; | ||
using ArcGIS.Desktop.Framework; | ||
using ArcGIS.Desktop.Framework.Contracts; | ||
using ArcGIS.Desktop.Framework.Dialogs; | ||
|
||
namespace CustomCatalogContext | ||
{ | ||
/// <summary> | ||
/// Access the Catalog context via the FrameworkApplication.ActiveWindow | ||
/// </summary> | ||
internal class CustomCatalogButton : Button | ||
{ | ||
protected override void OnClick() { | ||
//window will be null if the ActiveWindow is not the Catalog dock pane or a Catalog view. | ||
IProjectWindow window = FrameworkApplication.ActiveWindow as ArcGIS.Desktop.Core.IProjectWindow; | ||
if (window?.SelectedItems.Count() > 0) { | ||
var sb = new StringBuilder(); | ||
sb.AppendLine("Selection:"); | ||
foreach (var item in window.SelectedItems) { | ||
sb.AppendLine($" {item.Name}, {item.TypeID}, {item.GetType().ToString()}"); | ||
} | ||
MessageBox.Show(sb.ToString(),"Catalog Selection"); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.