Beispiel #1
0
        private void InitializePins()
        {
            pinsTable.Padding = new Padding(0, 0, SystemInformation.VerticalScrollBarWidth, 0);
            for (int i = 0; i < PIN_COUNT; i++)
            {
                Pin pin = new Pin(i, sketch);
                pinsTable.Controls.Add(pin);
                pin.Anchor = AnchorStyles.Left | AnchorStyles.Right;
                pin.Visible = false;

                CheckBox check = new CheckBox();
                check.Text = pin.Title;
                checksTable.Controls.Add(check);

                pins[i] = pin;
                checks[i] = check;
            }

            // HACK(Richo): By default I make these three pins visible
            checks[11].Checked = checks[13].Checked = checks[15].Checked = true;
        }
Beispiel #2
0
 private void toggle(Pin pin)
 {
     pin.Visible = !pin.Visible;
 }