Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        public NeuronLayer(eLayerType layerType, int numberNeurons, int numNeuronInputs)
        {
            for (int i = 0; i < numberNeurons; i++)
            {
                Neurons.Add(new Neuron(numNeuronInputs));
            }

            LayerType = layerType;
        }
Exemplo n.º 3
0
        /// <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;
        }
Exemplo n.º 4
0
        /// <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;
        }
Exemplo n.º 5
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;
 }
Exemplo n.º 6
0
 /// <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;
 }
Exemplo n.º 7
0
 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;
 }
Exemplo n.º 8
0
 /// <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;
 }
Exemplo n.º 9
0
 /// <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;
 }