private string GetFormatFromDefaults() { var item = DefaultFormats.FirstOrDefault(i => i.CType == GetCoordinateType()); if (item == null) { return(CoordinateConversionLibrary.Properties.Resources.StringNoFormatFound); } return(item.DefaultNameFormatDictionary.Select(x => x.Value).FirstOrDefault()); }
private ObservableCollection <string> GetFormatList(string CategorySelection) { var item = DefaultFormats.FirstOrDefault(i => i.CType == GetCoordinateType()); if (item == null) { return(null); } return(new ObservableCollection <string>(item.DefaultNameFormatDictionary.Keys)); }
private string GetFormatFromDefaults() { var item = DefaultFormats.FirstOrDefault(i => i.CType == GetCoordinateType()); if (item == null) { return(Properties.Resources.StringNoFormatFound); } return(item.DefaultNameFormatDictionary[FormatSelection]); }
private string GetFormatSample(string format) { var cType = GetCoordinateType(); var def = DefaultFormats.FirstOrDefault(i => i.CType == cType); if (def == null) { return(string.Empty); } foreach (var item in def.DefaultNameFormatDictionary) { if (item.Value == format) { return(item.Key); } } return(CoordinateConversionLibrary.Properties.Resources.CustomString); }
private string GetFormatSample(string format) { if (OutputCoordItem == null) { return(string.Empty); } var def = DefaultFormats.FirstOrDefault(i => i.CType == OutputCoordItem.CType); if (def == null) { return(string.Empty); } foreach (var item in def.DefaultNameFormatDictionary) { if (item.Value == format) { return(item.Key); } } return(Properties.Resources.CustomString); }