home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 November
/
PCWorld_2007-11_cd.bin
/
temacd
/
imtoodownyoutube
/
download-youtube-video.exe
/
script
/
settings.js
< prev
next >
Wrap
Text File
|
2007-07-25
|
3KB
|
138 lines
var flvtemppath = new JSPathDialog();
flvtemppath.SetDirBkColor(241,237,241);
var tmppath="c:\\";
function gettmppath()
{
tmppath=pathdlg.ShowDirDialog(GetTempFolder());
if(tmppath!="")
settings.tmpfilepath.SetText(tmppath);
}
function onOpenTempFolder()
{
helper.Helper_OpenFolder(GetTempFolder());
/*
if (helper.Helper_MsgErr(LanguageStr("_cleartemp_text"), "Xilisoft",4)==7) // ???
return 1;
var tmp=g_Config.GetValue("general", "flvtemppath");
helper.Helper_RemoveDir(tmp);
*/
}
function settingsok()
{
var minwindow = settings.minwindows.GetCheck();
var maxtask = settings.setting_spin.GetValue();
if (maxtask<=0 || maxtask>10)
{
settings.ShowMessageBox(LanguageStr("_invalid_maxtask_number"), LanguageStr("_setting_error"), 1);
}
var autodelete = settings.autodelfinishedtask.GetCheck();
if(minwindow==true)
{
minwindow=1;
}
else
{
minwindow=0;
}
if(autodelete==true)
{
autodelete=1;
}
else
{
autodelete=0;
}
cfgSetInt("general", "minstartup", minwindow);
cfgSetInt("general", "autodelete", autodelete);
cfgSetInt("general", "maxtask", maxtask);
TaskManager.MaxtTask = maxtask;
settings.Close();
var showdrop1 = settings.showdrop.GetCheck();
if(showdrop1==true)
cfgSetInt("general", "showdrop", 1);
else
cfgSetInt("general", "showdrop", 0);
if(IsWindowVisible(popwin))
{
cfgSetInt("general","cx",popwin.GetWindowLeft());
cfgSetInt("general","cy",popwin.GetWindowTop());
}else if(IsWindowVisible(popupnotask))
{
cfgSetInt("general","cx",popupnotask.GetWindowLeft());
cfgSetInt("general","cy",popupnotask.GetWindowTop());
}
if(showdrop1&&(IsWindowVisible(popwin)||IsWindowVisible(popupnotask)))
return ;
else
fudong_control();
// getisminwindow();
}
function settingscancel()
{
settings.Close();
}
function showsettings()
{
settings.ShowMessageBox = ShowMessageBox;
with (settings)
{
if (cfgGetInt("general", "minstartup", 0)!=0)
{
minwindows.SetCheck(true);
}else
{
minwindows.SetCheck(false);
}
if (cfgGetInt("general", "autodelete", 0)!=0)
{
autodelfinishedtask.SetCheck(true);
}else
{
autodelfinishedtask.SetCheck(false);
}
if (cfgGetInt("general", "showdrop", 0)==1)
{
showdrop.SetCheck(true);
}else
{
showdrop.SetCheck(false);
}
setting_spin.SetValue(TaskManager.MaxtTask);
ShowModal();
SetForegroundWindow(MainWindow);
}
}
//