TabOrder = 0
end
end
+ object GroupBox3: TGroupBox
+ Left = 16
+ Top = 126
+ Width = 473
+ Height = 51
+ Caption = #12522#12531#12463#31227#21205#23653#27508
+ TabOrder = 1
+ object Label10: TLabel
+ Left = 8
+ Top = 20
+ Width = 84
+ Height = 12
+ Caption = #23653#27508#26368#22823#20445#25345#25968
+ end
+ object Label11: TLabel
+ Left = 227
+ Top = 20
+ Width = 158
+ Height = 12
+ Caption = #65288#12487#12501#12457#12523#12488'=20 '#20877#36215#21205#24460#26377#21177#65289
+ end
+ object MoveHistoryMaxEdit: TEdit
+ Left = 112
+ Top = 16
+ Width = 105
+ Height = 20
+ TabOrder = 0
+ end
+ end
end
end
object OkBotton: TButton
Label8: TLabel;
FixedCookieEdit: TEdit;
Label9: TLabel;
+ GroupBox3: TGroupBox;
+ Label10: TLabel;
+ MoveHistoryMaxEdit: TEdit;
+ Label11: TLabel;
procedure OkBottonClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure CDeleteButtonClick(Sender: TObject);
RemoteTrapAtt.Checked := GikoSys.Setting.RemoteTrapAtt;
// Cookie
FixedCookieEdit.Text := GikoSys.Setting.FixedCookie;
+ // \83\8a\83\93\83N\88Ú\93®\97\9a\97ð
+ MoveHistoryMaxEdit.Text := IntToStr( GikoSys.Setting.MoveHistorySize );
end;
procedure TKuroutOption.SaveSetting;
// Cookie
GikoSys.Setting.FixedCookie := FixedCookieEdit.Text;
+ // \83\8a\83\93\83N\88Ú\93®\97\9a\97ð
+ GikoSys.Setting.MoveHistorySize :=
+ StrToIntDef( MoveHistoryMaxEdit.Text, 20 );
GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex;
end;
private
FHistoryMax : Integer;
FIndex : Integer;
+ {
+ \brief \83\8a\83\93\83N\88Ú\93®\97\9a\97ð\8dÅ\91å\95Û\8e\9d\90\94\82ð\90Ý\92è\82·\82é\81B
+ \param AVal \95Û\8e\9d\90\94
+ }
+ procedure SetHistoryMax(AVal: Integer);
+ {
+ \brief \83\8a\83\93\83N\88Ú\93®\97\9a\97ð\8dÅ\91å\95Û\8e\9d\90\94\82ð\8eæ\93¾\82·\82é\81B
+ \return \95Û\8e\9d\90\94( > 0 )
+ }
+ function GetHistoryMax: Integer;
public
constructor Create( max : Integer ); overload;
function pushItem( item: TMoveHistoryItem): Integer; overload;
function getPrevItem( item: TBrowserRecord): TMoveHistoryItem;
function getNextItem: TMoveHistoryItem;
procedure clear; override;
- property HistoryMax : Integer read FHistoryMax write FHistoryMax;
+ property HistoryMax : Integer read GetHistoryMax write SetHistoryMax;
property HisotryIndex: Integer read FIndex;
end;
implementation
+uses
+ GikoSystem;
+
+
//! \83R\83\93\83X\83g\83\89\83N\83^
constructor TMoveHistory.Create( max : Integer );
begin
inherited Create;
FIndex := 0;
- FHistoryMax := max;
- if (FHistoryMax < 0) then begin
- FHistoryMax := 20;
- end;
+
+ SetHistoryMax( GikoSys.Setting.MoveHistorySize );
end;
//! \88Ú\93®\97\9a\97ð\82Ì\83A\83C\83e\83\80\92Ç\89Á
function TMoveHistory.pushItem( item: TMoveHistoryItem): Integer;
var
i : Integer;
begin
- // FIndex\82æ\82è\8cã\82ë\82Ì\83A\83C\83e\83\80\82ð\8dí\8f\9c\82·\82é
+ // \83A\83C\83e\83\80\82ð\8dí\8f\9c\82·\82é
for i := Self.Count - 1 downto 0 do begin
if (Self.Items [i] <> nil) then begin
TMoveHistoryItem( Self.Items[i] ).Free;
Self.Delete(i);
end;
Self.Capacity := 0;
-
+ FIndex := 0;
inherited;
end;
+procedure TMoveHistory.SetHistoryMax(AVal: Integer);
+begin
+ // \97\9a\97ð\82Ì\83T\83C\83Y\82Í0\82æ\82è\91å\82«\82\82È\82¢\82Æ\82¢\82¯\82È\82¢
+ if ( AVal > 0 ) then begin
+ if ((AVal + 1) <> FHistoryMax) then begin
+ Self.clear;
+ // \88Ú\93®\82µ\82½\8dÛ\82É\81A\96ß\82é\83\8a\83\93\83N\82ð1\82Â\91«\82·\82Ì\82Å
+ FHistoryMax := AVal + 1;
+ end;
+ end;
+end;
+function TMoveHistory.GetHistoryMax: Integer;
+begin
+ // \88Ú\93®\82µ\82½\8dÛ\82É\81A\96ß\82é\83\8a\83\93\83N\82ð1\82Â\91«\82·\82Ì\82Å
+ Result := FHistoryMax - 1;
+end;
initialization
MoveHisotryManager := TMoveHistory.Create( 20 );
FInputAssistFormWidth: Integer;
FInputAssistFormHeight: Integer;
- // Cookie\82É\95t\89Á\82·\82é\8cÅ\92è\83R\81[\83h
+ //! Cookie\82É\95t\89Á\82·\82é\8cÅ\92è\83R\81[\83h
FFixedCookie: String;
+ //! \83\8a\83\93\83N\88Ú\93®\97\9a\97ð\82Ì\95Û\8e\9d\90\94
+ FMoveHistorySize : Integer;
function GetMainCoolSet(Index: Integer): TCoolSet;
function GetBoardCoolSet(Index: Integer): TCoolSet;
function GetEditorKeyFileName: String;
procedure WriteLogFolder(AVal : String);
function GetInputAssistFileName : String;
+ {
+ \brief \83\8a\83\93\83N\97\9a\97ð\82Ì\95Û\8e\9d\83T\83C\83Y\82Ìsetter
+ \param AVal \90Ý\92è\82·\82é\83T\83C\83Y( >0)
+ }
+ procedure SetMoveHistorySize(AVal : Integer);
//\8eó\90M\83o\83b\83t\83@\83T\83C\83Y
property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
//HTTP1.1\8eg\97p
property InputAssistFormHeight: Integer read FInputAssistFormHeight write FInputAssistFormHeight;
//! Cookie\82É\95t\89Á\82·\82é\8cÅ\92è\83R\81[\83h
property FixedCookie: String read FFixedCookie write FFixedCookie;
+ // \83\8a\83\93\83N\88Ú\93®\97\9a\97ð\82Ì\95Û\8e\9d\90\94
+ property MoveHistorySize : Integer read FMoveHistorySize write SetMoveHistorySize;
end;
// Cookie\82É\95t\89Á\82·\82é\8cÅ\92è\83R\81[\83h
FFixedCookie := ini.ReadString('Cookie', 'fixedString', FIXED_COOKIE);
+ // \83\8a\83\93\83N\88Ú\93®\97\9a\97ð\82Ì\8dÅ\91å\95Û\8e\9d\90\94
+ FMoveHistorySize := ini.ReadInteger('MoveHisotry', 'Max', 20);
+
ini.UpdateFile;
finally
ini.Free;
// \8cÅ\92è\82ÌCookie\95¶\8e\9a\97ñ
ini.WriteString('Cookie', 'fixedString', FFixedCookie);
+ // \83\8a\83\93\83N\88Ú\93®\97\9a\97ð\82Ì\8dÅ\91å\95Û\8e\9d\90\94
+ ini.WriteInteger('MoveHisotry', 'Max', FMoveHistorySize);
+
ini.UpdateFile;
finally
ini.Free;
begin
Result := GetConfigDir + INPUTASSIST_FILE_NAME;
end;
-
+procedure TSetting.SetMoveHistorySize(AVal : Integer);
+begin
+ if (AVal > 0) then begin
+ FMoveHistorySize := AVal;
+ end;
+end;
end.