Пример #1
0
        public static LabelBox FromXml(XmlReader reader, Map map)
        {
            var labelBox = new LabelBox();
            labelBox.Map = map;
            labelBox.ReadXml(reader);

            return labelBox;
        }
Пример #2
0
 public MapWrapper(Map map)
     :base(map)
 {
     _map = map;
 }
Пример #3
0
 public MapRenderer(Renderer renderer, Map map)
     : base(renderer, map, null)
 {
     _map = map;
 }
Пример #4
0
 private void InitMap()
 {
     _map = new Map();
     _map.NodeTypes.Add(SpatialiteLayer.NodeType.ElementName, SpatialiteLayer.NodeType);
     _map.Changed += new EventHandler(map_Changed);
 }
Пример #5
0
		private bool PromptToSaveChanges(Map map)
		{
			if (!_mapHasChanges)
				return true;
			
			var result = MessageBox.Show("Save changes?", Application.ProductName, MessageBoxButtons.YesNoCancel);
			if (result == DialogResult.Yes)
				return Save();
			return (result == DialogResult.No);
		}
Пример #6
0
 public void SetMap(Map map)
 {
     Clear();
     AddMapNode(_mapNode, map);
 }
Пример #7
0
        public TreeNode AddMapNode(TreeNode parent, Map map)
        {
            Debug.Assert(_mapNode == null);
            if (_treeView != null)
                _treeView.AfterCheck -= _treeView_AfterCheck;

            var node = AddGroupNode(parent, map);
            node.Expand();
            node.Tag = new MapWrapper(map);

            if (_treeView != null)
                _treeView.AfterCheck += _treeView_AfterCheck;

            return node;
        }
Пример #8
0
        public override object Clone()
        {
            var map = new Map();
            map.BackgroundColor = BackgroundColor;
            map.Base = Base;

            foreach (var node in Nodes)
                map.Nodes.Add((ThemeNode)node.Clone());

            return map;
        }