public static void CheckSettingsAndContinue()
 {
     if (!IsValid())
     {
         var popUp = new TimedPopUp();
         popUp.ShowCriticalError($"Cannot find appsettings.json" +
                                 $"\nApplication will be closed");
     }
 }
Exemple #2
0
        public List <string> GetFiles(string dir)
        {
            List <string> files = null;

            try
            {
                files = Directory.GetFiles(dir).ToList();
            }
            catch (DirectoryNotFoundException e)
            {
                var popUp = new TimedPopUp();
                popUp.ShowCriticalError($"Cannot find directory: " +
                                        $"\n{dir}" +
                                        $"\nCreate the directory and restart app");
            }

            return(files);
        }