private void tabControl1_SelectedIndexChanged_1(object sender, EventArgs e) { if (tabControl1.SelectedIndex == 0) { m_controlsSynchronizer.ActivateMap(); } else { m_controlsSynchronizer.ActivatePageLayout(); } }
/// <summary> /// 切换地图和制版视图 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tabControl2_SelectedIndexChanged(object sender, EventArgs e) { if (this.tabControl2.SelectedIndex == 0) { //激活MapControl m_controlsSynchronizer.ActivateMap(); } else { //激活PageLayoutControl m_controlsSynchronizer.ActivatePageLayout(); } }
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { if (tabControl1.SelectedIndex == 0) //map view { //activate the MapControl and deactivate the PageLayoutControl m_controlsSynchronizer.ActivateMap(); } else //layout view { //activate the PageLayoutControl and deactivate the MapControl m_controlsSynchronizer.ActivatePageLayout(); } }
/// <summary> /// 控制两种视图的切换 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { if (m_controlsSynchronizer == null) { return; } if (tabControl1.SelectedTab.Name.Equals("mapTab")) { m_controlsSynchronizer.ActivateMap(); } else if (tabControl1.SelectedTab.Name.Equals("pageTab")) { m_controlsSynchronizer.ActivatePageLayout(); } }
private void tabContent_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e) { if (e.Page == pageMap) { tabContent.TabPages[0].PageVisible = true; _controlsSynchronizer.ActivateMap(); IMap map = _layoutControl.ActiveView.FocusMap; _controlsSynchronizer.ReplaceMap(map); tabContent.TabPages[1].PageVisible = false; } else if (e.Page == pageLayout) { tabContent.TabPages[1].PageVisible = true; _controlsSynchronizer.ActivatePageLayout(); IMap map = _mapControl.Map; _controlsSynchronizer.ReplaceMap(map); tabContent.TabPages[0].PageVisible = false; } FireArcGISControlChanging(); }