Inheritance: System.Web.UI.WebControls.Image, IPostBackEventHandler
Esempio n. 1
0
		public static void PostBackFireEvent_Init (Page p)
		{
			ImageMap imgmap = new ImageMap ();
			imgmap.ID = "imgmap";
			imgmap.HotSpotMode = HotSpotMode.NotSet;
			imgmap.Click += new ImageMapEventHandler (ImageMapClickHandler3);
			RectangleHotSpot rect = new RectangleHotSpot ();
			rect.HotSpotMode = HotSpotMode.PostBack;
			rect.PostBackValue = "Rectangle";
			imgmap.HotSpots.Add (rect);
			p.Form.Controls.Add (imgmap);
		}
Esempio n. 2
0
		public static void myPageLoad (Page page)
		{
			WebTest.CurrentTest.UserData = "Init";
			ImageMap imgmap = new ImageMap ();
			imgmap.ID = "imgmap";
			imgmap.HotSpotMode = HotSpotMode.NotSet;
			imgmap.Click += new ImageMapEventHandler (ImageMapClickHandler2);
			RectangleHotSpot rect = new RectangleHotSpot ();
			rect.HotSpotMode = HotSpotMode.PostBack;
			rect.PostBackValue = "Rectangle";
			imgmap.HotSpots.Add (rect);
			PolygonHotSpot poly = new PolygonHotSpot ();
			poly.HotSpotMode = HotSpotMode.PostBack;
			poly.PostBackValue = "Polygon";
			imgmap.HotSpots.Add (poly);
			imgmap.HotSpotMode = HotSpotMode.PostBack;
			CircleHotSpot circle = new CircleHotSpot ();
			circle.PostBackValue = "Circle";
			imgmap.HotSpots.Add (circle);
			// Two marks for getting controls from form
			LiteralControl lcb = new LiteralControl (HtmlDiff.BEGIN_TAG);
			LiteralControl lce = new LiteralControl (HtmlDiff.END_TAG);
			page.Form.Controls.Add (lcb);
			page.Form.Controls.Add (imgmap);
			page.Form.Controls.Add (lce);
		}
Esempio n. 3
0
        private void Load_Images(string ID_Building)
        {
            ImageObjectDataSource.SelectMethod = "FileRelationList";
            ImageObjectDataSource.SelectParameters.Clear();
            ImageObjectDataSource.SelectParameters.Add("ID_Table", ID_Building);
            ImageObjectDataSource.SelectParameters.Add("NameTable", "Building");

            GridView LWImage = new GridView();
            LWImage.DataSourceID = "ImageObjectDataSource";
            LWImage.AutoGenerateColumns = true;
            UpdatePanel.Controls.Add(LWImage);
            LWImage.Visible = false;
            LWImage.DataBind();

            string photoFilePath = Server.MapPath("../Image_Data/");
            string NameFife = "";
            for (int i = 0; i < LWImage.Rows.Count; i++)
            {
                ImageMap ImageSecond = new ImageMap();
                ImageSecond.ID = LWImage.Rows[i].Cells[4].Text.ToString();
                NameFife = "~/Image_Data/" + LWImage.Rows[i].Cells[4].Text.ToString() + "." + LWImage.Rows[i].Cells[5].Text.ToString();
                ImageSecond.ImageUrl = NameFife;
                ImageSecond.Width = Convert.ToInt16(Label4.Text.ToString());
                ImageSecond.ImageAlign = ImageAlign.Left;
                ImageDiv.Controls.Add(ImageSecond);
            }
        }