using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DomainUpDown_CS
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            #if DEBUG
                MinimizeBox = false;
            #else
                MinimizeBox = true;
            #endif
        }

        private void dudColor_SelectedItemChanged(object sender, EventArgs e)
        {
            label1.Text = domainUpDown1.SelectedIndex.ToString();
            label2.Text = domainUpDown1.Items[domainUpDown1.SelectedIndex].ToString();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            domainUpDown1.Items.Add("Пункт 1");
            domainUpDown1.Items.Add("Пункт 2");
            domainUpDown1.Items.Add("Пункт 3");
            domainUpDown1.Items.Add("Пункт 4");
            domainUpDown1.ReadOnly = true;
        }
    }
}