private void button1_Click(object sender, EventArgs e) { if (Nomenclatures.materials.Count == 0 || Nomenclatures.ovens.Count == 0 || Nomenclatures.ovensSpecifications.Count == 0) { MessageBox.Show("Пожалуйста, сначала загрузите файлы с данными о материалах и машинах", "Недостаточно данных", MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } Nomenclatures.openPartiesFile(listView1); }