Ejemplo n.º 1
0
        public List<Movie> GetMovies()
        {
            Kolosej kolosej = new Kolosej();
            DownloadXmlData dxd = new DownloadXmlData();
            dxd.GetXmlResult(kolosej);
            string s = dxd.GetXml();

            List<Movie> movies = new List<Movie>();

            //hardcoded remove later
            movies = kolosej.Parse(s, "Maribor", DateTime.Now);

            return movies;
        }
Ejemplo n.º 2
0
        public List<Movie> GetMoviesKolosej(string city, string date)
        {
            Kolosej kolosej = new Kolosej();
            DownloadXmlData dxd = new DownloadXmlData();
            dxd.GetXmlResult(kolosej);
            string s = dxd.GetXml();

            List<Movie> movies = new List<Movie>();

            string dateFormat = "yyyyMMdd";
            DateTime dt = DateTime.ParseExact(date, dateFormat, null);
            movies = kolosej.Parse(s, city, dt);

            return movies;
        }
Ejemplo n.º 3
0
        public List<Movie> GetMoviesPlanetTus(string city, string date)
        {
            //hack fix later
            if (city.Equals("Novomesto"))
            {
                city = "Novo mesto";
            }

            PlanetTus planettus = new PlanetTus();
            DownloadXmlData dxd = new DownloadXmlData();
            dxd.GetXmlResult(planettus);
            string s = dxd.GetXml();

            List<Movie> movies = new List<Movie>();

            string dateFormat = "yyyyMMdd";
            DateTime dt = DateTime.ParseExact(date, dateFormat, null);
            movies = planettus.Parse(s, city, dt);

            return movies;
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            /*
            Kolosej kolosej = new Kolosej();
            DownloadXmlData dxd = new DownloadXmlData();
            dxd.GetXmlResult(kolosej);
            string s = dxd.GetXml();

            List<Movie> movies = new List<Movie>();

            movies = kolosej.Parse(s, "Maribor", DateTime.Now);
            Console.WriteLine(s);
             */

            PlanetTus pt = new PlanetTus();
            DownloadXmlData dxd = new DownloadXmlData();
            dxd.GetXmlResult(pt);
            string s = dxd.GetXml();

            List<Movie> movies = new List<Movie>();

            movies = pt.Parse(s, "Maribor", DateTime.Now);
            Console.WriteLine(s);

            //Console.WriteLine("###############################################");

            //XDocument doc = XDocument.Parse(s);
            ////get all movies
            //List<XElement> movieListElement = (from e in doc.Descendants("movie") select e).ToList();

            //foreach (XElement xe in movieListElement)
            //{
            //    Console.WriteLine(xe.Name);
            //}
            //Console.WriteLine();
        }