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
{
///
/// 系统设置-变更设置 的交互逻辑
///
public partial class ViewBGSetting : UserControl
{
public ViewBGSetting()
{
InitializeComponent();
}
///
/// 全选/反选
///
///
///
private void CheckAll_Click(object sender, RoutedEventArgs e)
{
try
{
if (this.dgCtrl.ItemsSource == null)
return;
if (!(this.dgCtrl.ItemsSource is List 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);
}
}
}
}