using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using Tools.Word;

namespace web_map.Controllers
{
    public class HomeController : BaseController
    {
        //SerialazService serialazService = 
        //    new SerialazService();

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult FAQ()
        {
            ViewBag.Message = "FAQ page.";

            return View();
        }

        public ActionResult Image(string id)
        {
            var dir = Server.MapPath("~/App_Data") + @"\pics\";
            var path = System.IO.Path.Combine(dir, id + ".png"); //validate the path for security or use other means to generate the path.
            return base.File(path, "image/jpeg");
        }

        //public FileStreamResult GetFile(string URL)
        //{
        //    var stream = serialazService.EntitysToDocx(new object[3]);

        //    return File(stream, "docx", URL+".docx");
        //}

    }
}