i: Integer;
ini: TMemIniFile;
CoolSet: TCoolSet;
+ wkList : TStringList;
begin
ini := TMemIniFile.Create(GetFileName());
try
ini.WriteInteger('BoardColumnWidth', 'ID' + IntToStr(i), FBoardColumnWidth[i]);
end;
- // \83J\83e\83S\83\8a\83\8a\83X\83g\8f\87\8f\98
- for i := 0 to FBBSColumnOrder.Count - 1 do
- ini.WriteInteger( 'BBSColumnOrder', 'ID' + IntToStr( i ), Ord( FBBSColumnOrder[ i ] ) );
+ wkList := TStringList.Create;
+ try
+ // \83J\83e\83S\83\8a\83\8a\83X\83g\8f\87\8f\98
+ ini.ReadSection( 'BBSColumnOrder', wkList );
+ for i := wkList.Count - 1 downto 0 do
+ ini.DeleteKey( 'BBSColumnOrder', wkList[ i ] );
+ for i := 0 to FBBSColumnOrder.Count - 1 do
+ ini.WriteInteger( 'BBSColumnOrder', 'ID' + IntToStr( i ), Ord( FBBSColumnOrder[ i ] ) );
- // \94Â\83\8a\83X\83g\8f\87\8f\98
- for i := 0 to FCategoryColumnOrder.Count - 1 do
- ini.WriteInteger( 'CategoryColumnOrder', 'ID' + IntToStr( i ), Ord( FCategoryColumnOrder[ i ] ) );
+ // \94Â\83\8a\83X\83g\8f\87\8f\98
+ ini.ReadSection( 'CategoryColumnOrder', wkList );
+ for i := wkList.Count - 1 downto 0 do
+ ini.DeleteKey( 'CategoryColumnOrder', wkList[ i ] );
+ for i := 0 to FCategoryColumnOrder.Count - 1 do
+ ini.WriteInteger( 'CategoryColumnOrder', 'ID' + IntToStr( i ), Ord( FCategoryColumnOrder[ i ] ) );
- // \83X\83\8c\83\8a\83X\83g\8f\87\8f\98
- for i := 0 to FBoardColumnOrder.Count - 1 do
- ini.WriteInteger( 'BoardColumnOrder', 'ID' + IntToStr( i ), Ord( FBoardColumnOrder[ i ] ) );
+ // \83X\83\8c\83\8a\83X\83g\8f\87\8f\98
+ ini.ReadSection( 'BoardColumnOrder', wkList );
+ for i := wkList.Count - 1 downto 0 do
+ ini.DeleteKey( 'BoardColumnOrder', wkList[ i ] );
+ for i := 0 to FBoardColumnOrder.Count - 1 do
+ ini.WriteInteger( 'BoardColumnOrder', 'ID' + IntToStr( i ), Ord( FBoardColumnOrder[ i ] ) );
+ finally
+ wkList.Free;
+ end;
//\83T\83E\83\93\83h
for i := 0 to GetSoundCount - 1 do begin