Exemplo n.º 1
0
        private void InitWell()
        {
            Layer layer = new Layer();

            TxtWell tw = new TxtWell()
            {
                TxtFile = "D:\\Data\\MulWellColumnData.txt"
            };

            layer.Objects = GraphGeFactory.Single().Create(tw);

            Binding bd = new Binding("Objects")
            {
                Source = layer
            };

            lyControl.SetBinding(ItemsControl.ItemsSourceProperty, bd);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 概要:创建井位图
        /// </summary>
        private void CreateWellLocation()
        {
            //1.引入数据模板
            var manager = new DataTemplateManager();

            manager.RegDataTemplateByFile <WellLocation>(type, cbTemplate.SelectedValue.ToString());
            //2.创建Layer
            Layer            layer = new Layer();
            TXTWellLocations twl   = new TXTWellLocations()
            {
                TxtFile = "d:/welllocations.txt"
            };

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

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