Example #1
0
 public Mapctl()
 {
     InitializeComponent();
     TextState.Loaded += new RoutedEventHandler(textLoaded);
     mBackground       = new MapBackground();               //创建地图背景图层
     mRainjunc         = new RainJuncs();
     mWastejunc        = new WasteJuncs();
     mRainpipe         = new RainPipes(mRainjunc);
     mWastepipe        = new WastePipes(mWastejunc);
 }
Example #2
0
        //是否显示雨水管道图层
        private void View_Show_Rainpipe_Click(object sender, RoutedEventArgs e)
        {
            int index = 1;

            if (View_Show_Rainpipe.IsChecked)
            {
                View_Show_Rainpipe.IsChecked = false;
                this.MapGrid.Children[index + 1].Visibility = Visibility.Hidden;
                listLayer.ElementAt(index).IsHidden         = true;
            }
            else
            {
                View_Show_Rainpipe.IsChecked = true;
                this.MapGrid.Children[index + 1].Visibility = Visibility.Visible;
                listLayer.ElementAt(index).IsHidden         = false;
                RainPipes pipes = listLayer.ElementAt(index) as RainPipes;
                pipes.Update();
            }
        }