示例#1
0
文件: Legend.cs 项目: kanbang/Colt
 internal bool GetVisibilityFlag(RuntimeMapGroup group)
 {
     return this.ShowAllLayersAndGroups;
 }
示例#2
0
文件: Legend.cs 项目: kanbang/Colt
        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;
        }
示例#3
0
        internal void OnGroupVisibilityChanged(RuntimeMapGroup group, string visbility)
        {
            TrackChange(group.ObjectId, false, Change.ChangeType.visibilityChanged, visbility);

            //???
        }
示例#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;
 }
示例#5
0
 internal void OnGroupParentChanged(RuntimeMapGroup group, string parentId)
 {
     TrackChange(group.ObjectId, false, Change.ChangeType.parentChanged, parentId);
 }
示例#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);
        }
示例#7
0
 internal void OnGroupDisplayInLegendChanged(RuntimeMapGroup group, string displayInLegendState)
 {
     TrackChange(group.ObjectId, false, Change.ChangeType.displayInLegendChanged, displayInLegendState);
 }
示例#8
0
 internal void OnGroupLegendLabelChanged(RuntimeMapGroup group, string legendLabel)
 {
     TrackChange(group.ObjectId, false, Change.ChangeType.legendLabelChanged, legendLabel);
 }
示例#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);
        }
示例#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);
            }
        }
示例#11
0
 public void RemoveGroup(RuntimeMapGroup group)
 {
     Check.NotNull(group, "group"); //NOXLATE
     this.Groups.Remove(group);
 }
示例#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;
 }
示例#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;
 }