Пример #1
0
        public void createList()
        {
            string template = FILEWORK.ReadFileContent(templateList);

            template = template.Replace("$header1", CONST.header1);
            template = template.Replace("$footer1", CONST.footer1);
            string result = template;

            result = executeType("travel", 1, result);
            result = executeType("work", 2, result);
            result = executeType("friends", 3, result);
            result = executeType("sport", 4, result);
            result = executeType("dog", 5, result);
            result = executeType("food", 6, result);
            result = executeType("book", 7, result);

            double catalogSize = 0;

            catalogSize = FILEWORK.sizeOfFolder(PATH.data, ref catalogSize); //Вызываем наш рекурсивный метод
            sizes       = String.Format("{0} ГБ", catalogSize);
            result      = result.Replace("$1", items.ToString());
            result      = result.Replace("$2", imgs.ToString());
            result      = result.Replace("$3", youtubs.ToString());
            result      = result.Replace("$4", sizes);

            FILEWORK.WriteFileContent(fpath, result);
            Console.WriteLine("+ " + fpath);
        }