private void FormCreateDocument_Load(object sender, EventArgs e) { textBoxName.TextChanged += new EventHandler(textBox_TextChanged); textBoxDescription.TextChanged += new EventHandler(textBox_TextChanged); fileSelectCtrl.FileNameChanged += new EventHandler(textBox_TextChanged); // file select control fileSelectCtrl.Filter = "Plugin file (*.dll)|*.dll"; // initialize profile combo box comboBoxProfile.Items.Clear(); List <CardboardProfile> listProfile = CardboardProfile.getAll(); foreach (CardboardProfile profile in listProfile) { comboBoxProfile.Items.Add(profile); } if (comboBoxProfile.Items.Count > 0) { comboBoxProfile.SelectedIndex = 0; } // disable Ok button bnOk.Enabled = false; }