public void fillVisibleLayers(TemplatePluginVS2005.Forms.frmLayers frm) { int selectedIndex = 0; int counter = 0; frm.cboLayers.Items.Clear(); //Add every visible layer to the combobox: for (int i = 0; i < _mapWin.Layers.NumLayers; i++) { int layerHandle = _mapWin.Layers.GetHandle(i); if (_mapWin.Layers[layerHandle].Visible) { string layerName = _mapWin.Layers[layerHandle].Name; eLayerType layerType = _mapWin.Layers[layerHandle].LayerType; MyLayersList myListItem = new MyLayersList(layerName, layerHandle, layerType); frm.cboLayers.Items.Add(myListItem); if (_mapWin.Layers.CurrentLayer == layerHandle) { selectedIndex = counter; } counter++; } } if (selectedIndex > 0) { frm.cboLayers.SelectedIndex = selectedIndex; } }
public NeuronLayer(eLayerType layerType, int numberNeurons, int numNeuronInputs) { for (int i = 0; i < numberNeurons; i++) { Neurons.Add(new Neuron(numNeuronInputs)); } LayerType = layerType; }
/// <summary> /// Constructor /// </summary> public Layer(Legend leg) { //The next line MUST GO FIRST in the constructor m_Legend = leg; //The previous line MUST GO FIRST in the constructor Expanded = false; ColorLegend = new ArrayList(); m_Handle = -1; m_Icon = null; m_Height = Constants.ITEM_HEIGHT; m_LayerType = eLayerType.Invalid; m_UseDynamicVisibility = false; HasTransparency = false; m_SkipDuringSave = false; }
/// <summary> /// Constructor /// </summary> public Layer(Legend leg) { //The next line MUST GO FIRST in the constructor m_Legend = leg; //The previous line MUST GO FIRST in the constructor Expanded = true; //(m_Legend.m_Map.ShapeDrawingMethod == MapWinGIS.tkShapeDrawingMethod.dmNewSymbology); //Expanded = false; ColorLegend = new ArrayList(); m_Handle = -1; m_Icon = null; m_LayerType = eLayerType.Invalid; m_UseDynamicVisibility = false; HasTransparency = false; Elements = new List <LayerElement>(); ShapefileBinding = new ShapefileBinding(); //_symbologySettings = new SymbologySettings(); m_CustomObjects = new Hashtable(); m_smallIconWasDrawn = false; //m_height = 0; }
public int FindLastLayerIdx(eLayerType layerType, int startIndex = 0) { for (int i = MapLayers.Count - 1; i >= startIndex; --i) if (MapLayers[i].LayerType == layerType) return i; return -1; }
/// <summary> /// Find the last layer found of provided type or null if not found. /// </summary> /// <param name="layerType">Layer type to be found</param> /// <param name="startIndex">The zero-based starting index of the search</param> public MapLayer FindLastLayer(eLayerType layerType, int startIndex = 0) { for (int i = MapLayers.Count - 1; i >= startIndex; --i) if (MapLayers[i].LayerType == layerType) return MapLayers[i]; return null; }
public int FindFirstLayerIdx(eLayerType layerType, int startIndex = 0) { for (int i = startIndex; i < MapLayers.Count; ++i) if (MapLayers[i].LayerType == layerType) return i; return -1; }
/// <summary> /// Find the first layer found of provided type or null if not found. /// </summary> /// <param name="layerType">Layer type to be found</param> /// <param name="startIndex">The zero-based starting index of the search</param> /// <returns></returns> public MapLayer FindFirstLayer(eLayerType layerType, int startIndex = 0) { for (int i = startIndex; i < MapLayers.Count; ++i) if (MapLayers[i].LayerType == layerType) return MapLayers[i]; return null; }
/// <summary> /// Constructor /// </summary> /// <param name="name"></param> /// <param name="layerHandle"></param> /// <param name="layerType"></param> /// <param name="mapUnits"></param> public MyLayersList(string name, int layerHandle, eLayerType layerType) { _name = name; _layerHandle = layerHandle; _layerType = layerType; }