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.
		
		
		
		
		
			
		
			
				
					
					
						
							49 lines
						
					
					
						
							1.4 KiB
						
					
					
				
			
		
		
	
	
							49 lines
						
					
					
						
							1.4 KiB
						
					
					
				using KGIS.Framework.Utils; | 
						|
using Kingo.PluginServiceInterface; | 
						|
using System; | 
						|
using System.Collections.Generic; | 
						|
using System.Windows; | 
						|
using System.Windows.Controls; | 
						|
 | 
						|
namespace Kingo.Plugin.SystemSetting.View.ViewSystemSetting | 
						|
{ | 
						|
    /// <summary> | 
						|
    /// 系统设置-变更设置 的交互逻辑 | 
						|
    /// </summary> | 
						|
    public partial class ViewBGSetting : UserControl | 
						|
    { | 
						|
        public ViewBGSetting() | 
						|
        { | 
						|
            InitializeComponent(); | 
						|
        } | 
						|
 | 
						|
        /// <summary> | 
						|
        /// 全选/反选 | 
						|
        /// </summary> | 
						|
        /// <param name="sender"></param> | 
						|
        /// <param name="e"></param> | 
						|
        private void CheckAll_Click(object sender, RoutedEventArgs e) | 
						|
        { | 
						|
            try | 
						|
            { | 
						|
                if (this.dgCtrl.ItemsSource == null) | 
						|
                    return; | 
						|
                if (!(this.dgCtrl.ItemsSource is List<LayerCfg> baseDataSettingList) || baseDataSettingList.Count <= 0) return; | 
						|
                for (int i = 0; i < baseDataSettingList.Count; i++) | 
						|
                { | 
						|
                    if (this.checkAll.IsChecked == true) | 
						|
                        baseDataSettingList[i].Required = true; | 
						|
                    else | 
						|
                        baseDataSettingList[i].Required = false; | 
						|
                } | 
						|
                this.dgCtrl.RefreshData(); | 
						|
            } | 
						|
            catch (Exception ex) | 
						|
            { | 
						|
                LogAPI.Debug("全选/反选失败:" + ex); | 
						|
            } | 
						|
        } | 
						|
 | 
						|
 | 
						|
    } | 
						|
}
 | 
						|
 |