Ejemplo n.º 1
0
            public void RemoveAt(int index)
            {
                Platform.CheckArgumentRange(index, 0, _layers.Count - 1, "index");
                LayerGraphic layer = (LayerGraphic)base.Graphics[index];

                _layers.Remove(layer.Id);
                base.Graphics.Remove(layer);
            }
Ejemplo n.º 2
0
            public ILayer Add(string layerId)
            {
                layerId = FormatLayerId(layerId);
                if (_layers.ContainsKey(layerId))
                {
                    throw new ArgumentException("A layer with the same ID already exists.", "layerId");
                }

                LayerGraphic layer = new LayerGraphic(layerId);

                _layers.Add(layerId, layer);
                base.Graphics.Add(layer);
                return(layer);
            }
Ejemplo n.º 3
0
            public ILayer Insert(int index, string layerId)
            {
                Platform.CheckArgumentRange(index, 0, _layers.Count, "index");

                layerId = FormatLayerId(layerId);
                if (_layers.ContainsKey(layerId))
                {
                    throw new ArgumentException("A layer with the same ID already exists.", "layerId");
                }

                LayerGraphic layer = new LayerGraphic(layerId);

                _layers.Add(layerId, layer);
                base.Graphics.Insert(index, layer);
                return(layer);
            }