mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-24 00:36:41 +08:00
1、优化LOG显示与引用
2、添加PMA工具,工具内容待完善 3、修复流程树显示 4、添加开源项目,优化UI空间 5、其他BUG更改
This commit is contained in:
76
UsingControl/Controls/CCheckBox.cs
Normal file
76
UsingControl/Controls/CCheckBox.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Controls.Properties;
|
||||
|
||||
namespace Controls
|
||||
{
|
||||
public delegate void DCheckChanged(bool Checked);
|
||||
public partial class CCheckBox : UserControl
|
||||
{
|
||||
public CCheckBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
ckb_box.Text = TextStr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 状态改变事件
|
||||
/// </summary>
|
||||
public event DCheckChanged CheckChanged;
|
||||
/// <summary>
|
||||
/// 勾选状态
|
||||
/// </summary>
|
||||
private bool _checked = false;
|
||||
public bool Checked
|
||||
{
|
||||
get { return _checked; }
|
||||
set
|
||||
{
|
||||
_checked = value;
|
||||
ckb_box.Checked = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 文本
|
||||
/// </summary>
|
||||
private string _textStr = "复选框";
|
||||
public string TextStr
|
||||
{
|
||||
get { return _textStr; }
|
||||
set
|
||||
{
|
||||
_textStr = value;
|
||||
ckb_box.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void pic_image_Click(object sender, EventArgs e)
|
||||
{
|
||||
ckb_box.Checked = !ckb_box.Checked;
|
||||
}
|
||||
private void ckb_box_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ckb_box.Checked)
|
||||
{
|
||||
pic_image.Image = Resources.复选框;
|
||||
Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
pic_image.Image = Resources.去复选框;
|
||||
Checked = false;
|
||||
}
|
||||
if (CheckChanged != null)
|
||||
CheckChanged(ckb_box.Checked);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user