public static void AddNewProjectItemToMap(GCDProjectItem item) { if (IsArcMap && Properties.Settings.Default.AddOutputLayersToMap) { try { if (item is GCDProjectRasterItem) { OnAddRasterToMap(item as GCDProjectRasterItem); } else if (item is GCDProjectVectorItem) { OnAddVectorToMap(item as GCDProjectVectorItem); } } catch (Exception ex) { Console.WriteLine("Error adding new project item to the map " + item.Name + ex.Message); } } }
public bool IsNameUnique(string name, List <GCDProjectItem> items, GCDProjectItem ignore) { return(!items.Any(x => x != ignore && string.Compare(name, x.Name, true) == 0)); }