Beispiel #1
0
        }         // Download_Click

        void Preview_Click(object sender, EventArgs e)
        {
            string posterUrl = string.Format("PosterHandler.ashx?posterId=1&when={0}&where={1}&eventID={2}&",
                                             Frequency.Text,
                                             Venue.Text,
                                             EventID.Text
                                             );

            posterUrl += PosterRendering.ToQueryString();

            // Now we just set the image source on the right hand side, and let the HttpHandler do the rest
            Poster.ImageUrl = posterUrl;
            Poster.Visible  = true;
        }         // MakePoster_Click
        }         // Download_Click

        /// <summary>
        /// Converts the parameters expressed on the page into a URL which will call the HttpHandler and thereby
        /// construct the image (according to the parameters given in the query string).
        /// </summary>
        private string GetPosterURL()
        {
            const int     PosterID  = 3;
            StringBuilder posterUrl = new StringBuilder();

            posterUrl.Append("PosterHandler.ashx?");
            posterUrl.AppendFormat("posterId={0}", PosterID);
            posterUrl.AppendFormat("&special-offer={0}", HttpUtility.UrlEncode(SpecialOffer.Text));
            posterUrl.AppendFormat("&offer-for={0}", HttpUtility.UrlEncode(OfferFor.Text));
            posterUrl.AppendFormat("&birthday={0}", HttpUtility.UrlEncode(Birthday.Text));
            posterUrl.Append("&");
            posterUrl.Append(PosterRendering.ToQueryString());

            return(posterUrl.ToString());
        }         // GetPosterURL
Beispiel #3
0
        }         // MakePoster_Click

        /// <summary>
        /// Converts the parameters expressed on the page into a URL which will call the HttpHandler and thereby
        /// construct the image (according to the parameters given in the query string).
        /// </summary>
        private string GetPosterURL()
        {
            const int     PosterID  = 2;
            StringBuilder posterUrl = new StringBuilder();

            posterUrl.Append("PosterHandler.ashx?");
            posterUrl.AppendFormat("posterId={0}", PosterID);
            posterUrl.AppendFormat("&when={0}", HttpUtility.UrlEncode(Frequency.Text));
            posterUrl.AppendFormat("&where={0}", HttpUtility.UrlEncode(Venue.Text));
            posterUrl.AppendFormat("&eventID={0}", int.Parse(EventID.Text));
            posterUrl.AppendFormat("&lat-long={0}", HttpUtility.UrlEncode(LatLong.Text));
            posterUrl.AppendFormat("&address={0}", HttpUtility.UrlEncode(Address.Text));
            posterUrl.AppendFormat("&map-type={0}", HttpUtility.UrlEncode(MapType.SelectedValue));
            posterUrl.Append("&");
            posterUrl.Append(PosterRendering.ToQueryString());

            return(posterUrl.ToString());
        }
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag ("Player");
     posterRenderingScript = player.GetComponent <PosterRendering> ();
     anim = GetComponent<Animator> ();
 }