Exemple #1
0
        /// ------------------------------------------------------------------------------------
        private void HandleParentFormActivated(object sender, EventArgs e)
        {
            var frm = FindForm();

            if (frm != null)
            {
                frm.Activated -= HandleParentFormActivated;
            }

            if (!_model.VerifyAllElementsStillExist())
            {
                LoadElementList();
            }

            if (_model.FileLoadErrors.Any())
            {
                using (var dlg = new FileLoadErrorsReportDlg(_model.FileLoadErrors))
                    dlg.ShowDialog(this);
            }

            // Do this in case some of the meta data changed (e.g. audio file was edited)
            // while the program was deactivated.
            Refresh();

            if (frm != null)
            {
                frm.Activated += HandleParentFormActivated;
            }
        }
Exemple #2
0
        /// ------------------------------------------------------------------------------------
        private void ReportAnyFileLoadErrors()
        {
            var loadErrors = Program.FileLoadErrors;

            if (loadErrors.Any())
            {
                using (var dlg = new FileLoadErrorsReportDlg(loadErrors))
                    dlg.ShowDialog(this);
            }
        }