C# Winform的三态CheckBox,以及批量修改Panel中的控件

在C# WinForms中,如果你想批量修改一个Panel容器内的所有CheckBox控件的状态,你可以使用foreach循环来遍历PanelControls集合。下面是一个示例,展示了如何将一个Panel内所有的CheckBox控件设为选中状态(Checked = true)。

但是要开发如下的界面,有几个重点要考虑:

1. 三态CheckBox,请参考下面代码实现

2. Panel控件中事件的挂载,控件的遍历。如果有不清晰的,请评论反馈我们讨论。

using Infrastructure;
using LatCall.Core;
using LatCall.Service;
using LatRcs.Model.Domain;
using Sunny.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics.Eventing.Reader;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LatRcs.CallPlatform.FrmSetting
{
    public partial class FEditRight : UIEditForm
    {

        public sysRole CurrentRole { get; set; }
        public bool IsAddNew { get; internal set; } = true;
        public FEditRight(sysRole role = null)
        {
            InitializeComponent();
            foreach (var item in pnlMenu.Controls)
            {
                if (item is System.Windows.Forms.Panel)
                {
                    Panel panelCtl = (Panel)item;//强制转换
                    foreach (CheckBox ck in panelCtl.Controls)
                    {
                        ck.CheckedChanged += MenuControl_CheckedChanged;
                    }
                }
            }
           
            if (role != null)
            {
                IsAddNew = false;
                CurrentRole = role;
                txtRoleName.Text = CurrentRole.RoleName;
                txtRoleDescription.Text = CurrentRole.Remark;
                foreach (var roleMenu in role.SysRoleMenuList)
                {
                    foreach (var ChkMenu in pnlMenu.Controls)
                    {
                        if (ChkMenu is System.Windows.Forms.CheckBox)
                        {
                            CheckBox theBox = (CheckBox)ChkMenu;//强制转换
                            if (theBox.Tag.ToString() == roleMenu.MenuID.ToString())
                            {
                                theBox.Checked = true;
                            }
                        }
                    }                        
                }
            }
        }

        private void MenuControl_CheckedChanged(object sender, EventArgs e)
        {
            CheckBox c = sender as CheckBox;
            var menuLevel = int.Parse(c.Tag.ToString());
            Panel editPanel = null;
            if (menuLevel < 2000)
            {
                editPanel = panel1;
            }
             else if (menuLevel < 3000)
            {
                editPanel = panel2;
            }
             else if (menuLevel < 4000)
            {
                editPanel = panel3;
            }
             else if (menuLevel < 5000)
            {
                editPanel = panel4;
            }
            //.....

            CheckBox rootCheck = (CheckBox)editPanel.Controls[0];
            if (c == rootCheck)
            {
                if (rootCheck.CheckState == CheckState.Checked)
                {
                    for (int i = 1; i < editPanel.Controls.Count; i++)
                    {
                        CheckBox theCheckBox = (CheckBox)editPanel.Controls[i];
                        theCheckBox.Checked = true;
                    }
                }
                else 
                {
                    rootCheck.CheckState = CheckState.Unchecked;
                    for (int i = 1; i < editPanel.Controls.Count; i++)
                    {
                        CheckBox theCheckBox = (CheckBox)editPanel.Controls[i];
                        rootCheck.CheckedChanged -= MenuControl_CheckedChanged;
                        theCheckBox.Checked = false;
                        rootCheck.CheckedChanged += MenuControl_CheckedChanged;
                    }
                }
                return;
            }

            if (c.Checked == true)
            {
                bool allChecked = true;
                for(int i = 1; i< editPanel.Controls.Count; i++) 
                {
                    CheckBox theCheckBox = (CheckBox)editPanel.Controls[i];
                    allChecked = allChecked && theCheckBox.Checked;                    
                }                
                if (allChecked == true)
                {
                    rootCheck.CheckState = CheckState.Checked;
                    return;
                }
                else
                {
                    bool allUnChecked = true;
                    for (int i = 1; i < editPanel.Controls.Count; i++)
                    {
                        CheckBox theCheckBox = (CheckBox)editPanel.Controls[i];
                        allUnChecked = allUnChecked && !theCheckBox.Checked;
                    }

                    if (allUnChecked == true)
                    {
                        rootCheck.CheckState = CheckState.Unchecked;
                        return;
                    }
                    else
                    {
                        rootCheck.CheckedChanged -= MenuControl_CheckedChanged;
                        rootCheck.CheckState = CheckState.Indeterminate;
                        rootCheck.CheckedChanged += MenuControl_CheckedChanged;
                    }
                }
            }
            else
            {
                bool allUnChecked = true;
                for (int i = 1; i < panel1.Controls.Count; i++)
                {
                    CheckBox theCheckBox = (CheckBox)panel1.Controls[i];
                    allUnChecked = allUnChecked && !theCheckBox.Checked;
                }

                if (allUnChecked == true)
                {
                    rootCheck.CheckState = CheckState.Unchecked;
                    return;
                }
                else
                {
                    rootCheck.CheckedChanged -= MenuControl_CheckedChanged;
                    rootCheck.CheckState = CheckState.Indeterminate;
                    rootCheck.CheckedChanged += MenuControl_CheckedChanged;
                }
            }
        }

        protected override bool CheckData()
        {
            return CheckEmpty(txtRoleName, "请输入角色名称")
                   && CheckEmpty(txtRoleDescription, "请输入备注")
                   ;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            if (!CheckValid())
            {
                this.IsOK = false;
                this.DialogResult = DialogResult.None;
                return;
            }

            if (CurrentRole == null)
            {
                CurrentRole = new sysRole();
                CurrentRole.ID = CoreData.MaxRoleID + 1;
            }
            CurrentRole.RoleName = txtRoleName.Text;
            CurrentRole.Remark = txtRoleDescription.Text;
            CurrentRole.SysRoleMenuList.Clear();
            foreach (CheckBox chkMenu in pnlMenu.Controls)//有checkBox所以需要循环
            {
                if (chkMenu != null && chkMenu.Checked)
                {
                    var roleMenu = new sysRoleMenu();
                    roleMenu.RoleID = CurrentRole.ID;
                    roleMenu.MenuID = int.Parse(chkMenu.Tag.ToString());
                    CurrentRole.SysRoleMenuList.Add(roleMenu);
                }

            }
        }
        private bool CheckValid()
        {
            bool hasSameName = CoreData.AllRoles.Where(p => p.RoleName == txtRoleName.Text).Any();
            if (hasSameName && IsAddNew)
            {
                Comm.InfoMessage("角色名已经存在,请重新输入!");
                txtRoleName.Focus();
                txtRoleName.SelectAll();
                return false;
            }
            return true;
        }

        private void FEditRight_Load(object sender, EventArgs e)
        {

        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            //this.IsOK = false;
            //this.DialogResult = DialogResult.None;
        }

    }
}







namespace LatRcs.CallPlatform.FrmSetting
{
    partial class FEditRight
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.uiLabel1 = new Sunny.UI.UILabel();
            this.uiLabel2 = new Sunny.UI.UILabel();
            this.txtRoleName = new Sunny.UI.UITextBox();
            this.txtRoleDescription = new Sunny.UI.UITextBox();
            this.uiLabel3 = new Sunny.UI.UILabel();
            this.pnlMenu = new System.Windows.Forms.Panel();
            this.panel2 = new System.Windows.Forms.Panel();
            this.chkHisttoryRoot = new System.Windows.Forms.CheckBox();
            this.checkBox7 = new System.Windows.Forms.CheckBox();
            this.chkWork = new System.Windows.Forms.CheckBox();
            this.chkTask = new System.Windows.Forms.CheckBox();
            this.checkBox13 = new System.Windows.Forms.CheckBox();
            this.checkBox12 = new System.Windows.Forms.CheckBox();
            this.checkBox9 = new System.Windows.Forms.CheckBox();
            this.checkBox10 = new System.Windows.Forms.CheckBox();
            this.checkBox11 = new System.Windows.Forms.CheckBox();
            this.panel1 = new System.Windows.Forms.Panel();
            this.checkBox1 = new System.Windows.Forms.CheckBox();
            this.checkBox2 = new System.Windows.Forms.CheckBox();
            this.checkBox3 = new System.Windows.Forms.CheckBox();
            this.checkBox8 = new System.Windows.Forms.CheckBox();
            this.panel3 = new System.Windows.Forms.Panel();
            this.panel4 = new System.Windows.Forms.Panel();
            this.pnlBtm.SuspendLayout();
            this.pnlMenu.SuspendLayout();
            this.panel2.SuspendLayout();
            this.panel1.SuspendLayout();
            this.panel3.SuspendLayout();
            this.panel4.SuspendLayout();
            this.SuspendLayout();
            // 
            // pnlBtm
            // 
            this.pnlBtm.Location = new System.Drawing.Point(1, 317);
            this.pnlBtm.Size = new System.Drawing.Size(680, 55);
            // 
            // btnCancel
            // 
            this.btnCancel.Location = new System.Drawing.Point(552, 12);
            this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
            // 
            // btnOK
            // 
            this.btnOK.Location = new System.Drawing.Point(437, 12);
            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
            // 
            // uiLabel1
            // 
            this.uiLabel1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.uiLabel1.Location = new System.Drawing.Point(42, 65);
            this.uiLabel1.Name = "uiLabel1";
            this.uiLabel1.Size = new System.Drawing.Size(82, 25);
            this.uiLabel1.TabIndex = 2;
            this.uiLabel1.Text = "角色名称";
            this.uiLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // uiLabel2
            // 
            this.uiLabel2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.uiLabel2.Location = new System.Drawing.Point(42, 109);
            this.uiLabel2.Name = "uiLabel2";
            this.uiLabel2.Size = new System.Drawing.Size(89, 26);
            this.uiLabel2.TabIndex = 3;
            this.uiLabel2.Text = "备注";
            this.uiLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // txtRoleName
            // 
            this.txtRoleName.ButtonSymbolOffset = new System.Drawing.Point(0, 0);
            this.txtRoleName.Cursor = System.Windows.Forms.Cursors.IBeam;
            this.txtRoleName.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.txtRoleName.Location = new System.Drawing.Point(131, 65);
            this.txtRoleName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.txtRoleName.MinimumSize = new System.Drawing.Size(1, 16);
            this.txtRoleName.Name = "txtRoleName";
            this.txtRoleName.Padding = new System.Windows.Forms.Padding(5);
            this.txtRoleName.ShowText = false;
            this.txtRoleName.Size = new System.Drawing.Size(220, 34);
            this.txtRoleName.TabIndex = 4;
            this.txtRoleName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            this.txtRoleName.Watermark = "";
            // 
            // txtRoleDescription
            // 
            this.txtRoleDescription.ButtonSymbolOffset = new System.Drawing.Point(0, 0);
            this.txtRoleDescription.Cursor = System.Windows.Forms.Cursors.IBeam;
            this.txtRoleDescription.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.txtRoleDescription.Location = new System.Drawing.Point(131, 109);
            this.txtRoleDescription.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
            this.txtRoleDescription.MinimumSize = new System.Drawing.Size(1, 16);
            this.txtRoleDescription.Name = "txtRoleDescription";
            this.txtRoleDescription.Padding = new System.Windows.Forms.Padding(5);
            this.txtRoleDescription.ShowText = false;
            this.txtRoleDescription.Size = new System.Drawing.Size(220, 34);
            this.txtRoleDescription.TabIndex = 4;
            this.txtRoleDescription.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
            this.txtRoleDescription.Watermark = "";
            // 
            // uiLabel3
            // 
            this.uiLabel3.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.uiLabel3.Location = new System.Drawing.Point(33, 151);
            this.uiLabel3.Name = "uiLabel3";
            this.uiLabel3.Size = new System.Drawing.Size(71, 26);
            this.uiLabel3.TabIndex = 5;
            this.uiLabel3.Text = "角色权限";
            this.uiLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // pnlMenu
            // 
            this.pnlMenu.Controls.Add(this.panel4);
            this.pnlMenu.Controls.Add(this.panel3);
            this.pnlMenu.Controls.Add(this.panel2);
            this.pnlMenu.Controls.Add(this.panel1);
            this.pnlMenu.Location = new System.Drawing.Point(110, 151);
            this.pnlMenu.Name = "pnlMenu";
            this.pnlMenu.Size = new System.Drawing.Size(463, 158);
            this.pnlMenu.TabIndex = 6;
            // 
            // panel2
            // 
            this.panel2.Controls.Add(this.chkHisttoryRoot);
            this.panel2.Controls.Add(this.checkBox7);
            this.panel2.Controls.Add(this.chkWork);
            this.panel2.Controls.Add(this.chkTask);
            this.panel2.Location = new System.Drawing.Point(30, 44);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(420, 37);
            this.panel2.TabIndex = 7;
            // 
            // chkHisttoryRoot
            // 
            this.chkHisttoryRoot.AutoSize = true;
            this.chkHisttoryRoot.Location = new System.Drawing.Point(3, 14);
            this.chkHisttoryRoot.Name = "chkHisttoryRoot";
            this.chkHisttoryRoot.Size = new System.Drawing.Size(90, 20);
            this.chkHisttoryRoot.TabIndex = 0;
            this.chkHisttoryRoot.Tag = "2000";
            this.chkHisttoryRoot.Text = "历史模块";
            this.chkHisttoryRoot.UseVisualStyleBackColor = true;
            // 
            // checkBox7
            // 
            this.checkBox7.AutoSize = true;
            this.checkBox7.Location = new System.Drawing.Point(307, 14);
            this.checkBox7.Name = "checkBox7";
            this.checkBox7.Size = new System.Drawing.Size(90, 20);
            this.checkBox7.TabIndex = 0;
            this.checkBox7.Tag = "2003";
            this.checkBox7.Text = "系统日志";
            this.checkBox7.UseVisualStyleBackColor = true;
            // 
            // chkWork
            // 
            this.chkWork.AutoSize = true;
            this.chkWork.Location = new System.Drawing.Point(195, 14);
            this.chkWork.Name = "chkWork";
            this.chkWork.Size = new System.Drawing.Size(90, 20);
            this.chkWork.TabIndex = 0;
            this.chkWork.Tag = "2002";
            this.chkWork.Text = "工作日志";
            this.chkWork.UseVisualStyleBackColor = true;
            // 
            // chkTask
            // 
            this.chkTask.AutoSize = true;
            this.chkTask.Location = new System.Drawing.Point(99, 14);
            this.chkTask.Name = "chkTask";
            this.chkTask.Size = new System.Drawing.Size(90, 20);
            this.chkTask.TabIndex = 0;
            this.chkTask.Tag = "2001";
            this.chkTask.Text = "任务历史";
            this.chkTask.UseVisualStyleBackColor = true;
            // 
            // checkBox13
            // 
            this.checkBox13.AutoSize = true;
            this.checkBox13.Location = new System.Drawing.Point(195, 14);
            this.checkBox13.Name = "checkBox13";
            this.checkBox13.Size = new System.Drawing.Size(90, 20);
            this.checkBox13.TabIndex = 0;
            this.checkBox13.Tag = "4002";
            this.checkBox13.Text = "系统用户";
            this.checkBox13.UseVisualStyleBackColor = true;
            // 
            // checkBox12
            // 
            this.checkBox12.AutoSize = true;
            this.checkBox12.Location = new System.Drawing.Point(98, 14);
            this.checkBox12.Name = "checkBox12";
            this.checkBox12.Size = new System.Drawing.Size(90, 20);
            this.checkBox12.TabIndex = 0;
            this.checkBox12.Tag = "4001";
            this.checkBox12.Text = "角色权限";
            this.checkBox12.UseVisualStyleBackColor = true;
            // 
            // checkBox9
            // 
            this.checkBox9.AutoSize = true;
            this.checkBox9.Location = new System.Drawing.Point(99, 11);
            this.checkBox9.Name = "checkBox9";
            this.checkBox9.Size = new System.Drawing.Size(74, 20);
            this.checkBox9.TabIndex = 0;
            this.checkBox9.Tag = "3001";
            this.checkBox9.Text = "机器人";
            this.checkBox9.UseVisualStyleBackColor = true;
            // 
            // checkBox10
            // 
            this.checkBox10.AutoSize = true;
            this.checkBox10.Location = new System.Drawing.Point(195, 11);
            this.checkBox10.Name = "checkBox10";
            this.checkBox10.Size = new System.Drawing.Size(90, 20);
            this.checkBox10.TabIndex = 0;
            this.checkBox10.Tag = "3002";
            this.checkBox10.Text = "角色统计";
            this.checkBox10.UseVisualStyleBackColor = true;
            // 
            // checkBox11
            // 
            this.checkBox11.AutoSize = true;
            this.checkBox11.Location = new System.Drawing.Point(2, 14);
            this.checkBox11.Name = "checkBox11";
            this.checkBox11.Size = new System.Drawing.Size(90, 20);
            this.checkBox11.TabIndex = 0;
            this.checkBox11.Tag = "4000";
            this.checkBox11.Text = "配置模块";
            this.checkBox11.UseVisualStyleBackColor = true;
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.checkBox1);
            this.panel1.Controls.Add(this.checkBox2);
            this.panel1.Controls.Add(this.checkBox3);
            this.panel1.Location = new System.Drawing.Point(30, 13);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(309, 28);
            this.panel1.TabIndex = 1;
            // 
            // checkBox1
            // 
            this.checkBox1.AutoSize = true;
            this.checkBox1.Location = new System.Drawing.Point(3, 5);
            this.checkBox1.Name = "checkBox1";
            this.checkBox1.Size = new System.Drawing.Size(90, 20);
            this.checkBox1.TabIndex = 0;
            this.checkBox1.Tag = "1000";
            this.checkBox1.Text = "用户信息";
            this.checkBox1.ThreeState = true;
            this.checkBox1.UseVisualStyleBackColor = true;
            // 
            // checkBox2
            // 
            this.checkBox2.AutoSize = true;
            this.checkBox2.Location = new System.Drawing.Point(99, 5);
            this.checkBox2.Name = "checkBox2";
            this.checkBox2.Size = new System.Drawing.Size(90, 20);
            this.checkBox2.TabIndex = 0;
            this.checkBox2.Tag = "1001";
            this.checkBox2.Text = "实时角色";
            this.checkBox2.UseVisualStyleBackColor = true;
            // 
            // checkBox3
            // 
            this.checkBox3.AutoSize = true;
            this.checkBox3.Location = new System.Drawing.Point(195, 5);
            this.checkBox3.Name = "checkBox3";
            this.checkBox3.Size = new System.Drawing.Size(74, 20);
            this.checkBox3.TabIndex = 0;
            this.checkBox3.Tag = "1002";
            this.checkBox3.Text = "机器人";
            this.checkBox3.UseVisualStyleBackColor = true;
            // 
            // checkBox8
            // 
            this.checkBox8.AutoSize = true;
            this.checkBox8.Location = new System.Drawing.Point(3, 11);
            this.checkBox8.Name = "checkBox8";
            this.checkBox8.Size = new System.Drawing.Size(90, 20);
            this.checkBox8.TabIndex = 0;
            this.checkBox8.Tag = "3000";
            this.checkBox8.Text = "统计模块";
            this.checkBox8.UseVisualStyleBackColor = true;
            // 
            // panel3
            // 
            this.panel3.Controls.Add(this.checkBox8);
            this.panel3.Controls.Add(this.checkBox10);
            this.panel3.Controls.Add(this.checkBox9);
            this.panel3.Location = new System.Drawing.Point(30, 83);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(413, 34);
            this.panel3.TabIndex = 7;
            // 
            // panel4
            // 
            this.panel4.Controls.Add(this.checkBox11);
            this.panel4.Controls.Add(this.checkBox12);
            
            this.panel4.Controls.Add(this.checkBox13);
            this.panel4.Location = new System.Drawing.Point(30, 120);
            this.panel4.Name = "panel4";
            this.panel4.Size = new System.Drawing.Size(312, 45);
            this.panel4.TabIndex = 7;
            // 
            // FEditRight
            // 
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
            this.ClientSize = new System.Drawing.Size(682, 375);
            this.Controls.Add(this.pnlMenu);
            this.Controls.Add(this.uiLabel3);
            this.Controls.Add(this.txtRoleDescription);
            this.Controls.Add(this.txtRoleName);
            this.Controls.Add(this.uiLabel2);
            this.Controls.Add(this.uiLabel1);
            this.Name = "FEditRight";
            this.Text = "FEditRight";
            this.ZoomScaleRect = new System.Drawing.Rectangle(15, -61, 800, 450);
            this.Load += new System.EventHandler(this.FEditRight_Load);
            this.Controls.SetChildIndex(this.pnlBtm, 0);
            this.Controls.SetChildIndex(this.uiLabel1, 0);
            this.Controls.SetChildIndex(this.uiLabel2, 0);
            this.Controls.SetChildIndex(this.txtRoleName, 0);
            this.Controls.SetChildIndex(this.txtRoleDescription, 0);
            this.Controls.SetChildIndex(this.uiLabel3, 0);
            this.Controls.SetChildIndex(this.pnlMenu, 0);
            this.pnlBtm.ResumeLayout(false);
            this.pnlMenu.ResumeLayout(false);
            this.panel2.ResumeLayout(false);
            this.panel2.PerformLayout();
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.panel3.ResumeLayout(false);
            this.panel3.PerformLayout();
            this.panel4.ResumeLayout(false);
            this.panel4.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private Sunny.UI.UILabel uiLabel1;
        private Sunny.UI.UILabel uiLabel2;
        private Sunny.UI.UITextBox txtRoleName;
        private Sunny.UI.UITextBox txtRoleDescription;
        private Sunny.UI.UILabel uiLabel3;
        private System.Windows.Forms.Panel pnlMenu;
        private System.Windows.Forms.CheckBox checkBox10;
        private System.Windows.Forms.CheckBox checkBox3;
        private System.Windows.Forms.CheckBox checkBox8;
        private System.Windows.Forms.CheckBox chkTask;
        private System.Windows.Forms.CheckBox checkBox1;
        private System.Windows.Forms.CheckBox checkBox7;
        private System.Windows.Forms.CheckBox chkWork;
        private System.Windows.Forms.CheckBox checkBox13;
        private System.Windows.Forms.CheckBox checkBox12;
        private System.Windows.Forms.CheckBox checkBox9;
        private System.Windows.Forms.CheckBox checkBox11;
        private System.Windows.Forms.CheckBox chkHisttoryRoot;
        private System.Windows.Forms.CheckBox checkBox2;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Panel panel2;
        private System.Windows.Forms.Panel panel4;
        private System.Windows.Forms.Panel panel3;
    }
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/799211.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

法制史学习笔记(个人向) Part.4

法制史学习笔记(个人向)_Part.4 6. 唐朝法律制度 6.1 立法概况 立法指导思想&#xff1a;德礼为政教之本&#xff0c;刑罚为政教之用&#xff08;德主刑辅 → \rightarrow →德本刑用&#xff09;&#xff0c;抬高了刑罚在法律体系中的作用&#xff0c;强调两者兼有&#xff0…

Isaac Lab(isaac sim)中使用python ros

ROS&#xff08;Robot Operating System&#xff09;为机器人技术提供了标准化的开发框架和中间件&#xff0c;通过定义接口和约定&#xff0c;简化了硬件与软件的集成&#xff0c;提高了开发效率。它拥有强大的工具集和生态系统&#xff0c;支持从算法开发到系统集成的全过程&…

Django任务管理

1、用django-admin命令创建一个Django项目 django-admin startproject task_manager 2、进入到项目下用命令创建一个应用 cd task_manager python manage.py startapp tasks 3、进入models.py定义数学模型 第2步得到的只是应用的必要空文件&#xff0c;要开始增加各文件实际…

skywalking-2-客户端-php的安装与使用

skywalking的客户端支持php&#xff0c;真的很棒。 官方安装文档&#xff1a;https://skywalking.apache.org/docs/skywalking-php/next/en/setup/service-agent/php-agent/readme/ 前置准备 本次使用的php版本是8.2.13: php -v PHP 8.2.13 (cli) (built: Nov 21 2023 09:5…

近期几首小诗汇总-生活~卷

生活 为生活飘零&#xff0c;风雨都不阻 路见盲人艰&#xff0c;为她心点灯 贺中科大家长论坛成立十五周年 科学家园有喜贺 园外丑汉翘望中 曾一学子入我科 正育科二盼长大 憧憬也能入此家 与科学家论短长 园外翘首听高论 发现有隙入此坛 竟然也能注册成 入园浏览惶然立 此贴…

PostgreSQL17索引优化之支持并行创建BRIN索引

PostgreSQL17索引优化之支持并行创建BRIN索引 最近连续写了几篇关于PostgreSQL17优化器改进的文章&#xff0c;其实感觉还是挺有压力的。对于原理性的知识点&#xff0c;一方面是对这些新功能也不熟悉&#xff0c;为了尽可能对于知识点表述或总结做到准确&#xff0c;因此需要…

springboot websocket 知识点汇总

以下是一个详细全面的 Spring Boot 使用 WebSocket 的知识点汇总 1. 配置 WebSocket 添加依赖 进入maven官网, 搜索spring-boot-starter-websocket&#xff0c;选择版本, 然后把依赖复制到pom.xml的dependencies标签中 配置 WebSocket 创建一个配置类 WebSocketConfig&…

管理无线物联网设备和连接的增长

将项目(或产品)规模化从来不是一件容易的事。然而&#xff0c;随着蜂窝无线物联网的部署&#xff0c;增长挑战尤其令人生畏。 为什么?因为如果不增加复杂性&#xff0c;就无法发展无线物联网部署。复杂性随着物联网而扩大&#xff0c;随着每一个新设备、每一个新的运营商协议…

Python酷库之旅-第三方库Pandas(024)

目录 一、用法精讲 61、pandas.to_numeric函数 61-1、语法 61-2、参数 61-3、功能 61-4、返回值 61-5、说明 61-6、用法 61-6-1、数据准备 61-6-2、代码示例 61-6-3、结果输出 62、pandas.to_datetime函数 62-1、语法 62-2、参数 62-3、功能 62-4、返回值 62-…

C语言指针超详解——强化篇

C语言指针系列文章目录 入门篇 强化篇 文章目录 C语言指针系列文章目录1. assert 断言2. 指针的使用和传址调用2. 1 strlen的模拟实现2. 2 传值调用和传址调用 3. 数组名的理解4. 使用指针访问数组5. 一维数组传参的本质6. 冒泡排序7. 二级指针8. 指针数组9. 指针数组模拟实现…

嵌入式智能手表项目实现分享

简介 这是一个基于STM32F411CUE6和FreeRTOS和LVGL的低成本的超多功能的STM32智能手表~ 推荐 如果觉得这个手表的硬件难做,又想学习相关的东西,可以试下这个新出的开发板,功能和例程demo更多!FriPi炸鸡派STM32F411开发板: 【STM32开发板】 FryPi炸鸡派 - 嘉立创EDA开源硬件平…

缓存的击穿及解决方案

定义及图解 缓存击穿的意思是对于设置了过期时间的key&#xff0c;缓存在某个时间点过期的时 候&#xff0c;恰好这时间点对这个Key有大量的并发请求过来&#xff0c;这些请求发现缓存过期一般都会从后端 DB 加载数据并回设到缓存&#xff0c;这个时候大并发的请求可能会瞬间把…

使用Godot4组件制作竖版太空射击游戏_2D卷轴飞机射击-标题菜单及游戏结束界面(九)

文章目录 开发思路标题菜单界面标题菜单脚本代码结束菜单界面结束菜单脚本代码 使用Godot4组件制作竖版太空射击游戏_2D卷轴飞机射击&#xff08;一&#xff09; 使用Godot4组件制作竖版太空射击游戏_2D卷轴飞机射击-激光组件&#xff08;二&#xff09; 使用Godot4组件制作竖版…

【密码学】密码协议

一、协议的基本概念 &#xff08;1&#xff09;协议的定义 协议&#xff08;Protocol&#xff09;是指由两个或两个以上的参与者为了完成某项特定的任务而采取的一系列步骤。协议规定了参与者之间的通信格式、数据交换的顺序、错误处理方式以及如何确保通信的安全性和可靠性等…

手机数据恢复:适用于 Android 的 4 大数据恢复应用程序

没有人希望丢失设备上的重要数据。如果发生这种情况&#xff0c;请不要惊慌。以下是可帮助您恢复丢失或删除的数据的 Android 数据恢复应用程序列表。 有多种方法可以恢复已删除或丢失的 Android 数据&#xff0c;最简单、最快捷的方法是使用第三方恢复应用程序。这些应用程序会…

mysql5.7.23安装容易出现的问题

目录 1.错误代码1862解决办法 1.1登录进mysql 1.2 填写密码进入后&#xff0c;使用指令修改密码 1.3 好了现在虽然是可以继续用了&#xff0c;但是还是没有永久解决密码过期问题&#xff0c;因为从MySQL版本5.6.6版本起&#xff0c;添加了password_expired功能&#xff0c;…

python初学者知识点笔记更新

文章目录 1.main函数入口2.__init__.py 文件作用3.from .applications import server解释4.变量没有修饰&#xff0c;直接创建使用1. 内置数据类型和函数2. 类和对象3.总结 5.mod app.__module__6.集合对比区分集合类型&#xff1a;混合集合类型 7.安装包失败 1.main函数入口 …

【数学建模与优化】:解析与实践

目录 数学建模概述 1. 什么是数学模型 2. 数学模型的分类 2.1 按应用领域分类 2.2 按建模方法分类 2.3 按是否考虑随机因素分类 2.4 按变量的连续性分类 2.5 按对对象内部规律了解程度分类 2.6 按变量的基本关系分类 2.7 按是否考虑时间变化分类 3. 数学规划及优化模…

【学习笔记】min_25筛

背景 GDCPC2024 出题人&#xff1a;出这道 min25 筛是给大家增加过题数的 [呲牙][大哭][呲牙][大哭] min25筛是干啥的 快速求一个积性函数 F ( x ) F(x) F(x) 的前缀和 这个 F ( x ) F(x) F(x) 需要满足&#xff1a; F ( p ) ∑ i 0 a i p i F(p)\sum_{i0}a_ip^i F(p)∑…

React Element介绍

React Element是React中的核心概念之一&#xff0c;它代表了React应用中的UI元素。React Element并不是真实的DOM节点&#xff0c;而是一个轻量级的、不可变的、描述性的对象&#xff0c;它包含了创建UI所需的类型&#xff08;type&#xff09;、属性&#xff08;props&#xf…