private void mb_File_Exit_Click(object sender, EventArgs e)
        {
            if (CheckForSave(true) == DialogResult.Cancel)
            {
                return;
            }

            ucDataCreation ucData = _mainForm.PanelDataCreation.Controls.OfType <ucDataCreation>().First();
        }
        private void mb_File_CreateData_Click(object sender, EventArgs e)
        {
            if (CheckForSave(false) == DialogResult.Cancel)
            {
                return;
            }

            ucDataCreation ucData = _mainForm.PanelDataCreation.Controls.OfType <ucDataCreation>().First();

            ucData.CreateData();
            _mainForm.ShowPanel(_mainForm.PanelDataCreation);
        }
        public DialogResult CheckForSave(bool asNewFile)
        {
            ucDataCreation ucData       = _mainForm.PanelDataCreation.Controls.OfType <ucDataCreation>().First();
            DialogResult   dialogResult = DialogResult.No;

            if (ucData.DataSaved || ucData.DataCreationGrid.RowCount == 0)
            {
                return(dialogResult);
            }

            dialogResult = MessageBox.Show("Сохранить набор данных?", "Сохранение набора данных", MessageBoxButtons.YesNoCancel);

            if (dialogResult == DialogResult.Yes)
            {
                ucData.SaveData(asNewFile);
            }

            return(dialogResult);
        }
        private void mb_File_SaveDataAs_Click(object sender, EventArgs e)
        {
            ucDataCreation ucData = _mainForm.PanelDataCreation.Controls.OfType <ucDataCreation>().First();

            ucData.SaveData(true);
        }