Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            ContentParser cont = new ContentParser();
            ScriptParser scriptPars = new ScriptParser();

            if (cont.startParse(System.IO.Path.GetFullPath("characters/fate.txt")))
            {
                scr = cont.script;
                scr.addContent();
            }
            else
            {
                System.Windows.MessageBox.Show("Fail Characters");
            }

            try
            {
                LexerParser lexpars = new LexerParser();

                if (lexpars.startParse(System.IO.Path.GetFullPath("new_bidon.txt")))
                {
                    scr = lexpars.script;
                    scr.addContent();
                    ev = new ScriptEval(gScreen);
                }
                else
                {
                    System.Windows.MessageBox.Show("Fail");
                }
            }
            catch (Exception e)
            {
                System.Windows.MessageBox.Show(e.ToString());
                System.Windows.MessageBox.Show(e.StackTrace);
            }

        }
Exemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            ContentParser cont       = new ContentParser();
            ScriptParser  scriptPars = new ScriptParser();

            if (cont.startParse(System.IO.Path.GetFullPath("characters/fate.txt")))
            {
                scr = cont.script;
                scr.addContent();
            }
            else
            {
                System.Windows.MessageBox.Show("Fail Characters");
            }

            try
            {
                LexerParser lexpars = new LexerParser();

                if (lexpars.startParse(System.IO.Path.GetFullPath("new_bidon.txt")))
                {
                    scr = lexpars.script;
                    scr.addContent();
                    ev = new ScriptEval(gScreen);
                }
                else
                {
                    System.Windows.MessageBox.Show("Fail");
                }
            }
            catch (Exception e)
            {
                System.Windows.MessageBox.Show(e.ToString());
                System.Windows.MessageBox.Show(e.StackTrace);
            }
        }