//========================================================================
// 用户操作用计算机硬件设备信息对象
// 对象名：persionComputer
// 属性：
//         IPAddress     -- IP地址
//         MACID         -- 网卡号
//         PCName        -- 计算机名称
//         CPUID         -- CPU号
//         ProtocolName  -- 安装协议名称
//         LogDrvName    -- 磁盘信息
// 方法：
//         GetPersionComputer() -- 取得计算机信息
//========================================================================
function persionComputer(pathbefore){
	this.IPAddress = "";
	this.MACID = "";
	this.PCName = "";
	this.CPUID = "";
	this.ProtocolName = "";
	this.LogDrvName = "";
	this.HaveInfo = "0";
	this.ErrMsg = "";
	// 打开指定取信息页面
	if(pathbefore == null){
		pathbefore = '';
	}
	var CDMCS2005 = RMagOcxEnv.CreateEnvObj(0);
	if(!CDMCS2005 || !CDMCS2005.HasInfo)
	{
		this.ErrMsg = '错误信息：控件未正确注册!';
	}// 取得计算机信息
	else if (CDMCS2005.HasInfo)
	{
	   this.HaveInfo = "1";
	   this.IPAddress = CDMCS2005.IPs;
	   if(this.IPAddress == null){
		  this.IPAddress = "";
	   }
	   this.MACID = CDMCS2005.MacAddrs;
	   if(this.MACID == null){
		  this.MACID = "";
	   }
	   this.PCName = CDMCS2005.HostNames;
	   if(this.PCName == null){
		  this.PCName = "";
	   }
	   this.CPUID = CDMCS2005.CpuIDs;
	   if(this.CPUID == null){
		  this.CPUID = "";
	   }
	   this.ProtocolName = CDMCS2005.NetWorkInfo;
	   if(this.ProtocolName == null){
		  this.ProtocolName = "";
	   }
	   this.LogDrvName = CDMCS2005.LogicDriverInfo;
	   if(this.LogDrvName == null){
		  this.LogDrvName = "";
	   }
	}else{
	   this.ErrMsg = '错误信息：' + CDMCS2005.ErMsg;
	}
/*	var path = pathbefore + '/appscript/object/OO_Computer.html';
	var returninfo = window.showModalDialog(path, "", "dialogLeft:1px;dialogTop:1px;dialogHeight:0px;dialogWidth:0px;status:no");
	// 分解数据
	var ssArry = returninfo.split('|^|');
	if(ssArry[0] == '1'){
		// 取得数据
		this.IPAddress = ssArry[1];
		this.MACID = ssArry[2];
		this.PCName = ssArry[3];
		this.CPUID = ssArry[4];
		this.ProtocolName = ssArry[5];
		this.LogDrvName = ssArry[6];
		this.HaveInfo = "1";
		this.ErrMsg = "";
	}else{
		this.ErrMsg = ssArry[1];
		this.HaveInfo = "0";
	}*/
}

persionComputer.prototype.getComputerInfo = getComputerInfo;

function getComputerInfo(){
	return "";
}
