Added example.

This commit is contained in:
agolybev
2015-04-29 19:10:50 +03:00
parent 9fa5abd662
commit 5a5952e41f
288 changed files with 66614 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using System.Web.Mvc;
using OnlineEditorsExampleMVC.Helpers;
using OnlineEditorsExampleMVC.Models;
namespace OnlineEditorsExampleMVC.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult Editor(string fileName, string mode)
{
mode = mode ?? string.Empty;
var file = new FileModel
{
TypeDesktop = mode != "embedded",
FileName = fileName
};
return View("Editor", file);
}
public ActionResult Sample(string fileExt)
{
var fileName = DocManagerHelper.CreateDemo(fileExt);
Response.Redirect(Url.Action("Editor", "Home", new { fileName = fileName }));
return null;
}
}
}