public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/Logistics_system;component/MainPage.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.iMSMap1 = ((ZDIMS.Map.IMSMap)(this.FindName("iMSMap1"))); this.graphicsLayer1 = ((ZDIMS.Drawing.GraphicsLayer)(this.FindName("graphicsLayer1"))); this.markLayer1 = ((ZDIMS.Drawing.MarkLayer)(this.FindName("markLayer1"))); this.bar = ((ZDIMSDemo.Controls.NavigationBar)(this.FindName("bar"))); this.toolBar1 = ((Logistics_system.controls.ToolBar)(this.FindName("toolBar1"))); }
private void Navigator_Click(object sender, RoutedEventArgs e) { if (this.MapContainer == null) { return; } if (m_navigator == null) { m_navigator = new NavigationBar(); m_navigator.MapContainer = this.MapContainer; } if (!this.MapContainer.Contains(this.m_navigator)) { this.MapContainer.AddChild(this.m_navigator); Canvas.SetZIndex(this.m_navigator, 2000); } else { this.MapContainer.RemoveChild(this.m_navigator); } }