4 * This software is distributed under a BSD-style license.
\r
5 * See license.txt for more information.
\r
9 using System.Collections.Generic;
\r
10 using System.ComponentModel;
\r
11 using System.Drawing;
\r
14 using System.Windows.Forms;
\r
18 public partial class BitSwitches4 : UserControl
\r
21 private int startBit;
\r
26 public BitSwitches4()
\r
28 InitializeComponent();
\r
33 [CategoryAttribute("Data")]
\r
34 [DefaultValue(typeof(int), "-1")]
\r
81 #region private methods
\r
82 private void Coordinate()
\r
84 int y = startBit < 32 ? label.Size.Height : 0;
\r
85 table.Location = new Point(table.Location.X, y);
\r
86 int labelY = startBit < 32 ? 0 : b0.Size.Height;
\r
87 label.Location = new Point(label.Location.X, labelY);
\r
88 label.Text = startBit.ToString();
\r
93 private void BitSwitches4_SizeChanged(object sender, EventArgs e)
\r
95 table.Width = Width - Margin.Left - Margin.Right;
\r
96 table.Height = Height - label.Height - Margin.Bottom - Margin.Top;
\r
97 int y = startBit < 32 ? label.Size.Height : 0;
\r
98 table.Location = new Point(table.Location.X, y);
\r