Exemplo n.º 1
0
 internal bool GetVisibilityFlag(RuntimeMapGroup group)
 {
     return this.ShowAllLayersAndGroups;
 }
Exemplo n.º 2
0
        private bool HasVisibleParent(RuntimeMapGroup grp)
        {
            if (string.IsNullOrEmpty(grp.Group))
                return true;

            var current = _map.Groups[grp.Group];
            if (current != null)
                return current.Visible;
            return true;
        }
Exemplo n.º 3
0
        internal void OnGroupVisibilityChanged(RuntimeMapGroup group, string visbility)
        {
            TrackChange(group.ObjectId, false, Change.ChangeType.visibilityChanged, visbility);

            //???
        }
Exemplo n.º 4
0
 public RuntimeMapLayer CreateLayer(string layerDefinitionId, RuntimeMapGroup group)
 {
     ILayerDefinition ldf = GetLayerDefinition(layerDefinitionId);
     var layer = new RuntimeMapLayer(this, ldf, true);
     if (group != null)
         layer.Group = group.Name;
     return layer;
 }
Exemplo n.º 5
0
 internal void OnGroupParentChanged(RuntimeMapGroup group, string parentId)
 {
     TrackChange(group.ObjectId, false, Change.ChangeType.parentChanged, parentId);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Called when a group is removed
        /// </summary>
        /// <param name="group"></param>
        internal void OnGroupRemoved(RuntimeMapGroup group)
        {
            //???
            var layers = GetLayersOfGroup(group.Name);
            foreach (var lyr in layers)
            {
                this.Layers.Remove(lyr);
            }

            TrackChange(group.ObjectId, false, Change.ChangeType.removed, string.Empty);
        }
Exemplo n.º 7
0
 internal void OnGroupDisplayInLegendChanged(RuntimeMapGroup group, string displayInLegendState)
 {
     TrackChange(group.ObjectId, false, Change.ChangeType.displayInLegendChanged, displayInLegendState);
 }
Exemplo n.º 8
0
 internal void OnGroupLegendLabelChanged(RuntimeMapGroup group, string legendLabel)
 {
     TrackChange(group.ObjectId, false, Change.ChangeType.legendLabelChanged, legendLabel);
 }
Exemplo n.º 9
0
        /// <summary>
        /// Called when a group is added
        /// </summary>
        /// <param name="group"></param>
        internal void OnGroupAdded(RuntimeMapGroup group)
        {
            //???

            TrackChange(group.ObjectId, false, Change.ChangeType.added, string.Empty);
        }
Exemplo n.º 10
0
        internal void DeserializeLayerData(MgBinaryDeserializer d)
        {
            int groupCount = d.ReadInt32();

            this.Groups.Clear();

            for (int i = 0; i < groupCount; i++)
            {
                //TODO: Review when we split to specific implementations
                RuntimeMapGroup g = new RuntimeMapGroup();
                g.Deserialize(d);
                this.Groups.Add(g);
            }

            int mapLayerCount = d.ReadInt32();

            this.Layers.Clear();

            while (mapLayerCount-- > 0)
            {
                RuntimeMapLayer t = DeserializeLayer(d);
                this.Layers.Add(t);
            }
        }
Exemplo n.º 11
0
 public void RemoveGroup(RuntimeMapGroup group)
 {
     Check.NotNull(group, "group"); //NOXLATE
     this.Groups.Remove(group);
 }
Exemplo n.º 12
0
 private bool HasVisibleParent(RuntimeMapGroup grp)
 {
     var current = grp.Group;
     if (current != null)
     {
         var parent = _map.Groups[current];
         if (parent != null)
         {
             return parent.Visible;
         }
     }
     return true;
 }
Exemplo n.º 13
0
 private TreeNode CreateGroupNode(RuntimeMapGroup group)
 {
     var node = new TreeNode();
     node.Name = group.ObjectId;
     node.Text = group.LegendLabel;
     node.Checked = group.Visible;
     node.SelectedImageKey = node.ImageKey = IMG_GROUP;
     var meta = new GroupNodeMetadata(group);
     node.Tag = meta;
     _groups[group.ObjectId] = meta;
     //node.ContextMenuStrip = _legend.GroupContextMenu;
     return node;
 }