예제 #1
0
        static void Main(string[] args)
        {
            string fileAddress = System.Console.ReadLine();
            string text        = System.IO.File.ReadAllText(fileAddress, Encoding.GetEncoding("windows-1254"));

            System.Console.WriteLine("Dosya alındı. Kelimeler alınıyor.");
            string[] words = text.Split(',');
            System.Console.WriteLine(words.Length + " kelime alındı. Anlamlar sorgulanıyor.");
            StringBuilder str = new StringBuilder();

            foreach (string word in words)
            {
                _business = new Bus(new TdkGts {
                    Word = word
                });
                str.Append(_business.GetDescriptionsAsText());
                str.AppendLine();
                str.AppendLine();
                System.Console.Write('.');
            }
            System.Console.WriteLine("Sorgulama tamamlandı. Dosyaya yazılıyor.");

            string descriptionFile = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\Description.txt";

            // Write the string array to a new file named "WriteLines.txt".
            using (StreamWriter outputFile = new StreamWriter(descriptionFile))
            {
                outputFile.Write(str);
            }

            Process.Start(descriptionFile);
        }
예제 #2
0
        private void Search()
        {
            Word word = new Word
            {
                RichText = _business.GetDescriptionsAsRichText(),
                Sound    = _business.GetSound(),
                Text     = _business.GetDescriptionsAsText()
            };

            ShowTextArea(word.RichText);
            _isProsessing = false;
        }
        void Search()
        {
            Word word = new Word
            {
                RichText = _business.GetDescriptionsAsRichText(),
                Sound    = _business.GetSound(),
                Text     = _business.GetDescriptionsAsText()
            };

            rtbWord.Rtf  = word.RichText;
            txtDesc.Text = word.Text;
        }