Главный модуль программы (часть 18) - LoadSettings
последняя версия: 3.0.9 build 961 beta
от 07 декабря 2007 г.
от 07 декабря 2007 г.
procedure TForm1.LoadSettings(const AFileName: string);
var
xIni: TIniFile;
i: integer;
begin
xIni:= TIniFile.Create(AFileName);
try
iCurrentMode:= xIni.ReadInteger('General', 'Mode', 0);
//***
if iCurrentMode < 0 then iCurrentMode:= 0;
//****
iFlashAvailable:= xIni.ReadInteger('General', 'Mode2', 0);
ShowModule_KJava:= xIni.ReadInteger('P2K_Mode', 'ShowModule_KJava', 0);
ShowModule_FlexTools:= xIni.ReadInteger('P2K_Mode', 'ShowModule_FlexTools', 0);
ShowModule_Patching:= xIni.ReadInteger('Flash_Mode', 'ShowModule_Patching', 0);
ClassicSysMenu:= xIni.ReadInteger('General', 'ClassicSysMenu', 0);
ShowWindowContent:= xIni.ReadInteger('General', 'ShowWindowContent', 1);
SKin:= xIni.ReadString('General', 'Skin', 'Office2007.skn');
ThemeAdapt:= boolean(xIni.ReadInteger('General', 'ThemeAdapt', 0));
SwitchModeTimeOut:= xIni.ReadInteger('General', 'SwitchModeTimeOut', 4000);
EnableDebug:= xIni.ReadInteger('General', 'EnableDebug', 1);
xLang:= xIni.ReadString('General', 'Lang', 'russian.lng');
AutoPlatform:= boolean(xIni.ReadInteger('General', 'AutoPlatform', 0));
MinToTray:= boolean(xIni.ReadInteger('General', 'MinToTray', 0));
RollUp:= boolean(xIni.ReadInteger('General', 'RollUp', 0));
curToolBar:= xIni.ReadInteger('General', 'MultiLine', 0);
curTypeMenu:= xIni.ReadInteger('General', 'LeftPanelButtons', 0);
bOBEXAutoUpdateFileList:= xIni.ReadInteger('OBEX_Mode', 'OBEXAutoUpdateFileList', 0);
iReadDisks:= xIni.ReadInteger('P2K_Mode', 'ReadDisks', 0);
iCloseP2K:= xIni.ReadInteger('P2K_Mode', 'CloseP2K', 0);
iDynamicRefreshFolder:= xIni.ReadInteger('P2K_Mode', 'DynamicRefreshFolder', 0);
//iP2KCF:= xIni.ReadInteger('P2K_Mode', 'P2KCF', 0);
IFNUM:= xIni.ReadInteger('P2K_Mode', 'IFNUM', 0);
xP2KTimeOut:= xIni.ReadInteger('P2K_Mode', 'P2KTimeOut', 10000);
AmrByRing:= boolean(xIni.ReadInteger('P2K_Mode', 'AmrByRing', 0));
WavByRing:= boolean(xIni.ReadInteger('P2K_Mode', 'WavByRing', 0));
UseMelodyFromCard:= boolean(xIni.ReadInteger('P2K_Mode', 'UseMelodyFromCard', 0));
MMA_ReadJava_A:= boolean(xIni.ReadInteger('P2K_Mode', 'MMA_ReadJava_A', 0));
MMA_ReadJava_B:= boolean(xIni.ReadInteger('P2K_Mode', 'MMA_ReadJava_B', 0));
OtherFeaturesFile:= xIni.ReadString('P2K_Mode', 'OtherFeaturesFile', 'other_features.pof');
//OtherFeaturesFile2:= xIni.ReadString('P2K_Mode', 'OtherFeaturesFile2', 'other_features.pof');
iPhoneBookType:= xIni.ReadInteger('AT_Mode', 'PhoneBookType', 0);
UseFirstNRecords:= xIni.ReadInteger('AT_Mode', 'UseFirstNRecords', 0);
ATTimeOut:= xIni.ReadInteger('AT_Mode', 'TimeOut', 10000);
BaudRate:= xIni.ReadInteger('AT_Mode', 'BaudRate', 57600);
iREAD_PHONEBOOK_BLOCK:= xIni.ReadInteger('AT_Mode', 'READ_PHONEBOOK_BLOCK', 30);
DeleteBeforeRestore:= boolean(xIni.ReadInteger('AT_Mode', 'DeleteBeforeRestore', 1));
OBEXTimeOut:= xIni.ReadInteger('OBEX_Mode', 'TimeOut', 1500);
iOBEXType:= xIni.ReadInteger('OBEX_Mode', 'OBEXType', 0);
OBEXShowProgress:= xIni.ReadInteger('OBEX_Mode', 'ShowProgress', 1);
sCurrentProfile:= xIni.ReadString('Flash_Mode', 'CurrentProfile', '');
xFlashTimeOut:= xIni.ReadInteger('Flash_Mode', 'FlashTimeOut', 6000);
// доступные платформы
xIni.ReadSection('Platforms', xPL);
xIni.ReadSection('PlatformsKJava', xKJ);
for i:= 0 to xPL.Count-1 do
begin
xPL[i]:= xPL[i] + '=' + xIni.ReadString('Platforms', xPL[i], '');
end;
for i:= 0 to xKJ.Count-1 do
begin
xKJ[i]:= xKJ[i] + '=' + xIni.ReadString('PlatformsKJava', xKJ[i], '');
end;
finally
xIni.Free;
end;
end;
Еще записи по теме
- Модуль "P2KApi" (часть 31) - TP2KAPI.File_Seek
- Модуль "P2KApi" (часть 26) - TP2KAPI.GetVolumeSize
- Модуль "Настройки" (часть 8) - InspectorBar1Sections0Items3Click
- Модуль "P2KFileManager" (часть 15) - ViewFileAttrs
- Модуль "ObexFM" (часть 21) - dropfromphone
- Модуль "Пункты меню" (часть 68) - btnP2K_MMA_DeleteMenuClick
- Модуль "Календарь" (часть 6) - GetDateBookEntries
