You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							85 lines
						
					
					
						
							2.7 KiB
						
					
					
				
			
		
		
	
	
							85 lines
						
					
					
						
							2.7 KiB
						
					
					
				using KGIS.Framework.Utils; | 
						|
using System; | 
						|
using System.Windows; | 
						|
using System.Windows.Media; | 
						|
 | 
						|
namespace Kingo.Plugin.MapView.Views.MeasurementUi | 
						|
{ | 
						|
    /// <summary> | 
						|
    /// MeasurementUi.xaml 的交互逻辑 | 
						|
    /// </summary> | 
						|
    public partial class MeasurementUi : BaseWindow | 
						|
    { | 
						|
        /// <summary> | 
						|
        /// 委托类型(通过委托来显示不同的测量页面) | 
						|
        /// </summary> | 
						|
        public Action<int> ActionsUpda; | 
						|
 | 
						|
        public MeasurementUi() | 
						|
        { | 
						|
            InitializeComponent(); | 
						|
        } | 
						|
 | 
						|
        /// <summary> | 
						|
        /// 测量长度按钮 | 
						|
        /// </summary> | 
						|
        /// <param name="sender"></param> | 
						|
        /// <param name="e"></param> | 
						|
        private void Btn_length_Click(object sender, RoutedEventArgs e) | 
						|
        { | 
						|
            Btn_length.Background = new SolidColorBrush(Colors.Gray); | 
						|
            Btn_Area.Background = new SolidColorBrush(Colors.White); | 
						|
            btn_ComputationalGeo.Background = new SolidColorBrush(Colors.White); | 
						|
            if (Grid_Area.Visibility != Visibility.Collapsed) | 
						|
            { | 
						|
                this.Grid_Area.Visibility = Visibility.Collapsed; | 
						|
            } | 
						|
            if (this.Grid_Length.Visibility != Visibility.Visible) | 
						|
            { | 
						|
                this.Grid_Length.Visibility = Visibility.Visible; | 
						|
            } | 
						|
            ActionsUpda(0); | 
						|
        } | 
						|
 | 
						|
        /// <summary> | 
						|
        /// 测量面积按钮 | 
						|
        /// </summary> | 
						|
        /// <param name="sender"></param> | 
						|
        /// <param name="e"></param> | 
						|
        private void Btn_Area_Click(object sender, RoutedEventArgs e) | 
						|
        { | 
						|
            Btn_Area.Background = new SolidColorBrush(Colors.Gray); | 
						|
            Btn_length.Background = new SolidColorBrush(Colors.White); | 
						|
            btn_ComputationalGeo.Background = new SolidColorBrush(Colors.White); | 
						|
            this.Grid_Area.Visibility = Visibility.Visible; | 
						|
            this.Grid_Length.Visibility = Visibility.Collapsed; | 
						|
            ActionsUpda(1); | 
						|
        } | 
						|
 | 
						|
        /// <summary> | 
						|
        /// 测量图形 | 
						|
        /// </summary> | 
						|
        /// <param name="sender"></param> | 
						|
        /// <param name="e"></param> | 
						|
        private void btn_ComputationalGeo_Click(object sender, RoutedEventArgs e) | 
						|
        { | 
						|
            btn_ComputationalGeo.Background = new SolidColorBrush(Colors.Gray); | 
						|
            Btn_Area.Background = new SolidColorBrush(Colors.White); | 
						|
            Btn_length.Background = new SolidColorBrush(Colors.White); | 
						|
            ActionsUpda(2); | 
						|
        } | 
						|
 | 
						|
        /// <summary> | 
						|
        /// 窗体关闭事件 | 
						|
        /// </summary> | 
						|
        /// <param name="sender"></param> | 
						|
        /// <param name="e"></param> | 
						|
        private void BaseWindow_Closed(object sender, EventArgs e) | 
						|
        { | 
						|
            ActionsUpda(3); | 
						|
            this.Close(); | 
						|
        } | 
						|
 | 
						|
    } | 
						|
 | 
						|
}
 | 
						|
 |