Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Dictionary <string, string> param = PluginBuilderFactory.getProperties(Request);
            PluginBuilder pb = PluginBuilderFactory.newPluginBuilder(Request);

            // Adding - if necessary - CORS headers
            com.wiris.system.service.HttpResponse res = new com.wiris.system.service.HttpResponse(this.Response);
            String origin = this.Request.Headers.Get("origin");

            pb.addCorsHeaders(res, origin);

            Response.ContentType = "application/x-javascript";

            string r = pb.getConfiguration().getJavaScriptConfiguration();

            outVar(Response, "createimagePath", "createimage");
            outVar(Response, "showimagePath", "showimage");
            outVar(Response, "editorPath", "editor");
            outVar(Response, "CASPath", "cas");
            outVar(Response, "createimagePath", "createimage");
            outVar(Response, "createcasimagePath", "createcasimage");
            outVar(Response, "getmathmlPath", "getmathml");
            outVar(Response, "servicePath", "service");
            this.Response.Write(r);
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            PluginBuilder  pb       = PluginBuilderFactory.newPluginBuilder(Request);
            ParamsProvider provider = pb.getCustomParamsProvider();

            // Adding - if necessary - CORS headers
            com.wiris.system.service.HttpResponse res = new com.wiris.system.service.HttpResponse(this.Response);
            String origin = this.Request.Headers.Get("origin");

            pb.addCorsHeaders(res, origin);

            Response.ContentType = "application/json";
            String variableKeys = provider.getRequiredParameter("variablekeys");
            String r            = pb.getConfiguration().getJsonConfiguration(variableKeys);

            this.Response.Write(r);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Dictionary <string, string> param = PluginBuilderFactory.getProperties(Request);
            PluginBuilder  pb             = PluginBuilderFactory.newPluginBuilder(Request, Response);
            AccessProvider accessProvider = pb.getAccessProvider();

            if (accessProvider != null && !accessProvider.requireAccess())
            {
                return;
            }

            // Adding - if necessary - CORS headers
            com.wiris.system.service.HttpResponse res = new com.wiris.system.service.HttpResponse(this.Response);
            String origin = this.Request.Headers.Get("origin");

            pb.addCorsHeaders(res, origin);

            Response.ContentType = "application/json";

            string r = pb.getConfiguration().getJavaScriptConfigurationJson();

            this.Response.Write(r);
        }