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

news2024/11/27 2:35:46

在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;
    }
}

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

借助 Aspose.Words,在 C# 中将 Word 转换为 JPG

有时我们需要将 Word 文档转换为图片&#xff0c;因为 DOC 或 DOCX 文件在不同设备上的显示可能会有所不同&#xff0c;但图像&#xff08;例如 JPG 格式&#xff09;在任何地方看起来都一样。 Aspose.Words 是一种高级Word文档处理API&#xff0c;用于执行各种文档管理和操作…

超声波眼镜清洗机哪个牌子好?2024年超全热门眼镜清洗机推荐

夏天来了&#xff0c;在户外活动不到几分钟就已经大汗淋漓&#xff01;特别是汗珠一滴滴的挂在眼皮上往下坠落简直让戴眼镜的人苦不堪言&#xff01;虽说戴眼镜在现如今来看是非常普遍的一件事情&#xff0c;但是人们一直深受眼镜清洗的困扰&#xff01;很多朋友看到这里可能会…

C++学习日记 | Lecture 9 类基础

资料来源&#xff1a;南科大 余仕琪 C/C Program Design LINK&#xff1a; CPP/week09 at main ShiqiYu/CPP GitHub9.1-classes-and-objects_哔哩哔哩_bilibili9.2-constructors-and-destructors_哔哩哔哩_bilibili9.3-this-pointer_哔哩哔哩_bilibili9.4-const-and-static…

好用的《身份证工具》插件,解锁6大实用功能

在数据处理领域&#xff0c;超级处理器插件凭借其强大的功能和高效的性能&#xff0c;一直是Excel和WPS用户的心头好。而今&#xff0c;这一优秀插件再次迎来革新——身份证工具功能现已支持单独安装使用&#xff0c;为用户带来前所未有的便利与灵活性。 超级处理器下载与安装…

matlab入门学习

一、什么是matlab MATLAB&#xff08;matrix laboratory矩阵实验室&#xff09;是一款商用数学软件&#xff0c;主要面对科学计算、可视化以及交互式程序设计的高科技计算环境。可用于数据分析、深度学习、图像处理与计算机视觉、量化金融与风险管理等领域。 二、matlab和pyt…

快速在springboot项目中应用EasyExcel

目录 ​编辑一、介绍 二、准备工作 三、初始化项目 3.1 创建项目 3.2 引入依赖 3.3 创建数据库和数据表 3.4 编写application.properties文件 四、开始编写 4.1 目录结构 4.2 MyBatis配置类 4.3 用户实体类 4.4 mapper接口 4.5 编写数据操作文件 4.6 编写Service 业…

静态链接——编译和链接

一、编译和链接的过程 1、GCC生成可执行文件的总体过程 在日常的开发过程中&#xff0c;IDE总是会帮我们将编译和链接合并&#xff0c;一键式的执行,即使在liunx中&#xff0c;使用命令行来编译一个源文件也只是简单的一句"gcc hello.c"。我们并没有过多的关注编译和…

linux的学习(五):shell编程中的变量,运算符,条件判断

简介&#xff1a; shell编程的基本概念&#xff0c;定义变量&#xff0c;运算符&#xff0c;条件判断的基本使用 shell编程 把多个命令写到一个文件里&#xff0c;这个文件就是脚本&#xff0c;里面还有很多的流程控制 基本概念 脚本的后缀名是.sh 脚本的执行&#xff1a;…

全面理解Spring6框架到熟悉与掌握

个人笔记梳理&#xff0c;仅供参考 Spring是一款主流的JavaEE轻量级开源框架 Spring的狭义和广义 广义的Spring&#xff1a;Spring技术栈 泛指以Spring Framework为核心的Spring技术栈 经过十多年的发展&#xff0c;Spring已经不再是一个单纯的应用框架&#xff0c;而是逐…

EasyAnimate-v3版本支持I2V及超长视频生成

阿里云人工智能平台&#xff08;PAI&#xff09;自研开源的视频生成项目EasyAnimate正式发布v3版本&#xff1a; 支持 图片&#xff08;可配合文字&#xff09; 生成视频 支持 上传两张图片作为起止画面 生成视频 最大支持720p&#xff08;960*960分辨率&#xff09; 144帧视…

量化投资基础(一)之均值方差模型一

点赞、关注&#xff0c;养成良好习惯 Life is short, U need Python 量化投资基础系列&#xff0c;不断更新中 1. 投资组合收益率与风险 假设市场有 N N N 个资产&#xff0c;其随机收益率分别为 R 1 , R 2 , … , R N R_1,R_2,\dots,R_N R1​,R2​,…,RN​ &#xff0c;对应…

蓝桥 双周赛算法赛【小白场】

博客主页&#xff1a;誓则盟约系列专栏&#xff1a;IT竞赛 专栏关注博主&#xff0c;后期持续更新系列文章如果有错误感谢请大家批评指出&#xff0c;及时修改感谢大家点赞&#x1f44d;收藏⭐评论✍ 蓝桥第14场小白入门赛T1/T2/T3 题目&#xff1a; T1照常还是送分题无需多…

【Git的基本操作】版本回退 | 撤销修改的三种情况 | 删除文件

目录 5.版本回退 5.1选项hard&后悔药 5.2后悔药&commit id 5.3版本回退的原理 6.撤销修改 6.1情况一 6.2情况二 6.3情况三 ​7.删除文件 Git重要能力之一马&#xff0c;版本回退功能。Git是版本控制系统&#xff0c;能够管理文件历史版本。本篇以ReadMe文件为…

STM32智能楼宇照明系统教程

目录 引言环境准备智能楼宇照明系统基础代码实现&#xff1a;实现智能楼宇照明系统 4.1 数据采集模块 4.2 数据处理与控制模块 4.3 通信与网络系统实现 4.4 用户界面与数据可视化应用场景&#xff1a;楼宇照明管理与优化问题解决方案与优化收尾与总结 1. 引言 智能楼宇照明系…

Vue3新特性:Teleport、Suspense玩转起来!

Vue3新特性&#xff1a;Teleport、Suspense玩转起来&#xff01; 嘿&#xff0c;各位前端小伙伴们&#xff01;今天咱们来聊聊Vue3中的两个新特性&#xff1a;Teleport和Suspense。这两个功能听起来像是从科幻电影里跑出来的&#xff0c;但实际上它们可是能让我们的代码更加优…

Leetcode - 周赛405

目录 一&#xff0c;3210. 找出加密后的字符串 二&#xff0c;3211. 生成不含相邻零的二进制字符串 三&#xff0c;3212. 统计 X 和 Y 频数相等的子矩阵数量 一&#xff0c;3210. 找出加密后的字符串 本题是一道模拟题&#xff0c;代码如下&#xff1a; class Solution {pu…

力扣27.移除元素(Java)

思路&#xff1a; 使用双指针&#xff0c;其中一个指针用来寻找不同val的下标&#xff0c;另一个指针用来赋值 class Solution {public int removeElement(int[] nums, int val) {int left0;//用来赋值的指针for(int right0;right<nums.length;right){//用来寻找不同与val…

[Linux]Linux编译器gcc/g++

首先我们需要明确概念gcc只能用来编译c语言&#xff0c;g即可用来编译c语言&#xff0c;又可用来编译c,但我们一般用gcc编译c,g编译c 一、gcc的使用 当我们写好代码以后可以直接 gcc test.c然后它会自动生成一个可执行程序a.out这个可执行程序的名字不重要&#xff0c;关键是…

醇香之旅:探索红酒的无穷魅力

在浩渺的饮品世界里&#xff0c;红酒如同一颗璀璨的星辰&#xff0c;闪烁着诱人的光芒。它以其不同的醇香和深邃的韵味&#xff0c;吸引着无数人的目光。今天&#xff0c;就让我们一起踏上这场醇香之旅&#xff0c;探索雷盛红酒所带来的无穷魅力。 一、初识红酒的醇香 当我们…

vue3前端页面下载excel模版

1.excel上传到public目录下 2.代码中引用excel路径 <el-space direction"horizontal" size"small"><el-button click"handleChangePage">刷新列表</el-button><el-button type"primary" click"handleBatch…