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

📄 create_virtual_cd_step_2.htm

📁 vc-mfc编程实例 很简单的东西,以后回多传自己的东西
💻 HTM
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Create Audio CD</title>

<link href="css/main.css" rel="stylesheet" type="text/css">
</head>
<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>
<script language="javascript" type="text/javascript">
//菘始
var driveSize = top.cvcd.driveSize;
var driveNumber = top.cvcd.driveNumber;
//萁
var chars = new Array("A:","B:","C:","D:","E:","F:","G:","H:","I:","J:","K:","L:","M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","X:","Y:","Z:")					//谭

function Init(){
	applyButton();
	showui();
	cdSize.innerHTML = getSpace(driveSize);
	
	defaultPath = top.cvcd.objectX.GetDefaultSavePath(parseInt(driveNumber));
	savePath.value = defaultPath;
	
	setValue(defaultPath);
	
	previous.style.visibility = 'visible';
	next.style.visibility = 'visible';
	cancel.style.visibility = 'visible';
	
	if (top.cvcd.savePath != ""){
		savePath.value = top.cvcd.savePath
	}
	
}

function setValue(pathStr){
	driveLetter = pathStr.substr(0,2);				//取硬谭
	for (i = 0; i<26; i++){
		if (driveLetter.toUpperCase() == chars[i]){
			hardDriveNumber = i;
			break;
		}
	}
	if (driveLetter == "\\\\"){
		txt_Letter.innerHTML = pathStr.substr(0,pathStr.lastIndexOf("\\")+1);
		txt_Volume.innerHTML = '';
		txt_TotalSpace.innerHTML = '';
		txt_UsedSpace.innerHTML = '';
		txt_FreeSpace.innerHTML = '';
	}else{
		txt_Letter.innerHTML = driveLetter;
		volumeInfo = top.cvcd.objectX.GetVolumeInfo(parseInt(hardDriveNumber)).split(",")
		txt_Volume.innerHTML = volumeInfo[1];
		spaceInfo = top.cvcd.objectX.GetDriveSpace(hardDriveNumber).split(",");
		txt_TotalSpace.innerHTML = getSpace(spaceInfo[0]);
		txt_UsedSpace.innerHTML = getSpace(spaceInfo[1]);
		txt_FreeSpace.innerHTML = getSpace(spaceInfo[2]);
		if (parseInt(driveSize) > top.cvcd.objectX.GetDriveSpace(driveNumber)){				//剩占小诠炭占执
			$("next").dsiabled=true;
			errMsg.innerHTML = GS("CVCD_Step2_ErrMsg");
		}else{
			$("next").dsiabled=false;
			errMsg.innerHTML = '';
		}
	}
}

function btn_select(){
	 var result = GetFilepath("Image File(*.vcd)|*.vcd||",false);
	 if (result){
	 	//if (result.substr(result.length-4,4).toLowerCase() == ".vcd"){
		//	$("savePath").value=result;
		//}else{
			$("savePath").value=result + ".vcd";
		//}
	 }
	 setValue(savePath.value);
}

function getSpace(nSpace){
	if (nSpace<1024){
		return nSpace + "B";
	}else if (nSpace<1024*1024){
		return Math.round(nSpace/1024) + "KB";
	}else if (nSpace<1024*1024*1024){
		return Math.round(nSpace/1024/1024) + "MB";
	}else if (nSpace<1024*1024*1024*1024){
		return Math.round(nSpace/1024/1024/1024) + "GB";
	}
}

function showui(){
	$("CVCD_Title").innerHTML = GS("CVCD_Title");
	$("CVCD_Step2_Title").innerHTML = GS("CVCD_Step2_Title");
	$("CVCD_Step2_Label_1").innerHTML = GS("CVCD_Step2_Label_1");
	$("CVCD_Step2_Label_2").innerHTML = GS("CVCD_Step2_Label_2");
	$("CVCD_Step2_Label_3").innerHTML = GS("CVCD_Step2_Label_3");
	$("CVCD_Step2_Label_4").innerHTML = GS("CVCD_Step2_Label_4");
	$("CVCD_Step2_Label_5").innerHTML = GS("CVCD_Step2_Label_5");
	$("CVCD_Step2_Label_6").innerHTML = GS("CVCD_Step2_Label_6");
	$("previous").setValue(GS("Button_Previous"));
	$("next").setValue(GS("Button_Next"));
	$("cancel").setValue(GS("Button_Cancel"));
	$("selectPath").setValue(GS("Button_Browse"));
}
</script>

<body onLoad="Init();">
<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><span class="PageTitle" id="CVCD_Title"></span></td>
          </tr>
          <tr>
            <td style="padding-top:7px;"><img src="img/CreateAudioCD_02.jpg" width="507" height="1"></td>
          </tr>
          <tr>
            <td height="350" valign="top"><table width="509" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="PageStep" style="padding-top:10px;" id="CVCD_Step2_Title"></td>
          </tr>
          <tr>
            <td style="padding-top:20px;"><table border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><input name="savePath" id="savePath" onChange="setValue(this.value);" type="text" size="70" onKeyDown="if(event.keyCode==13)nextPage();"></td>
                <td style="padding-left:5px;"><button cstyle="rit" onClick="btn_select();" id="selectPath">...</button></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td valign="top" style="padding-top:20px;"><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="6" height="6"><img src="img/CreateAudioCD_11.jpg" width="6" height="6" /></td>
                  <td height="6" background="img/CreateAudioCD_12.jpg"></td>
                  <td width="6" height="6"><img src="img/CreateAudioCD_13.jpg" width="6" height="6" /></td>
                </tr>
                <tr>
                  <td width="6" background="img/CreateAudioCD_14.jpg"></td>
                  <td><table width="300" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="109" height="18" class="PageText" style="padding-right:20px;"><div align="right" id="CVCD_Step2_Label_1"></div></td>
                      <td width="191" height="18" class="PageText" id="txt_Letter"></td>
                    </tr>
                    <tr>
                      <td width="109" height="18" class="PageText" style="padding-right:20px;"><div align="right" id="CVCD_Step2_Label_2"></div></td>
                      <td width="191" height="18" class="PageText" id="txt_Volume"></td>
                    </tr>
                    <tr>
                      <td width="109" height="18" class="PageText" style="padding-right:20px;"><div align="right" id="CVCD_Step2_Label_3"></div></td>
                      <td width="191" height="18" class="PageText" id="txt_TotalSpace"></td>
                    </tr>
                    <tr>
                      <td width="109" height="18" class="PageText" style="padding-right:20px;"><div align="right" id="CVCD_Step2_Label_4"></div></td>
                      <td width="191" height="18" class="PageText" id="txt_UsedSpace"></td>
                    </tr>
                    <tr>
                      <td width="109" height="18" class="PageText" style="padding-right:20px;"><div align="right" id="CVCD_Step2_Label_5"></div></td>
                      <td width="191" height="18" class="PageText" id="txt_FreeSpace"></td>
                    </tr>
                    <tr>
                      <td width="109" height="18" class="PageText" style="padding-right:20px;"><div align="right" id="CVCD_Step2_Label_6"></div></td>
                      <td width="191" height="18" class="PageText" id="cdSize"></td>
                    </tr>
                  </table></td>
                  <td width="6" background="img/CreateAudioCD_15.jpg"></td>
                </tr>
                <tr>
                  <td width="6" height="6"><img src="img/CreateAudioCD_16.jpg" width="6" height="6" /></td>
                  <td height="6" background="img/CreateAudioCD_17.jpg"></td>
                  <td width="6" height="6"><img src="img/CreateAudioCD_18.jpg" width="6" height="6" /></td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td height="20" valign="bottom" class="PageText" id="errMsg"></td>
          </tr>
            </table></td>
          </tr>
          <tr>
            <td align="right" valign="bottom"><button cstyle="rit" onClick="history.back();" id="previous" style="visibility:hidden;">Previous</button>&nbsp;&nbsp;&nbsp;<button cstyle="rit" onClick="nextPage();" id="next" style="visibility:hidden;">Next</button>&nbsp;&nbsp;&nbsp;<button cstyle="rit" onClick="location='Select_A_CD_DVD.htm';" id="cancel" style="visibility:hidden;">Cancel</button></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<script language="javascript" type="text/javascript">
function nextPage(){
	if (top.cvcd.objectX.GetVolumeInfo(driveNumber).split(",")[0] != top.cvcd.Serial){
		RIT_popMsg('',264,180,'Alert',GS("CVHD_diskError") + top.cvcd.Serial,'alert');
		return false;
	}
	if (top.cvcd.objectX.IsValidFilePath(savePath.value)){
		if (savePath.value.substr(0,2) == "\\\\"){
			var isNext = RIT_popMsg('',264,180,'Alert',GS("CVCD_Step2_Alert_2"),'confirm');
			if (isNext == "no") return false;
		}else{
			for (i = 0; i<26; i++){
				if (driveLetter.toUpperCase() == chars[i]){
					hardDriveNumber = i;
					break;
				}
			}
			if (parseInt(driveSize) > parseInt(top.cvcd.objectX.GetDriveSpace(hardDriveNumber).split(",")[2])){
				//alert(parseInt(driveSize) + "|" + parseInt(top.cvcd.objectX.GetDriveSpace(hardDriveNumber).split(",")[2]))
				RIT_popMsg('',264,180,'Alert',GS("CVCD_Step2_Alert_1"),'alert');
				return false;
			}
		}
		top.cvcd.savePath = savePath.value;
		if (top.cvcd.diskType == 1){
			location = 'Create_Audio_CD.htm';
		}else{
			location = 'Create_Virtual_CD_step_3.htm';
		}
	}else{
		//alert(top.cvcd.objectX.GetLastErrorCode());
		if (top.cvcd.objectX.GetLastErrorCode() == 50397215){
			var isNext = RIT_popMsg('',400,200,'Alert',GS(top.cvcd.objectX.GetLastErrorCode() + ""),'confirm');
			if (isNext == "no"){
				return false;
			}else if (isNext == "yes"){
				for (i = 0; i<26; i++){
					if (driveLetter.toUpperCase() == chars[i]){
						hardDriveNumber = i;
						break;
					}
				}
				if (parseInt(driveSize) > parseInt(top.cvcd.objectX.GetDriveSpace(hardDriveNumber).split(",")[2])){
					//alert(parseInt(driveSize) + "|" + parseInt(top.cvcd.objectX.GetDriveSpace(hardDriveNumber).split(",")[2]))
					RIT_popMsg('',264,180,'Alert',GS("CVCD_Step2_Alert_1"),'alert');
					return false;
				}
				top.cvcd.savePath = savePath.value;
				if (top.cvcd.diskType == 1){
					location = 'Create_Audio_CD.htm';
				}else{
					location = 'Create_Virtual_CD_step_3.htm';
				}
			}
		}else{
			if (GS(top.cvcd.objectX.GetLastErrorCode() + "") == null){
				RIT_popMsg('',264,180,'Alert',GS("unkownerror") + top.cvcd.objectX.GetLastErrorCode(),'alert');
			}else{
				RIT_popMsg('',264,180,'Alert',GS(top.cvcd.objectX.GetLastErrorCode() + ""),'alert');
			}
		}
	}
}
</script>

⌨️ 快捷键说明

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