Пример #1
0
		} // RenderPoster


		/// <summary>
		/// Responsible for drawing (and downloading) the text example poster.  
		/// </summary>
		protected void RenderTextPosterExample(HttpContext ctx) {
			string templateFilename = ctx.Server.MapPath("./Poster-Templates/text-example-template.jpg");
			string when       = ctx.Request["when"] ?? "";
			string where      = ctx.Request["where"] ?? "";
			string id         = ctx.Request["eventId"] ?? "";			
			
			// And build the poster and send the response back to the browser
			PosterDesigns.ExampleText playFootball = new PosterDesigns.ExampleText(templateFilename);
			string url = string.Format("http://toepoke.co.uk/{0}.aspx", id);
			
			// Set the dynamic bits
			playFootball.Frequency = when;
			playFootball.Venue = where;
			playFootball.SignUpLink = url;

			// Show a border around the areas defined (helps debugging where the rectangles should go)
			playFootball.ShowGuides = GetShowGuidesParam(ctx);
			playFootball.ShowDimensions = GetShowGuidesParam(ctx);

			// Set the size we're after
			playFootball.PercentSize = GetSizeParam(ctx);

			// And send back to the browser
			// .. we're just going to hard-code PNG for the time being
			PosterBuilder.ImgFormat.SupportedTypes outFmt = GetImageType(ctx);
			
			Helpers.SendPosterToBrowser(playFootball, ctx.Response, "football-poster", outFmt);

		} // RenderTextPosterExample
Пример #2
0
        void Download_Click(object sender, EventArgs e)
        {
            string templateFilename = this.Server.MapPath("./Poster-Templates/text-example-template.jpg");

            PosterDesigns.ExampleText poster = new PosterDesigns.ExampleText(templateFilename);

            poster.Frequency = Frequency.Text;
            poster.Venue = Venue.Text;
            poster.SignUpLink = string.Format("http://toepoke.co.uk/{0}.aspx", this.EventID.Text);
            poster.ShowGuides = false;
            poster.ShowDimensions = false;
            poster.PercentSize = 100;		// fullSize when downloading

            PosterBuilder.ImgFormat.SupportedTypes imgType = PosterBuilder.ImgFormat.FromString(PosterRendering.ImageTypes.SelectedValue);

            Helpers.SendPosterToBrowser(poster, this.Response, "my-poster", imgType);
        }
Пример #3
0
        void Download_Click(object sender, EventArgs e)
        {
            string templateFilename = this.Server.MapPath("./Poster-Templates/text-example-template.jpg");

            PosterDesigns.ExampleText poster = new PosterDesigns.ExampleText(templateFilename);

            poster.Frequency      = Frequency.Text;
            poster.Venue          = Venue.Text;
            poster.SignUpLink     = string.Format("http://toepoke.co.uk/{0}.aspx", this.EventID.Text);
            poster.ShowGuides     = false;
            poster.ShowDimensions = false;
            poster.PercentSize    = 100;                        // fullSize when downloading

            PosterBuilder.ImgFormat.SupportedTypes imgType = PosterBuilder.ImgFormat.FromString(PosterRendering.ImageTypes.SelectedValue);

            Helpers.SendPosterToBrowser(poster, this.Response, "my-poster", imgType);
        }         // Download_Click
Пример #4
0
        /// <summary>
        /// Responsible for drawing (and downloading) the text example poster.  
        /// </summary>
        protected void RenderTextPosterExample(HttpContext ctx)
        {
            string templateFilename = ctx.Server.MapPath("./Poster-Templates/text-example-template.jpg");
            string when       = ctx.Request["when"] ?? "";
            string where      = ctx.Request["where"] ?? "";
            string id         = ctx.Request["eventId"] ?? "";

            // And build the poster and send the response back to the browser
            PosterDesigns.ExampleText playFootball = new PosterDesigns.ExampleText(templateFilename);
            string url = string.Format("http://toepoke.co.uk/{0}.aspx", id);

            // Set the dynamic bits
            playFootball.Frequency = when;
            playFootball.Venue = where;
            playFootball.SignUpLink = url;

            // Show a border around the areas defined (helps debugging where the rectangles should go)
            playFootball.ShowGuides = GetShowGuidesParam(ctx);
            playFootball.ShowDimensions = GetShowGuidesParam(ctx);

            // Set the size we're after
            playFootball.PercentSize = GetSizeParam(ctx);

            // And send back to the browser
            // .. we're just going to hard-code PNG for the time being
            PosterBuilder.ImgFormat.SupportedTypes outFmt = GetImageType(ctx);

            Helpers.SendPosterToBrowser(playFootball, ctx.Response, "football-poster", outFmt);
        }