78 lines
2.2 KiB
C#
78 lines
2.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace LittleRabbit.LittleRabbitForms.UploadForms
|
|
{
|
|
public partial class UploadProductViolateSelectForm : LittleRabbit.LittleRabbitForms.BaseForms.LRBaseForm
|
|
{
|
|
public UploadProductViolateSelectForm()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void UploadProductViolateSelectForm_Load(object sender, EventArgs e)
|
|
{
|
|
Task.Run(() =>
|
|
{
|
|
// 读取违规信息规则名称列表
|
|
ViolateManageForm.GetAllViolateRuleName();
|
|
// 显示违规信息规则名称列表
|
|
ViolateManageForm.SetViolateSelectList(pnlViolateCheck);
|
|
});
|
|
}
|
|
|
|
private void btnAll_Click(object sender, EventArgs e)
|
|
{
|
|
foreach (Control c in pnlViolateCheck.Controls)
|
|
{
|
|
var chk = c as CheckBox;
|
|
if (chk != null)
|
|
{
|
|
chk.Checked = true;
|
|
ViolateManageForm.Cb_Click(chk, null);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void btnAllSerious_Click(object sender, EventArgs e)
|
|
{
|
|
foreach (Control c in pnlViolateCheck.Controls)
|
|
{
|
|
var chk = c as CheckBox;
|
|
if (chk != null)
|
|
{
|
|
if (chk.ForeColor == Color.FromArgb(240, 10, 0))
|
|
{
|
|
chk.Checked = true;
|
|
}
|
|
else
|
|
{
|
|
chk.Checked = false;
|
|
}
|
|
ViolateManageForm.Cb_Click(chk, null);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void btnNone_Click(object sender, EventArgs e)
|
|
{
|
|
foreach (Control c in pnlViolateCheck.Controls)
|
|
{
|
|
var chk = c as CheckBox;
|
|
if (chk != null)
|
|
{
|
|
chk.Checked = false;
|
|
ViolateManageForm.Cb_Click(chk, null);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|