Below you will find pages that utilize the taxonomy term “Control”
Posts
[C#][Control]BitsControl概念與簡易實做
int bitWith = width / 8; bit8.Width = bitWith; bit7.Width = bitWith; bit6.Width = bitWith; bit5.Width = bitWith; bit4.Width = bitWith; bit3.Width = bitWith; bit2.Width = bitWith; bit1.Width = bitWith; int bitHeight = flowLayoutPanel1.ClientSize.Height - bit8.Margin.Top * 2; bit8.Height = bitHeight; bit7.Height = bitHeight; bit6.Height = bitHeight; bit5.Height = bitHeight; bit4.Height = bitHeight; bit3.Height = bitHeight; bit2.Height = bitHeight; bit1.Height = bitHeight; }</pre> public void LoadBitsState(string hexValue) { LoadBitsState(Convert.ToInt32(hexValue, 16)); }</pre> namespace WindowsFormsApplication6 { public partial class BitsControl : UserControl { public BitsControl() { InitializeComponent(); }
read morePosts
[C#][Control]指撥開關控制項的概念與簡易實作
private SwitchState _state; public SwitchState State { get { return _state; } set { if (_state == value) return; _state = value; AdjustOnOffButton(); } } private void AdjustOnOffButton() { switch (State) { case SwitchState.On: OnOffButton.Dock = DockStyle.Top; break; case SwitchState.Off: OnOffButton.Dock = DockStyle.Bottom; break; default: break; } }</pre> private void OnOffButton_Click(object sender, EventArgs e) { Toggle(); }</pre> namespace WindowsFormsApplication3 { public partial class SwitchButton : UserControl {
public enum SwitchState { On, Off } private SwitchState _state; public SwitchState State { get { return _state; } set { if (_state == value) return; _state = value; AdjustOnOffButton(); } } public SwitchButton() { InitializeComponent(); State = SwitchState.
read morePosts
[Control][C#]WebCamPictureBox Control
.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /white-space: pre;/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .
read more