Example #1
0
        private void PromptBackUp()
        {
            PC.WriteLine("Please insert where to backup to: ");
            string path = MorePaths.getFolderPath();

            if (path == null || path == folder || path.Contains(folder))
            {
                PC.FormatWriteLine("Failed to back up to {0}", path);
            }
            else
            {
                BackUp(path);
            }
        }
Example #2
0
        private static void Main(string[] args)
        {
            CatalogManager m;

            if (args.Length != 0)
            {
                m = new CatalogManager(Loader.loaderFromFolder(args[0]), args[0]);
                m.Run();
            }
            else
            {
                PC.WriteLine("Files should be named correctly in input folder");
                PC.WriteLine(
                    "Few warnings are given in program. Ensure all codes are correct (01 is incorrect, 1 is correct)");
                PC.WriteLine("Do not have brackets in file names");
                PC.WriteLine("Ensure you have LONG PATHS enabled : https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters");
                string s;
                int    dec;
                do
                {
                    PC.WriteLine("0 - New Card System\n1 - Load Card System\n2 - Close");
                    s = Console.ReadLine();
                } while (!int.TryParse(s, out dec));

                if (dec == 0 || dec == 1)
                {
                    string fileContent = string.Empty;
                    string filePath    = string.Empty;

                    string path = MorePaths.getFolderPath();
                    if (path == null)
                    {
                        return;
                    }

                    m = dec == 0 ? CatalogManager.Setup(path) : new CatalogManager(Loader.loaderFromFolder(path), path);

                    Console.Clear();
                    m.Run();
                }
            }
        }