示例#1
0
        private void btExecuteAutomata_Click(object sender, EventArgs e)
        {
            Result result = new Result();

            foreach (var word in Words)
            {
                result.AddLine(String.Format("{0} - {1}", word, Automata.Accepts(word)));
            }
            try
            {
                ResultService.ExportToFile(result, outFileName);
                MessageBox.Show(string.Format("Arquivo salvo com sucesso: {0}", outFileName));
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
        }