Модуль "Настройки" (часть 3) - AdvGlowButton1Click

Рубрика: Исходники
Среда, 21 апреля 2010 г.
Просмотров: 139
последняя версия: 3.0.9 build 961 beta
от 07 декабря 2007 г.
procedure TfrmOptions.AdvGlowButton1Click(Sender: TObject);
var
  xIni: TIniFile;
begin
  iCurrentMode:= frmOptions_General.aosMode.ItemIndex;
  Skin:= frmOptions_General.aosSkin.Text;
  ThemeAdapt:= frmOptions_General.cbUseSkin.Checked;

  //Form1.ApplySkin(Skin);
  SwitchModeTimeOut:= round(frmOptions_General.AdvSpinEdit2.Value);
  bOBEXAutoUpdateFileList:= integer(frmOptions_OBEX.RzCheckBox1.Checked);
  iReadDisks:= frmOptions_P2K.RzRadioGroup1.ItemIndex;
  iCloseP2K:= integer(frmOptions_P2K.RzCheckBox1.Checked);
  AutoPlatform:= frmOptions_General.RzCheckBox1.Checked;
  MinToTray:= frmOptions_General.cbMinToTray.Checked;
  RollUp:= frmOptions_General.cbRollUp.Checked;
  curToolBar:= integer(frmOptions_General.cbMultiLine.Checked);
  curTypeMenu:= frmOptions_General.rgPanelButtonType.ItemIndex;
  iDynamicRefreshFolder:= integer(frmOptions_P2K.RzCheckBox2.Checked);
  //iP2KCF:= integer(frmOptions_P2K.rgP2KCF.ItemIndex);
  IFNUM:= round(frmOptions_P2K.AdvSpinEdit2.Value);
  UseMelodyFromCard:= frmOptions_P2K.cbUseMelodyFromCard.Checked;
  MMA_ReadJava_A:= frmOptions_P2K.cgMMAReadKJava.ItemChecked[0];
  MMA_ReadJava_B:= frmOptions_P2K.cgMMAReadKJava.ItemChecked[1];
  WavByRing:= frmOptions_P2K.cbUseWavAsRing.Checked;
  AmrByRing:= frmOptions_P2K.cbUseAmrAsRing.Checked;
  //OtherFeaturesFile:= frmOptions_P2K.spSkinEdit1.Text;
  OtherFeaturesFile:= frmOptions_P2K.aosOtherFeatureFiles.Text;
  iPhoneBookType:= frmOptions_AT.aosMode.ItemIndex;
  UseFirstNRecords:= round(frmOptions_AT.AdvSpinEdit1.Value);
  ATTimeOut:= round(frmOptions_AT.AdvSpinEdit2.Value);
  iREAD_PHONEBOOK_BLOCK:= round(frmOptions_AT.AdvSpinEdit3.Value);
  BaudRate:= StrToInt(frmOptions_AT.spSkinComboBox1.Text);
  OBEXTimeOut:= round(frmOptions_OBEX.AdvSpinEdit2.Value);
  iOBEXType:= round(frmOptions_OBEX.AdvSpinEdit1.Value) - 1;
  OBEXShowProgress:= byte(frmOptions_OBEX.RzCheckBox2.Checked);
  xLang:= frmOptions_General.AdvOfficeSelector1.Text;
  //if iPhoneBookType = frmOptions_AT.aosMode.ItemIndex then
  frmAT_PhoneBook.CreateListView(iPhoneBookType);  
  //***** запись в ини
  xIni:= TIniFile.Create(ExePath+'config.ini');
  try
    xIni.WriteInteger('General', 'Mode', iCurrentMode);
    xIni.WriteInteger('General', 'ThemeAdapt', integer(ThemeAdapt));
    xIni.WriteString('General', 'Lang', xLang);
    xIni.WriteInteger('General', 'SwitchModeTimeOut', SwitchModeTimeOut);
    xIni.WriteString('General', 'Skin', Skin);
    xIni.WriteInteger('OBEX_Mode', 'OBEXAutoUpdateFileList', bOBEXAutoUpdateFileList);
    xIni.WriteInteger('P2K_Mode', 'ReadDisks', iReadDisks);
    xIni.WriteInteger('P2K_Mode', 'CloseP2K', iCloseP2K);
    xIni.WriteInteger('General', 'AutoPlatform', integer(AutoPlatform));
    xIni.WriteInteger('General', 'MinToTray', integer(MinToTray));
    xIni.WriteInteger('General', 'RollUp', integer(RollUp));
    xIni.WriteInteger('General', 'Multiline', curToolBar);
    xIni.WriteInteger('General', 'LeftPanelButtons', curTypeMenu);
    //xIni.WriteInteger('P2K_Mode', 'P2KCF', iP2KCF);
    xIni.WriteInteger('P2K_Mode', 'IFNUM', IFNUM);
    xIni.WriteInteger('P2K_Mode', 'DynamicRefreshFolder', iDynamicRefreshFolder);
    xIni.WriteInteger('P2K_Mode', 'UseMelodyFromCard', integer(UseMelodyFromCard));
    xIni.WriteInteger('P2K_Mode', 'MMA_ReadJava_A', integer(MMA_ReadJava_A));
    xIni.WriteInteger('P2K_Mode', 'MMA_ReadJava_B', integer(MMA_ReadJava_B));
    xIni.WriteInteger('P2K_Mode', 'AmrByRing', integer(AmrByRing));
    xIni.WriteInteger('P2K_Mode', 'WavByRing', integer(WavByRing));
    xIni.WriteString('P2K_Mode', 'OtherFeaturesFile', OtherFeaturesFile);
    //xIni.WriteString('P2K_Mode', 'OtherFeaturesFile2', OtherFeaturesFile2);
    xIni.WriteInteger('AT_Mode', 'PhoneBookType', iPhoneBookType);
    xIni.WriteInteger('AT_Mode', 'UseFirstNRecords', UseFirstNRecords);
    xIni.WriteInteger('AT_Mode', 'TimeOut', ATTimeOut);
    xIni.WriteInteger('AT_Mode', 'BaudRate', BaudRate);    
    xIni.WriteInteger('AT_Mode', 'READ_PHONEBOOK_BLOCK', iREAD_PHONEBOOK_BLOCK);
    xIni.WriteInteger('OBEX_Mode', 'TimeOut', OBEXTimeOut);
    xIni.WriteInteger('OBEX_Mode', 'OBEXType', iOBEXType);
    xIni.WriteInteger('OBEX_Mode', 'ShowProgress', OBEXShowProgress);
  finally
    xIni.Free;
  end;
  //Form1.ApplySkin(Skin);
end;
Rambler's Top100