Exemplo n.º 1
0
        private void CreateWellLocation()
        {
            Map   map   = new Map();
            Layer layer = new Layer();
            //Layer sectionLayer = SectionLayerCreator.CreateSectionLayer();
            TXTWellLocations twl = new TXTWellLocations()
            {
                TxtFile = "d:/welllocations.txt"
            };
            WellLocationsCreator c = new WellLocationsCreator();

            layer.Objects = c.Create(twl);
            //IObjects objs = c.Create(twl);
            //foreach (var o in objs)
            //{
            //    sectionLayer.Objects.Add(o);
            //}
            map.Layers.Add(layer);
            //3.绑定lc数据源
            Binding bd = new Binding("Layers")
            {
                Source = map
            };

            mc.SetBinding(ItemsControl.ItemsSourceProperty, bd);
        }
Exemplo n.º 2
0
        private void AddPalneMap_Click(object sender, RoutedEventArgs e)
        {
            Map map = new Map()
            {
                Name = "Plane"
            };
            Layer            layer = new Layer();
            TXTWellLocations twl   = new TXTWellLocations()
            {
                TxtFile = "d:/welllocations.txt"
            };
            WellLocationsCreator c = new WellLocationsCreator();

            layer.Objects = c.Create(twl);
            map.Layers.Add(layer);
            Project.Maps.Add(map);
        }
Exemplo n.º 3
0
        private void CreateWellLocation(string fileName)
        {
            Map              map   = new Map();
            Layer            layer = new Layer();
            TXTWellLocations twl   = new TXTWellLocations()
            {
                TxtFile = fileName
            };
            WellLocationsCreator c = new WellLocationsCreator();

            layer.Objects = c.Create(twl);
            map.Layers.Add(layer);
            //3.绑定lc数据源
            Binding bd = new Binding("Layers")
            {
                Source = map
            };

            mc.SetBinding(ItemsControl.ItemsSourceProperty, bd);
        }