DotNet 4.8.1 build of DotNetBar
This commit is contained in:
53
PROMS/DotNetBar Source Code/Editors/LockUpdateCheckBox.cs
Normal file
53
PROMS/DotNetBar Source Code/Editors/LockUpdateCheckBox.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
#if FRAMEWORK20
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DevComponents.Editors
|
||||
{
|
||||
public class LockUpdateCheckBox : VisualCheckBox
|
||||
{
|
||||
#region Private Variables
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the LockUpdateCheckBox class.
|
||||
/// </summary>
|
||||
public LockUpdateCheckBox()
|
||||
{
|
||||
this.Checked = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Internal Implementation
|
||||
public override void PerformLayout(PaintInfo pi)
|
||||
{
|
||||
base.PerformLayout(pi);
|
||||
this.Size = new System.Drawing.Size(this.Size.Width + 4, this.Size.Height);
|
||||
}
|
||||
|
||||
protected override void OnCheckedChanged(EventArgs e)
|
||||
{
|
||||
if (this.Parent is VisualGroup)
|
||||
{
|
||||
VisualGroup g = this.Parent as VisualGroup;
|
||||
for (int i = 0; i < g.Items.Count; i++)
|
||||
{
|
||||
VisualItem item = g.Items[i];
|
||||
if (item == this) continue;
|
||||
item.Enabled = this.Checked;
|
||||
}
|
||||
}
|
||||
|
||||
base.OnCheckedChanged(e);
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user