C#.NET WinFrom开发之嵌入Google浏览器 (CefSharp)
引入静态页面
CefWebBrowser = new ChromiumWebBrowser("http://" + Register.Host + ":" + Register.Port + "/Template/html/index.html");//浏览网址
效果图
全景绘制折线
var pointname = ""; $("#" + pano).unbind("mousedown").bind("mousedown", function (event) { var parameter = XyYyKrp.Line.getHV(); if (xmlData.Linename == "") { xmlData.Linename = krpano.get("xml.scene") + "_" + XyYyKrp.Line.Hotspot_Code(); krpano.call("do_add_polyline('" + xmlData.Linename + "','dbxzxhotspot','折线'," + parameter.at_h + "," + parameter.at_v + ");"); pointname = krpano.get("hotspot[" + xmlData.Linename + "].point[0].name");
$("#" + pano).unbind("mousemove").bind("mousemove", function (e) { parameter = XyYyKrp.Line.getHV(); krpano.call("do_removepoint('" + xmlData.Linename + "','" + pointname + "');"); krpano.call("do_add_polylinepoint('" + xmlData.Linename + "'," + parameter.at_h + "," + parameter.at_v + ");"); e.stopPropagation(); });
} else { krpano.call("do_add_polylinepoint('" + xmlData.Linename + "'," + parameter.at_h + "," + parameter.at_v + ");"); var tem = krpano.get("hotspot[" + xmlData.Linename + "].point.count"); pointname = krpano.get("hotspot[" + xmlData.Linename + "].point[" + (tem-1) + "].name"); }
event.stopPropagation(); });
set(schp_name,%1); addhotspot(get(schp_name)); hotspot[get(schp_name)].loadstyle(%2); set(hotspot[get(schp_name)].hotspottitle,%3); set(hotspot[get(schp_name)].alpha,"0.5"); set(hotspot[get(schp_name)].autoalpha,"false"); set(hotspot[get(schp_name)].visible,"true"); set(hotspot[get(schp_name)].hotspotstype,'polyline'); set(hotspot[get(schp_name)].fillalphahover,"0.1"); set(hotspot[get(schp_name)].borderwidth,"5"); set(hotspot[get(schp_name)].borderwidthhover,"4.0"); set(hotspot[get(schp_name)].bordercolor,"0x008000"); set(hotspot[get(schp_name)].bdcolor,"0x008000"); set(hotspot[get(schp_name)].bordercolorhover,"0x223322"); set(hotspot[get(schp_name)].borderalpha,"0.5"); set(hotspot[get(schp_name)].polyline,"true"); set(hotspot[get(schp_name)].borderalphahover,"0.8"); set(hotspot[get(schp_name)].point[0].ath,%4); set(hotspot[get(schp_name)].point[0].atv,%5); set(hotspot[get(schp_name)].onclick,"do_onclick_polyline();"); set(hotspot[get(schp_name)].remark,""); hotspot[get(schp_name).updatepos();
set(index,get(hotspot[%1].point.count)); set(hotspot[%1].point[get(index)].ath,%2); set(hotspot[%1].point[get(index)].atv,%3); hotspot[%1].updatepos();
if(%1!='' AND hotspot[%1].point !=null, set(count,calc(hotspot[%1].point.count-1));
if(hotspot[%1].point[get(count)].name !=%2, hotspot[%1].point.removearrayitem(get(count)); );
hotspot[%1].updatepos(); );
jsget(modify,"xmlData.modify"); if(modify=='normal', for(set(i,0), i LT hotspot.count, inc(i), if(hotspot[get(i)].visible==true AND hotspot[get(i)].hotspotstype=='polyline', set(hotspot[get(i)].bordercolor,get(hotspot[get(i)].bdcolor)); ); ); js(XyYyKrp.Line.Xml_clickselected(get(name))); set(hotspot[get(name)].bordercolor,"0x9370DB"); );
bgalpha="0.9" bgborder="get:skin_settings.design_bgborder" bgroundedge="get:skin_settings.design_bgroundedge" bgshadow="get:skin_settings.design_bgshadow" bgcapture="true" x="0" y="0" ondown="draglayer();" css="background: #fff;" visible="false"> onhover="tween(alpha,1.0);" onout="tween(alpha,0.75);" onclick="do_cancel('polyline_container','XyYyKrp.Line.Xml_Cancel','false');" />
do_polyline_apply('true');
copy(cl,layer[edit_polyline_linclview].value); colorpick_initial('edit_polyline_linclview',10,10,'edit_polyline_linclview',get(cl));
if(%1!='' AND hotspot[%1] !=null,
set(layer[polyline_container].visible,"true"); set(layer[polyline_container].keep,"true");
set(layer[polyline_container].value,%1); copy(hst,hotspot[%1]); set(layer[edit_polyline_name_val].value,get(hst.hotspottitle)); jscall(calc('document.getElementById("polyline_name").value="'+hst.hotspottitle+'"'));
jscall(calc('document.getElementById("polylinelwidth").value="'+hst.borderwidth+'"'));
set(layer[edit_polyline_linclview].bgcolor,get(hst.bdcolor)); set(color,get(hst.bdcolor)); tohex(color,'0x',6); set(layer[edit_polyline_linclview].value, get(color));
jscall(calc('document.getElementById("polylinelcy").value="'+hst.borderalpha+'"')); set(layer[edit_polyline_remark_val].value,get(hst.remark)); jscall(calc('document.getElementById("polyline_remark").value="'+hst.remark+'"')); );
copy(ply,layer[polyline_container].value); if(get(ply)!=null AND get(ply)!='', copy(hst,hotspot[get(ply)]);
jsget(plname,"document.getElementById('polyline_name').value"); set(hst.hotspottitle,get(plname));
jsget(vl,"document.getElementById('polylinelwidth').value"); set(hst.borderwidth,get(vl)); set(hst.bdcolor, get(layer[edit_polyline_linclview].value)); set(hst.bordercolor, get(layer[edit_polyline_linclview].value));
jsget(dst,"document.getElementById('polylinelcy').value"); set(hst.borderalpha,get(dst)); set(hst.remark,get(layer[edit_polyline_remark_val].value)); );
if(%1=='true', set(hst.bordercolor,get(hst.bdcolor)); set(layer[polyline_container].visible,"false"); js(XyYyKrp.Line.Xml_PolylineSave(get(ply))); );
if(%1!='' AND hotspot[%1] !=null, removehotspot(%1); );
来源:https://www.cnblogs.com/hucoke/p/11322450.html 免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |