protected override void CreateChildControls() { FPreviewControl.AsyncExecution = AsyncExecution; FPreviewControl.AsyncPriority = AsyncPriority; LiteralControl lt; lt = new LiteralControl("<table border=\"1\">\n"); Controls.Add(lt); lt = new LiteralControl("<tr>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); { { ImageClickEventHandler clickevent = new ImageClickEventHandler(Image_Click); lt = new LiteralControl("<table>\n"); Controls.Add(lt); lt = new LiteralControl("<tr>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // First BFirst = new System.Web.UI.WebControls.ImageButton(); BFirst.EnableViewState = false; BFirst.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "Reportman.Web.first.bmp"); BFirst.AlternateText = Translator.TranslateStr(221); BFirst.Click += clickevent; Controls.Add(BFirst); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Previous BPrevious = new System.Web.UI.WebControls.ImageButton(); BPrevious.EnableViewState = false; BPrevious.ImageUrl = Page.ClientScript. GetWebResourceUrl(this.GetType(), "Reportman.Web.previous.bmp"); BPrevious.AlternateText = Translator.TranslateStr(223); BPrevious.Click += clickevent; Controls.Add(BPrevious); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Next BNext = new System.Web.UI.WebControls.ImageButton(); BNext.EnableViewState = false; BNext.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "Reportman.Web.next.bmp"); BNext.AlternateText = Translator.TranslateStr(225); BNext.Click += clickevent; Controls.Add(BNext); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Last BLast = new System.Web.UI.WebControls.ImageButton(); BLast.EnableViewState = false; BLast.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "Reportman.Web.last.bmp"); BLast.AlternateText = Translator.TranslateStr(227); BLast.Click += clickevent; Controls.Add(BLast); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Escale real BScale1 = new System.Web.UI.WebControls.ImageButton(); BScale1.EnableViewState = false; BScale1.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "Reportman.Web.scale1.bmp"); BScale1.AlternateText = Translator.TranslateStr(229); BScale1.Click += clickevent; Controls.Add(BScale1); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Print BPrint = new System.Web.UI.WebControls.ImageButton(); BPrint.EnableViewState = false; BPrint.ImageUrl = Page.ClientScript.GetWebResourceUrl(this.GetType(), "Reportman.Web.print.bmp"); BPrint.AlternateText = Translator.TranslateStr(53); BPrint.Click += clickevent; Controls.Add(BPrint); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Zoom Minus BZoomMinus = new System.Web.UI.WebControls.ImageButton(); BZoomMinus.EnableViewState = false; BZoomMinus.ImageUrl = Page.ClientScript.GetWebResourceUrl( this.GetType(), "Reportman.Web.zoom1.bmp"); BZoomMinus.AlternateText = Translator.TranslateStr(235); BZoomMinus.Click += clickevent; Controls.Add(BZoomMinus); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Zoom Plus BZoomPlus = new System.Web.UI.WebControls.ImageButton(); BZoomPlus.EnableViewState = false; BZoomPlus.ImageUrl = Page.ClientScript.GetWebResourceUrl( this.GetType(), "Reportman.Web.zoom2.bmp"); BZoomPlus.AlternateText = Translator.TranslateStr(237); BZoomPlus.Click += clickevent; Controls.Add(BZoomPlus); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // ComboBox Image Format BFormat = new System.Web.UI.WebControls.DropDownList(); BFormat.AutoPostBack = true; Strings codecs = GraphicUtils.GetImageCodecs(); BFormat.Items.Clear(); foreach (string s in codecs) { BFormat.Items.Add(new ListItem(s)); } BFormat.SelectedIndex = BFormat.Items.IndexOf(new ListItem(PreviewControl.Format)); // BFormat.AlternateText = Translator.TranslateStr(237); EventHandler clickeventformat = new EventHandler(Format_Click); BFormat.SelectedIndexChanged += clickeventformat; Controls.Add(BFormat); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>" + HttpUtility.HtmlEncode(Translator.TranslateStr(269)) + "</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Go to page EPage = new System.Web.UI.WebControls.TextBox(); EPage.Text = ""; EPage.MaxLength = 6; EPage.Width = 50; Controls.Add(EPage); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Update page BPage = new System.Web.UI.WebControls.ImageButton(); BPage.EnableViewState = false; BPage.ImageUrl = Page.ClientScript.GetWebResourceUrl( this.GetType(), "Reportman.Web.update.bmp"); BPage.AlternateText = Translator.TranslateStr(1149); BPage.Click += clickevent; Controls.Add(BPage); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); // Label total pages LTotalPages = new System.Web.UI.WebControls.Label(); Controls.Add(LTotalPages); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("</tr>\n"); Controls.Add(lt); lt = new LiteralControl("</table>\n"); Controls.Add(lt); } } lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("</tr>\n"); Controls.Add(lt); lt = new LiteralControl("<tr>\n"); Controls.Add(lt); lt = new LiteralControl("<td>\n"); Controls.Add(lt); Controls.Add(FPreviewControl); lt = new LiteralControl("</td>\n"); Controls.Add(lt); lt = new LiteralControl("</tr>\n"); Controls.Add(lt); lt = new LiteralControl("</table>\n"); Controls.Add(lt); base.CreateChildControls(); ChildControlsCreated = true; }