绗?涓?姝ワ???寤轟?涓?绫?lsTurnPicture
澧????規?濡?涓???锛?
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLiYWan5CdyFGdTt2YvxmQkVGZuFGc4V0LcNncvRXYjlGZul0ZulmbpxGd190LcdmbpRHanlGbodWaohXY05Wez9CX0Vmbu4GZzNmLzV2Zh1Wavw1LcpDc0RHaiojIsJye.gif)
///?<summary>
????????///????懼?劇??绫?downmoon)
????????///?</summary>
????????///?<param?name="arrImgName">arrImgName</param>
????????///?<param?name="arrDesc">arrDesc</param>
????????///?<param?name="strShopName">strShopName</param>
????????///?<param?name="strBrandName">strBrandName</param>
????????///?<param?name="strResoourceCode">strResoourceCode</param>
????????///?<param?name="ScrWidth">ScrWidth</param>
????????///?<param?name="ScrHeight">ScrHeight</param>
????????///?<param?name="PicWidth">PicWidth</param>
????????///?<param?name="PicHeight">PicHeight</param>
????????///?<param?name="TextHeight">TextHeight</param>
????????///?<param?name="ToolBarHeight">ToolBarHeight</param>
????????///?<param?name="FontSize">榛?璁や負16,px</param>
????????///?<returns></returns>
???????? public ? string ?getPicsForHtml(ArrayList?arrImgName,ArrayList?arrDesc, string ?strShopName, string ?strBrandName, string ?strResoourceCode, int ?ScrWidth, int ?ScrHeight, int ?PicWidth, int ?PicHeight, int ?TextHeight, int ?ToolBarHeight, int ?FontSize)
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLiYWan5CdyFGdTt2YvxmQkVGZuFGc4V0LcNncvRXYjlGZul0ZulmbpxGd190LcdmbpRHanlGbodWaohXY05Wez9CX0Vmbu4GZzNmLzV2Zh1Wavw1LcpDc0RHaiojIsJye.gif)
???????? ... {?
?????????????StringBuilder?sb?=?new?StringBuilder();
????????????string?strHtml="";
????????????if(arrImgName==null)?return?""?;
????????????ArrayList?ar1=new?ArrayList(arrImgName);
????????????ArrayList?ar2=new?ArrayList(arrDesc);
????????????int?len=ar1.Count;
????????????int?len2=ar1.Count-1;
????????????int?len3=ToolBarHeight-2;
????????????string?str1="";
????????????string?str2="";
????????????//strHtm+=@"???<html><head><title>Buynow{0}-{1}-{2}?劇??淇℃??</title>
????????????strHtml=@"<!DOCTYPE?HTML?PUBLIC?""-//W3C//DTD?HTML?4.0?Transitional//EN""?><HTML><HEAD><title>"+????strShopName+"-"+strBrandName+"-"+"甯?浣?锛?"+strResoourceCode+???"-澶?瑙?灞?绀哄??+
????????????????@"</title>
????????<meta?http-equiv=""content-type""?content=""text/html;?charset=gb2312"">
????????<meta?name=""GENERATOR""?Content=""Microsoft?Visual?Studio?.NET?7.1"">
????????<meta?name=""CODE_LANGUAGE""?Content=""C#"">
????????<meta?name=""vs_defaultClientScript""?content=""JavaScript"">
????????<meta?name=""vs_targetSchema""?content=""http://schemas.microsoft.com/intellisense/ie5"">??"+System.Environment.NewLine;
????????????sb.Append(strHtml);
????????????sb.Append("<script?language=JavaScript>"+" ");
????????????sb.Append("<!--?Begin"+System.Environment.NewLine);
????????????sb.Append("var?interval?=?6;?//?delay?between?rotating?images?(in?seconds)"+System.Environment.NewLine);
????????????sb.Append("interval?*=?1000;"+System.Environment.NewLine);
????????????sb.Append("var?flagtime=0;"+System.Environment.NewLine);
????????????sb.Append("var?image_index?=?-1;"+System.Environment.NewLine);
????????????sb.Append("image_list?=?new?Array();"+System.Environment.NewLine);
????????????sb.Append("note_list?=?new?noteArray("+len2.ToString()+")"+System.Environment.NewLine);
????????????sb.Append("var?number_of_image?=?image_list.length;"+System.Environment.NewLine);
????????????sb.Append("var?timesnum=0;????"+System.Environment.NewLine);
????????????//strHtml=string.Format(strHtml,len.ToString());
????????????string?strTemp="";
????????????for(int?k=0;k<ar1.Count;k++)
????????????...{
????????????????strTemp=ar1[k].ToString();
????????????????//strHtm+="?image_list[k]?=?new?imageItem("+strTemp+")";
????????????????str1+="?image_list["+k.ToString()+"]?=?new?imageItem(""+strTemp+"")"+"; ";
????????????}
????????????sb.Append(""+System.Environment.NewLine);
????????????for(int?k=0;k<ar2.Count;k++)
????????????...{
????????????????strTemp=strShopName+"-"+strBrandName+"-"+strResoourceCode+"-"+ar2[k].ToString();
????????????????str2+="?note_list["+k.ToString()+"]?=?""+strTemp+"""+"; ";
????????????}
????????????sb.Append(str1);
????????????sb.Append(str2);
????????????sb.Append("function?noteArray(size)"+System.Environment.NewLine);
????????????sb.Append("{"+System.Environment.NewLine);
????????????sb.Append("this.length=size;"+System.Environment.NewLine);
????????????sb.Append("for(i=1;i<=size;i++)"+System.Environment.NewLine);
????????????sb.Append("{"+System.Environment.NewLine);
????????????sb.Append(@"this[i]="""""+System.Environment.NewLine);
????????????sb.Append("????}"+System.Environment.NewLine);
????????????sb.Append("return?this;"+System.Environment.NewLine);
????????????sb.Append("}"+System.Environment.NewLine);
????????????sb.Append("function?counternum()"+System.Environment.NewLine);
????????????sb.Append("{"+System.Environment.NewLine);
????????????sb.Append("if(?timesnum?<?"+len2.ToString()+")"+System.Environment.NewLine);
????????????sb.Append("{"+System.Environment.NewLine);
????????????sb.Append("????timesnum++;"+System.Environment.NewLine);
????????????sb.Append(@"//document.all.slide_ent.src=""about:blank"";");
????????????sb.Append(System.Environment.NewLine);
???????????
????????????sb.Append(@"//document.all.slide_ent.src=""about:blank"";");
????????????sb.Append(System.Environment.NewLine);
????????????sb.Append("????}"+System.Environment.NewLine);
????????????sb.Append("}"+System.Environment.NewLine);
????????????sb.Append(@"function?run(obj)
????????????????????????????{
????????????????????????????????interval=obj.options[obj.selectedIndex].value*1000;
????????????????????????????????rotateImage();
????????????????????????????}");
????????????sb.Append(@"function?stop()
????????????????????{
????????????????????????interval=0;
????????????????????}
????????????????????function?previous()
????????????????????{
????????????????????????var?new_image?=?getPreviousImage();
????????????????????????document[""rImage""].src?=?new_image;
????????????????????}
????????????????????function?next()
????????????????????????{
????????????????????????????var?new_image?=?getNextImage();
????????????????????????????document[""rImage""].src?=?new_image;
????????????????????????}
????????????????????????function?imageItem(image_location)
????????????????????????{
????????????????????????????this.image_item?=?new?Image();
????????????????????????????this.image_item.src?=?image_location;
????????????????????????}
????????????????????????function?noteItem(note)
????????????????????????{
????????????????????????????this.note_item?=?new?Image();
????????????????????????????this.note_item.src?=?note;
????????????????????????}
????????????????????????function?get_ImageItemLocation(imageObj)
????????????????????????{
????????????????????????????return(imageObj.image_item.src)
????????????????????????????}
????????????????????????function?get_NoteItemLocation(noteObj)
????????????????????????{
????????????????????????????return(noteObj.note_item.src)
????????????????????????????}
????????????????????????function?generate(x,?y)
????????????????????????{
????????????????????????????var?range?=?y?-?x?+?1;
????????????????????????????return?Math.floor(Math.random()?*?range)?+?x;
????????????????????????}");
????????????sb.Append(@"function?getPreviousImage()
????????????????????????{
????????????????????????????image_index?=?image_index-1;
????????????????????????????if?(image_index?<?0)
????????????????????????????{");
????????????sb.Append("image_index=image_index+"+len.ToString()+";");
????????????sb.Append(@"}
????????????????var?new_image?=?get_ImageItemLocation(image_list[image_index]);
????????????????document.all.span_1.innerText=image_index+1;
????????????????document.all.summary.innerText=note_list[image_index];
????????????????return(new_image);");
????????????sb.Append(System.Environment.NewLine+"}");
????????????sb.Append(@"function?getNextImage()
????????????????????{
????????????????????????image_index?=?image_index+1;
????????????????????");
????????????sb.Append("if?(image_index?>=?"+len.ToString()+")");
????????????sb.Append(System.Environment.NewLine);???????????
????????????sb.Append(@"{");
????????????sb.Append(System.Environment.NewLine);???????
????????????sb.Append("image_index=image_index-"+len.ToString()+";");
????????????sb.Append(System.Environment.NewLine);???????
????????????sb.Append("}");
????????????sb.Append(System.Environment.NewLine);???????
????????????//sb.Append(@"");
????????????sb.Append(@"var?new_image?=?get_ImageItemLocation(image_list[image_index]);
????????????????????????document.all.span_1.innerText=image_index+1;
????????????????????????document.all.summary.innerText=note_list[image_index];
????????????????????????return(new_image);");
????????????sb.Append(System.Environment.NewLine+"}");???????
????????????sb.Append(@"
????????????????????????//?闆??劇??????
????????????????????????function?setTransition()
????????????????????????{
????????????????????????if?(document.all)
????????????????????????{
????????????????????????document.all('rImage').filters.revealTrans.Transition=Math.floor(Math.random()*23);
????????????????????????document.all('rImage').filters.revealTrans.apply();
????????????????????????}
????????????????????????}
????????????????????????function?playTransition()
????????????????????????{
????????????????????????if?(document.all)
????????????????????????document.all('rImage').filters.revealTrans.play();
????????????????????????}");
???????????
???????????
????????????strHtml=@"
????????????????????function?rotateImage()
????????????????????{
????????????????????????if?(interval?==?0)
????????????????????????{
????????????????????????????return?1;
????????????????????????}
????????????????????????if?(flagtime?==?1)
????????????????????????{
????????????????????????????var?now?=?new?Date();
????????????????????????????var?time1?=?now.getTime();
????????????????????????????var?time2;
????????????????????????????time1=time1+3000;
????????????????????????????time2=now.getTime();
????????????????????????????while(time2?<?time1)
????????????????????????????{
????????????????????????????????now?=?new?Date();
????????????????????????????????time2=now.getTime();
????????????????????????????}
????????????????????????????flagtime=0;
????????????????????????}
????????????????????????var?new_image?=?getNextImage();
????????????????????????setTransition();//?闆??劇??????
????????????????????????document['rImage'].src?=?new_image;
????????????????????????var?recur_call?=?""rotateImage('""+'rImage'+""')"";
?????????????????????????playTransition();//?闆??劇??????
????????????????????????setTimeout(recur_call,interval);
????????????????????}
????????????????????//?End?-->
????????????????????</script>
???????
????????????????????<script?type=""text/javascript""?src=""Resource/Script/ygcss.js""></script>
????????????????";
????????????sb.Append(strHtml);
????????????strHtml=@"</HEAD><body?topmargin=""0""?leftmargin=""0""><form?name=""frmDispImage"">";
???????????????????
????????????sb.Append(strHtml);
????????????????strHtml=@"
????????????????<center>
????????????????<center>
????????????????<table?bgcolor='#fff2df'??cellpadding='0'?cellspacing='0'?width='"
????????????????????+ScrWidth.ToString()+@"'>
????????????????<tbody><tr>
????????????????<td?align='center'?valign='top'><table??cellpadding='0'?cellspacing='0'?width='100%'>
????????????????<tbody><tr>
????????????????<td?height='1'></td>
????????????????</tr>
????????????????</tbody></table>
????????????????<table??cellpadding='0'?cellspacing='0'?height='"+
????????????????????PicHeight.ToString()+"'?width='"+PicWidth.ToString()+@"'?align='center'>
????????????????<tbody><tr>
????????????????<td?align='center'><img?name=""rImage""?src='"+
???????????????????
????????????????????ar1[0].ToString()+"'?width='"+PicWidth+"'?height='"+PicHeight+@"'??慰nl慰ad=""counternum();""??style='FILTER:?revealTrans(duration=3,transition=20)'></td>
????????????????????</tr>
????????????????????</tbody></table>
???????????????????
????????????????????<!--text-->
????????????????????<table??cellpadding='0'?cellspacing='0'?width='100%'>
????????????????????<tbody><tr>
????????????????????<td?id=""summary""?align='center'?height='"+
????????????????????TextHeight.ToString()+"'?style='font-size:"+FontSize.ToString()+"pt;'>"
???????????????????
????????????????????+strShopName+"-"+strBrandName+"-"+strResoourceCode+"-"+ar2[0].ToString()+@"</td>
????????????????????</tr>
????????????????????</tbody></table>
????????????????????<!--/text-->
????????????????????<!--bottom-->
????????????????????<table??cellpadding='0'?cellspacing='0'?width='100%'>
????????????????????<tbody><tr>
????????????????????<td><img?src='Resource/Image/TurnImage/slideshow_bg_3.gif'??height='4'?width='"+ScrWidth.ToString()+@"'></td>
????????????????????</tr>
????????????????????<tr>
????????????????????<td?bgcolor='#c9beeb'?height='"+ToolBarHeight.ToString()+@"'>
????????????????????<table??cellpadding='1'?cellspacing='0'?width='100%'>
????????????????????<tbody><tr>
????????????????????<td?class='sbody'?align='center'?height='"+len3.ToString()+"'><font?style='font-size:"+FontSize+"pt;'><span?id='span_1'>1</span>/"+len.ToString()+
????????????????????????????@"
????????????????????????????<img?src='Resource/Image/TurnImage/slideshows_bottom_1.gif'?alt='寮?濮?'?慰nclick=""run(document.frmDispImage.select1)""?align='absmiddle'??height='21'?width='35'> <img?src='Resource/Image/TurnImage/slideshows_bottom_2.gif'?alt='??姝??慰nclick=""stop();""?align='absmiddle'??height='21'?width='35'>
???????????????????????????? <img?src='Resource/Image/TurnImage/slideshows_bottom_3.gif'?alt='??涓?寮?'?慰nclick=""previous();""?align='absmiddle'??height='21'?width='35'> <img?src='Resource/Image/TurnImage/slideshows_bottom_4.gif'?alt='??涓?寮?'?慰nclick=""next();""?align='absmiddle'??height='21'?width='35'> ??搴??
????????????????????????????<select?name=""select1""?慰nchange=""run(this)"">
????????????????????????????<option?value=""12"">12?sec.</option>
????????????????????????????<option?selected=""selected""?value=""6"">6?sec.</option>
????????????????????????????<option?value=""3"">3?sec.</option>
????????????????????????????<option?value=""9"">9?sec.</option>
????????????????????????????</select></font></td>
????????????????????????????</tr>
????????????????????????????</tbody></table>
????????????????????????????</td>
????????????????????????????</tr>
????????????????????????????<tr>
????????????????????????????<td?bgcolor='#625a68'?height='1'></td>
????????????????????????????</tr>
????????????????????????????</tbody></table>
????????????????????????????</td>
????????????????????????????</tr>
????????????????????????????</tbody></table>
????????????????????????????<!--/--></center>
????????????????????????????<script?language=""javascript"">
????????????????????????????????flagtime=1;
????????????????????????????rotateImage();//淇??逛負?劇?????ㄦ????
????????????????????????????<!--slideit()-->
????????????????????????????????</script>
????????????????????????????</center>";
????????????????sb.Append(strHtml);
????????????sb.Append("</form></body></HTML>");
????????????return?sb.ToString();???
????????}
璋??ㄦ?煎?锛?
??????
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLiYWan5CdyFGdTt2YvxmQkVGZuFGc4V0LcNncvRXYjlGZul0ZulmbpxGd190LcdmbpRHanlGbodWaohXY05Wez9CX0Vmbu4GZzNmLzV2Zh1Wavw1LcpDc0RHaiojIsJye.gif)
////????????????????ArrayList?ar1=new?ArrayList();
////????????????????ar1.Clear();
////????????????????ar1.Add("http://downmoon-hgh/RichChartServer/Top30/frmForumDisplayImage.aspx?id=160720060328095407");
////????????????????ar1.Add("http://downmoon-hgh/RichChartServer/Top30/frmForumDisplayImage.aspx?id=160420060327085709");
////????????????????ar1.Add("http://downmoon-hgh/RichChartServer/Top30/frmForumDisplayImage.aspx?id=160420060327091030");
////????????????????ar1.Add("http://downmoon-hgh/RichChartServer/Top30/frmForumDisplayImage.aspx?id=160420060327092445");
////???????????
////????????????????drawPic(ar1);
???????????????? if ( this .ar1 == null ? || ?ar1.Count == 0 ??)
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLiYWan5CdyFGdTt2YvxmQkVGZuFGc4V0LcNncvRXYjlGZul0ZulmbpxGd190LcdmbpRHanlGbodWaohXY05Wez9CX0Vmbu4GZzNmLzV2Zh1Wavw1LcpDc0RHaiojIsJye.gif)
???????????????? ... {
???????????????????//?this.MsgBox("璇ュ腑浣?/璧?婧???澶?瑙??撅?");
???????????????????//?this.CloseWebForm();
????????????????????return?;
????????????????}
???????????????? else
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLiYWan5CdyFGdTt2YvxmQkVGZuFGc4V0LcNncvRXYjlGZul0ZulmbpxGd190LcdmbpRHanlGbodWaohXY05Wez9CX0Vmbu4GZzNmLzV2Zh1Wavw1LcpDc0RHaiojIsJye.gif)
???????????????? ... {
????????????????????drawPic(ar1);
????????????????}
private ? void ?drawPic(ArrayList?arrImages)
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLiYWan5CdyFGdTt2YvxmQkVGZuFGc4V0LcNncvRXYjlGZul0ZulmbpxGd190LcdmbpRHanlGbodWaohXY05Wez9CX0Vmbu4GZzNmLzV2Zh1Wavw1LcpDc0RHaiojIsJye.gif)
???????? ... {
????????????if(pic==null)
????????????...{
????????????????pic=new?clsTurnPicture();
????????????}
?????????????int?i;???
????????????ArrayList?ar2=new?ArrayList();
????????????ar2.Clear();
????????????for(int?k=0;k<arrImages.Count;k++)
????????????...{????i=k+1;
????????????????ar2.Add("灞?绀哄??+i.ToString());
????????????}
????????Response.Write(pic.getPicsForHtml(arrImages,ar2,CurrShopName,CurBrandName,strResourceCode,1024,768,1022,640,36,34,16));
???????????
???????????
????????}