-
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.
Added CoreHost Resolve Assembly and Place Text samples
- Loading branch information
1 parent
f5f9dda
commit d2a5d27
Showing
25 changed files
with
715 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
Copyright 2018 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.Core.CIM; | ||
using ArcGIS.Core.Data; | ||
using ArcGIS.Core.Geometry; | ||
using ArcGIS.Desktop.Catalog; | ||
using ArcGIS.Desktop.Core; | ||
using ArcGIS.Desktop.Editing; | ||
using ArcGIS.Desktop.Extensions; | ||
using ArcGIS.Desktop.Framework; | ||
using ArcGIS.Desktop.Framework.Contracts; | ||
using ArcGIS.Desktop.Framework.Dialogs; | ||
using ArcGIS.Desktop.Framework.Threading.Tasks; | ||
using ArcGIS.Desktop.Mapping; | ||
|
||
namespace PlaceText | ||
{ | ||
internal class Clear : Button | ||
{ | ||
protected override void OnClick() | ||
{ | ||
foreach (var graphic in Module1.Current.Graphics) | ||
{ | ||
graphic.Dispose(); | ||
} | ||
Module1.Current.Graphics.Clear(); | ||
} | ||
} | ||
} |
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,61 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
Copyright 2018 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="PlaceText.dll" defaultNamespace="PlaceText" 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="{c47f5642-a45b-4a5d-adb0-be2ba477b1ab}" version="1.0" desktopVersion="2.3.0.0"> | ||
<Name>PlaceText</Name> | ||
<Description>PlaceText description</Description> | ||
<Image>Images\AddinDesktop32.png</Image> | ||
<Author>ArcGIS Pro SDK Team, arcgisprosdk@esri.com</Author> | ||
<Company>esri, http://www.esri.com</Company> | ||
<Date>3/11/2019 3:43:18 PM, 2019</Date> | ||
<Subject>Map Authoring</Subject> | ||
<!-- Note subject can be one or more of these topics: | ||
Content, Framework, Editing, Geodatabase, Geometry, Geoprocessing, Layouts, Map Authoring, Map Exploration --> | ||
</AddInInfo> | ||
<modules> | ||
<insertModule id="PlaceText_Module" className="Module1" autoLoad="false" caption="Module1"> | ||
<!-- uncomment to have the control hosted on a separate tab--> | ||
<tabs> | ||
<!--<tab id="PlaceText_Tab1" caption="New Tab"> | ||
<group refID="PlaceText_Group1"/> | ||
</tab>--> | ||
</tabs> | ||
<groups> | ||
<!-- comment this out if you have no controls on the Addin tab to avoid | ||
an empty group--> | ||
<group id="PlaceText_Group1" caption="Group 1" appearsOnAddInTab="true"> | ||
<!-- host controls within groups --> | ||
<tool refID="PlaceText_PlaceTextTool" size="large" /> | ||
<button refID="PlaceText_Clear" size="large" /> | ||
</group> | ||
</groups> | ||
<controls> | ||
<!-- add your controls here --> | ||
<tool id="PlaceText_PlaceTextTool" caption="Place Text Tool" className="PlaceTextTool" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonRed16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonRed32.png" condition="esri_mapping_mapPane"> | ||
<tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip> | ||
</tool> | ||
<button id="PlaceText_Clear" caption="Clear" className="Clear" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png"> | ||
<tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip> | ||
</button> | ||
</controls> | ||
</insertModule> | ||
</modules> | ||
</ArcGIS> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,85 @@ | ||
/* | ||
Copyright 2018 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.Windows.Input; | ||
using System.Threading.Tasks; | ||
using ArcGIS.Core.CIM; | ||
using ArcGIS.Core.Data; | ||
using ArcGIS.Core.Geometry; | ||
using ArcGIS.Desktop.Catalog; | ||
using ArcGIS.Desktop.Core; | ||
using ArcGIS.Desktop.Editing; | ||
using ArcGIS.Desktop.Extensions; | ||
using ArcGIS.Desktop.Framework; | ||
using ArcGIS.Desktop.Framework.Contracts; | ||
using ArcGIS.Desktop.Framework.Dialogs; | ||
using ArcGIS.Desktop.Framework.Threading.Tasks; | ||
using ArcGIS.Desktop.Mapping; | ||
|
||
namespace PlaceText | ||
{ | ||
/// <summary> | ||
/// This sample shows how to place text within a circular callout. | ||
/// </summary> | ||
/// <remarks> | ||
/// 1. In Visual studio rebuild the solution. | ||
/// 1. Debug the add-in by clicking the "Start" button. | ||
/// 1. ArcGIS Pro opens, select any project with a map. | ||
/// 1. Open the Add-in Tab and click on the "Place Text Tool" button to active a "Place Text" Map tool. | ||
/// ![UI](Screenshots/Screen1.png) | ||
/// 1. Click on the map to place text with the call-out. | ||
/// 1. Click the 'Clear' button to remove all placed 'call-out' text. | ||
/// </remarks> | ||
internal class Module1 : Module | ||
{ | ||
private static Module1 _this = null; | ||
private List<IDisposable> _graphics = new List<IDisposable>(); | ||
|
||
/// <summary> | ||
/// Retrieve the singleton instance to this module here | ||
/// </summary> | ||
public static Module1 Current | ||
{ | ||
get | ||
{ | ||
return _this ?? (_this = (Module1)FrameworkApplication.FindModule("PlaceText_Module")); | ||
} | ||
} | ||
|
||
public List<IDisposable> Graphics => _graphics; | ||
|
||
#region Overrides | ||
/// <summary> | ||
/// Called by Framework when ArcGIS Pro is closing | ||
/// </summary> | ||
/// <returns>False to prevent Pro from closing, otherwise True</returns> | ||
protected override bool CanUnload() | ||
{ | ||
//TODO - add your business logic | ||
//return false to ~cancel~ Application close | ||
return true; | ||
} | ||
|
||
#endregion Overrides | ||
|
||
} | ||
} |
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,54 @@ | ||
## PlaceText | ||
|
||
<!-- TODO: Write a brief abstract explaining this sample --> | ||
This sample shows how to place text within a circular callout. | ||
|
||
|
||
|
||
<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# | ||
Subject: Map Authoring | ||
Contributor: ArcGIS Pro SDK Team <arcgisprosdk@esri.com> | ||
Organization: Esri, http://www.esri.com | ||
Date: 1/10/2019 | ||
ArcGIS Pro: 2.3 | ||
Visual Studio: 2017 | ||
.NET Target Framework: 4.6.1 | ||
``` | ||
|
||
## Resources | ||
|
||
* [API Reference online](https://pro.arcgis.com/en/pro-app/sdk/api-reference) | ||
* <a href="https://pro.arcgis.com/en/pro-app/sdk/" target="_blank">ArcGIS Pro SDK for .NET (pro.arcgis.com)</a> | ||
* [arcgis-pro-sdk-community-samples](https://github.com/Esri/arcgis-pro-sdk-community-samples) | ||
* [ArcGIS Pro DAML ID Reference](https://github.com/Esri/arcgis-pro-sdk/wiki/ArcGIS-Pro-DAML-ID-Reference) | ||
* [FAQ](https://github.com/Esri/arcgis-pro-sdk/wiki/FAQ) | ||
* [ArcGIS Pro SDK icons](https://github.com/Esri/arcgis-pro-sdk/releases/tag/2.3.0.15769) | ||
|
||
![ArcGIS Pro SDK for .NET Icons](https://Esri.github.io/arcgis-pro-sdk/images/Home/Image-of-icons.png "ArcGIS Pro SDK Icons") | ||
|
||
### 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. In Visual studio rebuild the solution. | ||
1. Debug the add-in by clicking the "Start" button. | ||
1. ArcGIS Pro opens, select any project with a map. | ||
1. Open the Add-in Tab and click on the "Place Text Tool" button to active a "Place Text" Map tool. | ||
![UI](Screenshots/Screen1.png) | ||
|
||
1. Click on the map to place text with the call-out. | ||
1. Click the 'Clear' button to remove all placed 'call-out' text. | ||
|
||
|
||
|
||
<!-- End --> | ||
|
||
<img src="https://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="https://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="https://github.com/esri/arcgis-pro-sdk-community-samples" target="_blank">Samples</a> |
Oops, something went wrong.