using System; using System.Collections.Generic; using System.Linq; using System.Text; using HradlovaSit; using System.IO; namespace HradlovaSitKonzole { class Program { static void Main(string[] args) { if (args.Length > 1) { try { HradlovaSit.Window1.LoadFromXML(args[0]); } catch (Exception) { Console.WriteLine("Nepodařilo se otevřít soubor s popisem."); } string outf = HradlovaSit.Window1.Evaluate(args[1], false); if (outf != null) { Console.WriteLine("vystup:"); Console.Write(File.OpenText(outf).ReadToEnd()); } } string cmd = null, cmd2; while (cmd != "halt") { Console.WriteLine("Zadejte soubor s popisem site"); cmd = Console.ReadLine(); if (cmd == "halt") return; Console.WriteLine("Zadejte soubor se vstupem"); cmd2 = Console.ReadLine(); if (cmd2 == "halt") return; try { HradlovaSit.Window1.LoadFromXML(cmd); } catch (Exception) { Console.WriteLine("Nepodařilo se otevřít soubor s popisem."); } string outf = HradlovaSit.Window1.Evaluate(cmd2, false); if (outf != null) { Console.WriteLine("vystup:"); Console.Write(File.OpenText(outf).ReadToEnd()); } } } } }