Beispiel #1
0
        private static void SetClocPath(bool changePath)
        {
            if (changePath)
            {
                Console.WriteLine($"> Current Path: {Settings.ClocPath}");
            }

            string clocPath = PathHint.ReadLine("Type CLOC path: ");

            // TODO: Check if clocPath is an executable file

            Settings.ClocPath = clocPath;
            Settings.Save();

            GoBack();
        }
Beispiel #2
0
        private static void AddPathCallback()
        {
            string path = PathHint.ReadLine("Type project path: ");

            // TODO: Check if path is directory

            if (Settings.ProjectsPath == null)
            {
                Settings.ProjectsPath = new StringCollection();
            }

            Settings.ProjectsPath.Add(path);
            Settings.Save();

            GoBack();
        }
Beispiel #3
0
        private static void FixPaths()
        {
            // int index = 0;
            var list = new List <string>();

            foreach (var path in Settings.ProjectsPath)
            {
                list.Add(PathHint.ToWinDir(path));
            }

            var collection = new StringCollection();

            collection.AddRange(list.ToArray());

            Settings.ProjectsPath = collection;
            Settings.Save();
        }