Exemple #1
0
        public void WorkText()
        {
            string fileName = resp.Login + "_" + resp.Text.UniqeId + ".txt";

            if (!Directory.Exists(Path.Combine(way, "original_txt")))
            {
                Directory.CreateDirectory(Path.Combine(way, "original_txt"));
            }
            File.WriteAllText(Path.Combine(way, "original_txt", fileName), resp.Text.Content);
            resp.TDesc = new TextDesc {
                Path = Path.Combine(way, "original_txt", fileName), Name = fileName, CreatinDate = DateTime.Now
            };
            JSONCreator.CreateJSON(resp.TDesc);
        }
Exemple #2
0
        internal void WorkText(string text)
        {
            string fileName = resp.FileLoc.Name.Remove(resp.FileLoc.Name.Length - 4) + ".txt";
            string path     = Path.Combine(way, "original_txt", fileName);

            TextChecker.Check(text);
            if (!Directory.Exists(Path.Combine(way, "original_txt")))
            {
                Directory.CreateDirectory(Path.Combine(way, "original_txt"));
            }
            File.WriteAllText(path, text);
            resp.TDesc = new TextDesc {
                Path = path, Name = fileName, CreatinDate = DateTime.Now
            };
            JSONCreator.CreateJSON(resp.TDesc);
        }