Skip to content

Commit

Permalink
Merge pull request #520 from Esri/dev
Browse files Browse the repository at this point in the history
September 2018 release
  • Loading branch information
Lyle Wright committed Sep 20, 2018
2 parents 9f271d9 + 50842e8 commit 09aaf60
Show file tree
Hide file tree
Showing 20 changed files with 648 additions and 498 deletions.
42 changes: 18 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,22 @@ Coordinate Conversion allows analysts to input and quickly convert coordinates b

## Requirements

### Devs
### Build Requirements

* Visual Studio 2015
* Important Note: Visual Studio 2013 is required if building on ArcGIS 10.3.1
* ArcGIS for Desktop
* ArcMap 10.3.1+
* ArcGIS Pro 2.1+
* ArcGIS Desktop SDK for .NET 10.3.1+
* [ArcGIS Desktop for .NET Requirements](https://desktop.arcgis.com/en/desktop/latest/get-started/system-requirements/arcobjects-sdk-system-requirements.htm)
* ArcGIS Pro 2.1+ SDK
* [ArcGIS Pro SDK](http://pro.arcgis.com/en/pro-app/sdk/) 2.1+

### Users
### Run Requirements

* ArcGIS Desktop 10.3.1 - 10.6.1
* ArcGIS Pro 2.1 - 2.2
* ArcGIS for Desktop
* ArcMap 10.3.1+
* ArcGIS Pro 2.1+

## Instructions

Expand Down Expand Up @@ -65,10 +70,9 @@ Coordinate Conversion allows analysts to input and quickly convert coordinates b
* [Coordinate Conversion online documentation](http://solutions.arcgis.com/defense/help/coordinate-conversion/)
* [Military Tools for ArcGIS](https://esri.github.io/military-tools-desktop-addins/)
* [Military Tools for ArcGIS Solutions Pages](http://solutions.arcgis.com/defense/help/military-tools/)
* [ArcGIS for Defense Solutions Website](http://solutions.arcgis.com/defense)
* [ArcGIS for Defense Downloads](http://appsforms.esri.com/products/download/#ArcGIS_for_Defense)
* [ArcGIS Blog](http://blogs.esri.com/esri/arcgis/)
* [ArcGIS Solutions Website](http://solutions.arcgis.com/military/)
* [ArcGIS Solutions Website](http://solutions.arcgis.com/)

## Issues

Expand All @@ -78,33 +82,23 @@ Find a bug or want to request a new feature? Please let us know by submitting a

Anyone and everyone is welcome to contribute. Please see our [guidelines for contributing](https://github.com/esri/contributing).

### Repository Points of Contact

#### Repository Owner: [Kevin](https://github.com/kgonzago)

* Merge Pull Requests
* Creates Releases and Tags
* Manages Milestones
* Manages and Assigns Issues

#### Secondary: [Lyle](https://github.com/topowright)

* Backup when the owner is away
## Repository Points of Contact
Contact the [Military Tools team](mailto:defensesolutions@esri.com)

## Licensing

Copyright 2015-2017 Esri
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
You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0
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.

A copy of the license is available in the repository's [license.txt](license.txt) file.
A copy of the license is available in the repository's [license.txt](./License.txt) file.

Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,5 @@ public MainViewModel()

public CCConvertTabView ConvertTabView { get; set; }

object selectedTab = null;
public object SelectedTab
{
get { return selectedTab; }
set
{
if (selectedTab == value)
return;

selectedTab = value;
var tabItem = selectedTab as TabItem;
if ((tabItem == null) || ((tabItem.Content == null) ||
(tabItem.Content as UserControl).Content == null))
return;

Mediator.NotifyColleagues(Constants.TAB_ITEM_SELECTED, ((tabItem.Content as UserControl).Content as UserControl).DataContext);
//TODO let the other viewmodels determine what to do when tab selection changes
if (tabItem.Header.ToString() == CoordinateConversionLibrary.Properties.Resources.HeaderCollect)
Mediator.NotifyColleagues(CoordinateConversionLibrary.Constants.SetToolMode, MapPointToolMode.Collect);
else
Mediator.NotifyColleagues(CoordinateConversionLibrary.Constants.SetToolMode, MapPointToolMode.Convert);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,13 @@ private string PromptSaveFileDialog(string ext, string filter, string title)
sfDlg = new SaveFileDialog();
sfDlg.AddExtension = true;
sfDlg.CheckPathExists = true;
sfDlg.DefaultExt = ext;
sfDlg.Filter = filter;
sfDlg.OverwritePrompt = true;
sfDlg.Title = title;

}

sfDlg.FileName = "";
sfDlg.DefaultExt = ext;
sfDlg.Filter = filter;
sfDlg.Title = title;

if (sfDlg.ShowDialog() == DialogResult.OK)
{
Expand Down Expand Up @@ -596,6 +596,8 @@ private void OnPasteCommand(object obj)
var coordinates = new List<string>();
foreach (var item in lines)
{
if (item.Trim() == "")
continue;
var sb = new StringBuilder();
sb.Append(item.Trim());
coordinates.Add(sb.ToString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ public class Constants
public const string SetListBoxItemAddInPoint = "SET_LISTBOX_ITEM_ADDINPOINT";
public const string NewMapPointSelection = "NEW_MAP_POINT_SELECTION";
public const string SetCoordinateGetter = "SET_COORDINATE_GETTER";
public const string SetToolMode = "SET_TOOL_MODE";
public const string NEW_MAP_POINT = "NEW_MAP_POINT";
public const string MOUSE_MOVE_POINT = "MOUSE_MOVE_POINT";
public const string TAB_ITEM_SELECTED = "TAB_ITEM_SELECTED";
public const string IMPORT_COORDINATES = "IMPORT_COORDINATES";
public const string CollectListHasItems = "COLLECT_LIST_HAS_ITEMS";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static IEnumerable<T> Import<T>(Stream stream, string[] fieldNames) where
List<T> list = new List<T>();
using (StreamReader reader = new StreamReader(stream))
{
string line = reader.ReadLine();
string line = reader.ReadLine().Trim();
if (line.Contains("sep="))
line = reader.ReadLine();
if (string.IsNullOrEmpty(line))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* 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 CoordinateConversionLibrary.Views;
using System;
Expand Down Expand Up @@ -87,5 +87,42 @@ public virtual string ToString(string format, IFormatProvider formatProvider)

return string.Empty;
}

public delegate void delShowAmbiguousEventHandler(object sender, AmbiguousEventArgs e);
public static event delShowAmbiguousEventHandler ShowAmbiguousEventHandler;
public static bool IsEventAttached { get; set; }

public static void ShowAmbiguousEvent()
{
var handler = ShowAmbiguousEventHandler;
if (handler != null)
{
var eventArgs = new AmbiguousEventArgs() { IsEventHandled = true };
handler(typeof(CoordinateBase), eventArgs);
IsEventAttached = true;
}
else
{
IsEventAttached = false;
}
}

public static void ShowAmbiguousDialog()
{
CoordinateDD.ShowAmbiguousEvent();
if (!CoordinateDD.IsEventAttached)
ambiguousCoordsViewDlg.ShowDialog();
}

}
public class AmbiguousEventArgs : EventArgs
{
private bool _isEventHandled;

public bool IsEventHandled
{
get { return _isEventHandled; }
set { _isEventHandled = value; }
}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*******************************************************************************
* Copyright 2015 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.
/*******************************************************************************
* Copyright 2015 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 CoordinateConversionLibrary.Views;
Expand Down Expand Up @@ -114,10 +114,9 @@ public static bool TryParse(string input, out CoordinateDD coord, bool displayAm
return false;

if (latValue < 90 && longValue < 90)
ambiguousCoordsViewDlg.ShowDialog();
ShowAmbiguousDialog();
}

blnMatchDDLat = ambiguousCoordsViewDlg.CheckedLatLon;
blnMatchDDLat = CoordinateConversionLibraryConfig.AddInConfig.DisplayAmbiguousCoordsDlg;
}

// Lat/Lon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static bool TryParse(string input, out CoordinateDDM ddm, bool displayAmb
return false;

if (latValue < 90 && longValue < 90)
ambiguousCoordsViewDlg.ShowDialog();
ShowAmbiguousDialog();
}

blnMatchDDMLat = ambiguousCoordsViewDlg.CheckedLatLon;
Expand Down

0 comments on commit 09aaf60

Please sign in to comment.