
function timer0OnTimer()
{
  LockRefresh;

  txtcpu.caption = "CPU:" + cpuUsage +"%";
  txtram.caption = "ÄÚ´æ:" + ramPhysPercent +"%";
  
  getNetSpeed;
  txtdown.caption = "ÏÂÔØ:" + (netDownSpeed/1024).toFixed(1)  +"k/s";
  txtup.caption = "ÉÏ´«:" + (netUpSpeed/1024).toFixed(1)  +"k/s";
  
  UnLockRefresh;
}



function widgetOnInit()
{
  netAdaptIndex = GetSetting( "net" );
  bg.Src = "bg_" + GetSetting("bg") + ".png" ;
  
  txtcpu.fontColor = GetSetting("txtcl");
  txtram.fontColor = GetSetting("txtcl");
  txtdown.fontColor = GetSetting("txtcl");
  txtup.fontColor = GetSetting("txtcl");
  
  txtcpu.frameColor = GetSetting("txtsdcl");
  txtram.frameColor = GetSetting("txtsdcl");
  txtdown.frameColor = GetSetting("txtsdcl");
  txtup.frameColor = GetSetting("txtsdcl");
  
}

function OnAllSettingsSaved()
{
  widgetOnInit(); 
}