⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 live_update.htm

📁 vc-mfc编程实例 很简单的东西,以后回多传自己的东西
💻 HTM
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Live Update</title>
<link href="css/main.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/comm.js" type="text/javascript"></script>
<script language="javascript">
// import js document
	_import("function");
	//_import("main_only");
	_import("language");
	_import("langSet");
	_import("webmenuevent");
	_import("control");
</script>
</head>

<body onKeydown="event.returnValue=disableBack();" id="body">
<table width="540" height="495" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top"><table width="509" height="412" border="0" cellpadding="0" cellspacing="0" style="margin-top:38px;">
      <tr>
        <td valign="top"><table width="509" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="509">
			<div id="lu_title" class="PageTitle">LiveUpdate</div>
			<!--<img src="img/LiveUpdate_01.jpg" width="91" height="17">--></td>
          </tr>
          <tr>
            <td style="padding-top:7px;"><img src="img/CreateAudioCD_02.jpg" width="507" height="1"></td>
          </tr>
          <tr>
            <td class="PageText" style="padding-top:15px;" id="lang_1">
			<div id="lu_str1">
			Welcome to Live Update<br>
              LiveUpdate Status
			  </div>
			  </td>
          </tr>
          <tr>
            <td align="center" style="padding-bottom:20px;"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="6" height="10"><img src="img/CreateAudioCD_03.jpg" width="9" height="10"></td>
                      <td height="10" background="img/CreateAudioCD_04.jpg"></td>
                      <td width="6" height="10"><img src="img/CreateAudioCD_05.jpg" width="10" height="10"></td>
                    </tr>
                    <tr>
                      <td width="6" background="img/CreateAudioCD_06.jpg"></td>
                      <td width="463" valign="top" style="padding:10px;"><div id="Liveinfo" style="height:130px;width:100%;overflow:auto;overflow-x:hidden;" class="PageText">
<div id="Liveinfo1" class="PageText"><p>The following componets are installed on your computer.
<br>
> LiveUpdate
<span id="showinit" style="display:none;">
Initalizing...<br>
Connecting to LiveUpdate Server<img src="images/v.gif" width="13" height="10"></span></p></div>
<p></p>
<p><img id="scl" src="images/v.gif" width="1" height="1"></p>
</div></td>
                      <td width="6" background="img/CreateAudioCD_07.jpg"></td>
                    </tr>
                    <tr>
                      <td width="6" height="8"><img src="img/CreateAudioCD_08.jpg" width="9" height="8"></td>
                      <td height="8" background="img/CreateAudioCD_09.jpg"></td>
                      <td width="6" height="8"><img src="img/CreateAudioCD_10.jpg" width="10" height="8"></td>
                    </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
          <tr>
<td valign="bottom" class="PageText">&nbsp;</td>
</tr><tr id="fileinfo" style="display:none;">
            <td valign="bottom" class="PageText"><div id="progressParent"></div>

<br>
<span id="lu_total">Total Files:</span><span id="Cou1"></span><br>
<span id="lu_pfile">Present File:</span> <span id="Cou2"></span><img src="images/v.gif" name="img1" align="absmiddle" id="img1"> &nbsp;&nbsp;&nbsp;&nbsp; <span id="lu_number">No.</span><span id="Cou3"></span><br></td>
          </tr>

          <tr>
            <td align="right" valign="bottom">
			<span id="Control1" style="display:none;"><button cstyle="rit" onClick="top.menuFocus(1);location='Main_Quick_Start_1.htm';" id="savenow">Return to VirtualDrive Pro Main</button></span>
			<span id="Control3"><button cstyle="rit" onClick="btn_start();" id="start">Get Start</button></span>
			<span id="Control2" style="display:none"><button cstyle="rit" onClick="btn_Cancel();" id="Cancel1">Cancel</button></span>
<script>
var the_timeout;
var fnum1,fnum2;
document.body.onload=function()
{
	applyButton();
	showui();
	
}
var Liveobj = new ActiveXObject("Update.LiveUpdate.1");
document.getElementById("img1").style.display="none";
function btn_start()
{
	//setTimeout("Update()",5000);
	$("showinit").style.display="";
	$("Control2").style.display="";
	$("Control3").style.display="none";
	body.style.cursor="wait";
	$("Cancel1").setValue(GS("button_cancel"));
	//Update();
	parent.maskLeftMenu();
	setTimeout("Update()",500);
}
function Update()
{
var proName="";
var Version=window.external.IsProVersion();
if(Version==0)
	proName="/VDrive";
else if (Version==1)
	proName="/VDProBS";
else
alert("Internal error! ");
var ifup=Liveobj.Init("/VDrive");

switch(ifup)
{
case 0:
document.getElementById("Liveinfo").innerHTML=GS("lu_noupdate");//"This version is the latest,You needn't to update!";
show1();
body.style.cursor="default";
document.getElementById("Liveinfo").style.color="#FF0000";
break;
case 1:
document.getElementById("Liveinfo1").innerHTML=GS("lu_downproc");//"Download remote file nowing...<br>";
Liveobj.DownLoadFiles();
var down_stu=Liveobj.GetFinishStatus();

//ChkStu();


if(down_stu==0)
{
//$("Liveinfo").value="Download remote file Success,Update local file nowing...";
//Liveobj.Update();
//var up_stu=Liveobj.GetFinishStatus();

$("Liveinfo").value=GS("lu_upsus");show1();clearTimeout(the_timeout);
document.getElementById("fileinfo").style.display="";
body.style.cursor="default";
}
else if(down_stu==1)
{
clearTimeout(the_timeout);
document.getElementById("Liveinfo").innerHTML=GS("lu_df");Liveobj.DownLoadFiles();
document.getElementById("Liveinfo").innerHTML=GS("lu_fail");
}
else if(down_stu==2)
{
GetStu();
}
break;



case 2:
document.getElementById("Liveinfo").innerHTML=GS("lu_fail");
break;

}
}

function GetStu()
{
var down_stu=Liveobj.GetFinishStatus();
var FileStu=Liveobj.GetStatus();
var Fcou=FileStu.split(",");
var Prefile=Fcou[2];
fnum1=Fcou[0];
fnum2=Fcou[1];

if(Prefile!=document.getElementById("Cou2").innerHTML)
{
document.getElementById("Liveinfo1").innerHTML+=(Fcou[2]+"<br>");
document.getElementById("img1").style.display="none";
setTimeout(timeoutSet(),100);
}
else
{
document.getElementById("img1").style.display="";
}
document.getElementById("fileinfo").style.display="";
document.getElementById("Cou1").innerHTML=Fcou[0];
document.getElementById("Cou2").innerHTML=Fcou[2];
document.getElementById("Cou3").innerHTML=Fcou[1];
the_timeout = setTimeout("GetStu();",500);
if(down_stu==0)
{
clearTimeout(the_timeout);
document.getElementById("Liveinfo").innerHTML=GS("lu_upsusgood");
show1();
document.getElementById("fileinfo").style.display="none";
body.style.cursor="default";

}

}
function ChkStu()
{
if(down_stu==2)
{
GetStu();
}
}
function show1()
{
document.getElementById("Control1").style.display="";
document.getElementById("Control2").style.display="none";
$("Control3").style.display="none";
$("savenow").setValue(GS("button_returnmain"));
	parent.demaskLeftMenu();
}
function btn_Cancel()
{
Liveobj.SetCancelFlag(true);
clearTimeout(the_timeout);
document.getElementById("Liveinfo").innerHTML=GS("lu_cansus");
document.getElementById("fileinfo").style.display="none";
body.style.cursor="";
show1();
}
function jump()
{
	location="Main_Quick_Start_1.htm";
}


var gProgress=0;
var ptest=new progressControl(400,"progressParent");
ptest.setProgress(0);


function timeoutSet()
{
	return function()
	{
		if (gProgress>100)
		{
			return;
		}
		gProgress=Math.floor((fnum2/fnum1)*100);
		ptest.setProgress(gProgress);
		setTimeout(timeoutSet(),100);
	}
}
function showui()
{
	$("lu_title").innerHTML=GS("lu_title");
	$("lu_str1").innerHTML=GS("lu_str1");
	$("Liveinfo1").innerHTML=GS("Liveinfo1");
	$("lu_total").innerHTML=GS("lu_total");
	$("lu_pfile").innerHTML=GS("lu_pfile");
	$("lu_number").innerHTML=GS("lu_number");
	$("start").setValue(GS("button_start"));
}
</script>


</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -