protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); QuickViewConfig config = new QuickViewConfig(); if (!config.getResources().getRunAsService() && !config.getResources().isOfflineMode()) { WebAssetsManager webAssetsManager = new WebAssetsManager(); webAssetsManager.Update(config.getResources().getResourcesUrl()); } }
public QuickViewApiController() { quickViewConfig = new QuickViewConfig(); // create viewer application configuration ViewerConfig config = new ViewerConfig(); config.StoragePath = quickViewConfig.getApplication().getFilesDirectory(); config.EnableCaching = true; List <String> fontsDirectory = new List <String>(); fontsDirectory.Add(quickViewConfig.getApplication().getFontsDirectory()); config.FontDirectories = fontsDirectory; // set GroupDocs license License license = new License(); license.SetLicense(quickViewConfig.getApplication().getLicensePath()); // initialize viewer instance for the HTML mode viewerHtmlHandler = new ViewerHtmlHandler(config); // initialize viewer instance for the Image mode viewerImageHandler = new ViewerImageHandler(config); }
public ActionResult Index() { string viewName = new QuickViewConfig().getResources().getRunAsService() ? "QuickViewService" : "QuickView"; return(View(viewName)); }