-
Notifications
You must be signed in to change notification settings - Fork 0
/
CancelledNumbersModule.cs
63 lines (52 loc) · 1.99 KB
/
CancelledNumbersModule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using ArcGIS.Desktop.Framework;
using ArcGIS.Desktop.Framework.Contracts;
namespace ORMAPCancelledNumbers
{
// https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Digitally-signed-add-ins-and-configurations#applying-digital-signatures-to-an-add-in
// Registered using the *.deschutes.org cert. Copied the cert to my local drive (see .csproj)
// Building this project without the cert will not register it.
internal class CancelledNumbersModule : Module
{
private static CancelledNumbersModule _this = null;
/// <summary>
/// Retrieve the singleton instance to this module here
/// </summary>
public static CancelledNumbersModule Current
{
get
{
return _this ?? (_this = (CancelledNumbersModule)FrameworkApplication.FindModule("ORMAPCancelledNumbers_Module"));
}
}
#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
//#region Toggle State
///// <summary>
///// Activate or Deactivate the specified state. State is identified via
///// its name. Listen for state changes via the DAML <b>condition</b> attribute
///// </summary>
///// <param name="stateID"></param>
//public static void ToggleState(string stateID)
//{
// if (FrameworkApplication.State.Contains(stateID))
// {
// FrameworkApplication.State.Deactivate(stateID);
// }
// else
// {
// FrameworkApplication.State.Activate(stateID);
// }
//}
//#endregion Toggle State
}
}