4 \83A
\83v
\83\8a\83P
\81[
\83V
\83\87\83\93\91S
\91Ì
\82Å
\8eg
\82¤
\82³
\82Ü
\82´
\82Ü
\82È
\83f
\81[
\83^
\82ð
\92è
\8b`
9 uses Windows, IniFiles, BRegExp, Graphics, SysUtils, Forms, Dialogs, Classes,
10 ComCtrls, Contnrs, SsPlayTime, StrReplace;
13 TReturnKeyFunction = (kfYenN, kfReturn, kfYenNReturn, kfConstText);
14 TSoundArrived = (saFalse, saTrue, saParent);
15 TLogWindowPreviewStyle = (psConversation, psImageConversation,
16 psScript, psScriptWithLineBreak);
17 TLogListPreviewStyle = (psNoColor, psNormal, psTagStripped);
18 TSurfacePreviewOnScriptPointPosition = (spspMainWindowLeft, spspMainWindowRight);
20 //SSTP Bottle
\82Ì
\90Ý
\92è
21 TBottlePrefs = class(TObject)
25 FIgnoreTimeCritical: boolean;
27 FShowConstBar: boolean;
29 FDblClkInsert: boolean;
30 FShowToolBar: boolean;
31 FDefaultScript: TStringList;
33 FMetaWordColor: TColor;
35 FMarkErrorColor: TColor;
40 FWhenCtrlReturn: TReturnKeyFunction;
41 FWhenShiftReturn: TReturnKeyFunction;
42 FWhenReturn: TReturnKeyFunction;
43 FNoTranslate: boolean;
48 FSilentWhenHidden: boolean;
50 FSenderWindowPosition: TRect;
51 FTabPosition: TTabPosition;
52 FLogWindowPosition: TRect;
54 FIgnoreFrequentYenS: boolean;
55 FWaitScriptEnd: integer;
56 FMinScriptLength: integer;
57 FCgiNameGhost: String;
60 FLogWindowDividerPos: integer;
62 FUseHttpProxy: boolean;
63 FAskUseHttpProxy: boolean;
65 FProxyAddress: String;
66 FProxyNeedAuthentication: boolean;
69 FConfirmOnExit: boolean;
70 FFixMessySurface: boolean;
71 FResetIfGhostAfterSend: boolean;
72 FGhostDropDownCount: integer;
73 FLogWindowPreviewStyle: TLogWindowPreviewStyle;
76 FLogWindowColumnWidth: String;
77 FClearAfterSend: boolean;
78 FAutoJoinChannels: TStrings;
80 FHUTagTo01Tag: boolean;
81 FWarnYenTNotExist: boolean;
82 FWarnScopeChangeInSynchronize: boolean;
83 FNeedConfirmBeforeSend: boolean;
86 FVisibleGhostsList: TStringList;
87 FSurfacePreviewOnHint: boolean;
88 FSurfacePreviewOnScriptPoint: boolean;
89 FSurfacePreviewOnScriptPointPosition: TSurfacePreviewOnScriptPointPosition;
90 FNoExtraSSTPHeaders: boolean;
91 FLogListPreviewStyle: TLogListPreviewStyle;
92 FEditorPreviewWindowPosition: TRect;
94 FConfirmOnTabClose: boolean;
95 FReconnectWait: integer;
96 FPartialConfirmFormat: String;
97 FAutoPartialConfirm: boolean;
98 FPlayTimeParams: TSsPlayTimeParams;
99 FBottleServerPort: integer;
100 FBottleServer: String;
102 FBrowserExeName: string;
103 FReplacePresets: TReplacePresets;
104 FNoWarnOfEmptyFMO: Boolean;
105 FShowEditorPreviewWindow: Boolean;
106 FLogItemDragDrop: Boolean;
108 procedure SetDblClkInsert(const Value: boolean);
109 procedure SetDefaultScript(const Value: String);
110 procedure SetIgnoreTimeCritical(const Value: boolean);
111 procedure SetMarkErrorColor(const Value: TColor);
112 procedure SetMarkUpColor(const Value: TColor);
113 procedure SetMetaWordColor(const Value: TColor);
114 procedure SetTextColor(const Value: TColor);
115 procedure SetNoConfirm(const Value: boolean);
116 procedure SetShowConstBar(const Value: boolean);
117 procedure SetShowToolBar(const Value: boolean);
118 procedure SetStayOnTop(const Value: boolean);
119 procedure SetTalkColorH(const Value: TColor);
120 procedure SetTalkColorU(const Value: TColor);
121 procedure SetAutoStart(const Value: boolean);
122 procedure SetWhenCtrlReturn(const Value: TReturnKeyFunction);
123 procedure SetWhenReturn(const Value: TReturnKeyFunction);
124 procedure SetWhenShiftReturn(const Value: TReturnKeyFunction);
125 procedure SetNoTranslate(const Value: boolean);
126 procedure SetNoDescript(const Value: boolean);
127 procedure SetBgColor(const Value: TColor);
128 procedure SetServerPort(const Value: integer);
129 procedure SetSilentWhenHidden(const Value: boolean);
130 procedure SetLUID(const Value: String);
131 procedure SetSenderWindowPosition(const Value: TRect);
132 procedure SetTabPosition(const Value: TTabPosition);
133 procedure SetLogWindowPosition(const Value: TRect);
134 procedure SetIgnoreFrequentYenS(const Value: boolean);
135 procedure SetNoTransUrl(const Value: boolean);
136 procedure SetWaitScriptEnd(const Value: integer);
137 procedure SetMinScriptLength(const Value: integer);
138 procedure SetLogWindowDividerPos(const Value: integer);
139 procedure SetProxyAddress(const Value: String);
140 procedure SetProxyPort(const Value: integer);
141 procedure SetProxyUser(const Value: String);
142 procedure SetProxyPass(const Value: String);
143 procedure SetProxyNeedAuthentication(const Value: boolean);
144 procedure SetUseHttpProxy(const Value: boolean);
145 procedure SetAskUseHttpProxy(const Value: boolean);
146 procedure SetConfirmOnExit(const Value: boolean);
147 procedure SetFixMessySurface(const Value: boolean);
148 procedure SetResetIfGhostAfterSend(const Value: boolean);
149 procedure SetGhostDropDownCount(const Value: integer);
150 procedure SetLogWindowPreviewStyle(const Value: TLogWindowPreviewStyle);
151 procedure SetTalkColorS(const Value: TColor);
152 procedure SetLogWindowColumnWidth(const Value: String);
153 procedure SetClearAfterSend(const Value: boolean);
154 procedure SetAutoJoinChannels(const Value: TStrings);
155 procedure SetFMOName(const Value: TStrings);
156 function GetDefaultScript: String;
157 procedure SetHUTagTo01Tag(const Value: boolean);
158 procedure SetWarnScopeChangeInSynchronize(const Value: boolean);
159 procedure SetWarnYenTNotExist(const Value: boolean);
160 procedure SetNeedConfirmBeforeSend(const Value: boolean);
161 procedure SetShowRuler(const Value: boolean);
162 procedure SetHideGhosts(const Value: boolean);
163 procedure SetVisibleGhostsList(const Value: TStringList);
164 procedure SetSurfacePreviewOnHint(const Value: boolean);
165 procedure SetSurfacePreviewOnScriptPoint(const Value: boolean);
166 procedure SetSurfacePreviewOnScriptPointPosition(
167 const Value: TSurfacePreviewOnScriptPointPosition);
168 procedure SetNoExtraSSTPHeaders(const Value: boolean);
169 procedure SetLogListPreviewStyle(const Value: TLogListPreviewStyle);
170 procedure SetEditorPreviewWindowPosition(const Value: TRect);
171 procedure SetAutoClip(const Value: boolean);
172 procedure SetConfirmOnTabClose(const Value: boolean);
173 procedure SetReconnectWait(const Value: integer);
174 procedure SetPartialConfirmFormat(const Value: String);
175 procedure SetAutoPartialConfirm(const Value: boolean);
176 procedure SetPlayTimeParams(const Value: TSsPlayTimeParams);
177 procedure SetTabWidth(const Value: integer);
178 procedure SetBrowserExeName(const Value: string);
180 function InScreen(ARect: TRect): boolean;
182 property BottleServer: String read FBottleServer;
183 property BottleServerPort: integer read FBottleServerPort;
184 property PartialConfirmFormat: String read FPartialConfirmFormat write SetPartialConfirmFormat;
185 property AutoPartialConfirm: boolean read FAutoPartialConfirm write SetAutoPartialConfirm;
186 property ConfirmOnExit: boolean read FConfirmOnExit write SetConfirmOnExit;
187 property ConfirmOnTabClose: boolean read FConfirmOnTabClose write SetConfirmOnTabClose;
188 property AutoClip: boolean read FAutoClip write SetAutoClip;
189 property AutoStart: boolean read FAutoStart write SetAutoStart;
190 property TabPosition: TTabPosition read FTabPosition write SetTabPosition;
191 property TabWidth: integer read FTabWidth write SetTabWidth;
192 property GhostDropDownCount: integer read FGhostDropDownCount write SetGhostDropDownCount;
193 property NoTranslate: boolean read FNoTranslate write SetNoTranslate;
194 property NoDescript: boolean read FNoDescript write SetNoDescript;
195 property NoTransUrl: boolean read FNoTransUrl write SetNoTransUrl;
196 property SilentWhenHidden: boolean read FSilentWhenHidden write SetSilentWhenHidden;
197 property FixMessySurface: boolean read FFixMessySurface write SetFixMessySurface;
198 property HUTagTo01Tag: boolean read FHUTagTo01Tag write SetHUTagTo01Tag;
199 property ResetIfGhostAfterSend: boolean read FResetIfGhostAfterSend write SetResetIfGhostAfterSend;
200 property ClearAfterSend: boolean read FClearAfterSend write SetClearAfterSend;
201 property NeedConfirmBeforeSend: boolean read FNeedConfirmBeforeSend write SetNeedConfirmBeforeSend;
202 property IgnoreFrequentYenS: boolean read FIgnoreFrequentYenS write SetIgnoreFrequentYenS;
203 property WarnYenTNotExist: boolean read FWarnYenTNotExist write SetWarnYenTNotExist;
204 property WarnScopeChangeInSynchronize: boolean read FWarnScopeChangeInSynchronize write SetWarnScopeChangeInSynchronize;
205 property WaitScriptEnd: integer read FWaitScriptEnd write SetWaitScriptEnd;
206 property MinScriptLength: integer read FMinScriptLength write SetMinScriptLength;
207 property StayOnTop: boolean read FStayOnTop write SetStayOnTop;
208 property IgnoreTimeCritical: boolean read FIgnoreTimeCritical write SetIgnoreTimeCritical;
209 property TalkColorH: TColor read FTalkColorH write SetTalkColorH;
210 property TalkColorU: TColor read FTalkColorU write SetTalkColorU;
211 property TalkColorS: TColor read FTalkColorS write SetTalkColorS;
212 property MarkUpColor: TColor read FMarkUpColor write SetMarkUpColor;
213 property MetaWordColor: TColor read FMetaWordColor write SetMetaWordColor;
214 property MarkErrorColor: TColor read FMarkErrorColor write SetMarkErrorColor;
215 property BgColor: TColor read FBgColor write SetBgColor;
216 property TextColor: TColor read FTextColor write SetTextColor;
217 property DefaultScript: String read GetDefaultScript write SetDefaultScript;
218 property ShowRuler: boolean read FShowRuler write SetShowRuler;
219 property DblClkInsert: boolean read FDblClkInsert write SetDblClkInsert;
220 property ShowToolBar: boolean read FShowToolBar write SetShowToolBar;
221 property ShowConstBar: boolean read FShowConstBar write SetShowConstBar;
222 property NoConfirm: boolean read FNoConfirm write SetNoConfirm;
223 property HomePage: string read FHomePage;
224 property WhenReturn: TReturnKeyFunction read FWhenReturn write SetWhenReturn;
225 property WhenShiftReturn: TReturnKeyFunction read FWhenShiftReturn write SetWhenShiftReturn;
226 property WhenCtrlReturn: TReturnKeyFunction read FWhenCtrlReturn write SetWhenCtrlReturn;
227 property ServerPort: integer read FServerPort write SetServerPort;
229 property CgiName: string read FCgiName;
230 property CgiNameGhost: String read FCgiNameGhost;
231 property CgiFetchLog: String read FCgiFetchLog;
232 property GLogPage: String read FGLogPage;
233 property VotePage: String read FVotePage;
234 property HelpPage: String read FHelpPage;
236 //
\83`
\83\83\83\93\83l
\83\8b\8aÖ
\8cW
237 property AutoJoinChannels: TStrings read FAutoJoinChannels write SetAutoJoinChannels;
239 property LUID: String read FLUID write SetLUID;
241 //
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
242 property SenderWindowPosition: TRect
243 read FSenderWindowPosition write SetSenderWindowPosition;
244 property LogWindowPosition: TRect read FLogWindowPosition write SetLogWindowPosition;
245 property LogWindowDividerPos: integer
246 read FLogWindowDividerPos write SetLogWindowDividerPos;
247 property LogWindowColumnWidth: String
248 read FLogWindowColumnWidth write SetLogWindowColumnWidth;
249 property EditorPreviewWindowPosition: TRect read FEditorPreviewWindowPosition write SetEditorPreviewWindowPosition;
250 //
\83v
\83\8d\83L
\83V
\8aÖ
\8cW
251 property UseHttpProxy: boolean read FUseHttpProxy write SetUseHttpProxy;
252 property AskUseHttpProxy: boolean read FAskUseHttpProxy write SetAskUseHttpProxy;
253 property ProxyAddress: String read FProxyAddress write SetProxyAddress;
254 property ProxyPort: integer read FProxyPort write SetProxyPort;
255 property ProxyUser: String read FProxyUser write SetProxyUser;
256 property ProxyPass: String read FProxyPass write SetProxyPass;
257 property ProxyNeedAuthentication: boolean read FProxyNeedAuthentication write SetProxyNeedAuthentication;
259 property ReconnectWait: integer read FReconnectWait write SetReconnectWait;
260 //
\83\8d\83O
\83E
\83B
\83\93\83h
\83E
\8aÖ
\8cW
261 property LogWindowPreviewStyle: TLogWindowPreviewStyle
262 read FLogWindowPreviewStyle write SetLogWindowPreviewStyle;
263 property LogListPreviewStyle: TLogListPreviewStyle
264 read FLogListPreviewStyle write SetLogListPreviewStyle;
266 property FMOName: TStrings read FFMOName write SetFMOName;
267 property HideGhosts: boolean read FHideGhosts write SetHideGhosts;
268 property VisibleGhostsList: TStringList read FVisibleGhostsList write SetVisibleGhostsList;
269 property NoExtraSSTPHeaders: boolean read FNoExtraSSTPHeaders write SetNoExtraSSTPHeaders;
270 //
\83T
\81[
\83t
\83B
\83X
\83v
\83\8c\83r
\83\85\81[
271 property SurfacePreviewOnHint: boolean
272 read FSurfacePreviewOnHint write SetSurfacePreviewOnHint;
273 property SurfacePreviewOnScriptPoint: boolean
274 read FSurfacePreviewOnScriptPoint write SetSurfacePreviewOnScriptPoint;
275 property SurfacePreviewOnScriptPointPosition: TSurfacePreviewOnScriptPointPosition
276 read FSurfacePreviewOnScriptPointPosition write SetSurfacePreviewOnScriptPointPosition;
277 //
\8dÄ
\90¶
\8e\9e\8aÔ
\97\
\91ª
278 property PlayTimeParams: TSsPlayTimeParams read FPlayTimeParams write SetPlayTimeParams;
279 //URL
\83I
\81[
\83v
\83\93\8e\9e\82É
\8eg
\82¤
\83u
\83\89\83E
\83U
\82Ì
\8eÀ
\8ds
\83t
\83@
\83C
\83\8b\96¼
280 property BrowserExeName: string read FBrowserExeName write SetBrowserExeName;
281 //
\8e©
\93®
\92u
\8a·
\83v
\83\8a\83Z
\83b
\83g
282 property ReplacePresets: TReplacePresets read FReplacePresets;
283 //SSTP
\83T
\81[
\83o
\94ñ
\91¶
\8dÝ
\8cx
\8d\90\82Ì
\83J
\83b
\83g
\82ð
\82·
\82é
\82©
284 property NoWarnOfEmptyFMO: Boolean
285 read FNoWarnOfEmptyFMO write FNoWarnOfEmptyFMO;
286 //
\83G
\83f
\83B
\83^
\83v
\83\8c\83r
\83\85\81[
\83E
\83C
\83\93\83h
\83E
\82Ì
\8fó
\91Ô
\95Û
\91¶
\97p
287 property ShowEditorPreviewWindow: Boolean
288 read FShowEditorPreviewWindow write FShowEditorPreviewWindow;
289 //
\83\8d\83O
\83h
\83\89\83b
\83O
\81\95\83h
\83\8d\83b
\83v
\97L
\8cø
290 property LogItemDragDrop: Boolean
291 read FLogItemDragDrop write FLogItemDragDrop;
293 //
\83R
\83\93\83X
\83g
\83\89\83N
\83^
\81E
\83f
\83X
\83g
\83\89\83N
\83^
\81E
\95Û
\91¶
295 destructor Destroy; override;
296 procedure SaveSettings;
299 TChannelListItem = class(TObject)
307 procedure SetGhost(const Value: String);
308 procedure SetInfo(const Value: String);
309 procedure SetMembers(const Value: integer);
310 procedure SetName(const Value: String);
311 procedure SetNoPost(const Value: boolean);
312 procedure SetWarnPost(const Value: boolean);
314 property Name: String read FName write SetName;
315 property Info: String read FInfo write SetInfo;
316 property Ghost: String read FGhost write SetGhost;
317 property Members: integer read FMembers write SetMembers;
318 property NoPost: boolean read FNoPost write SetNoPost;
319 property WarnPost: boolean read FWarnPost write SetWarnPost;
322 TChannelList = class(TList)
324 function GetChannel(Name: String): TChannelListItem;
325 function GetChannelItem(Index: integer): TChannelListItem;
327 procedure Clear; override;
328 property Channel[Name: String]: TChannelListItem read GetChannel;
329 property ChannelItem[Index: integer]: TChannelListItem read GetChannelItem;
332 TScriptTransOption = (
333 toIgnoreTimeCritical,
336 toIgnoreFrequentYenS,
344 TScriptTransOptions = set of TScriptTransOption;
348 ChannelList: TChannelList; //
\83`
\83\83\83\93\83l
\83\8b\83\8a\83X
\83g
\82ð
\95Û
\8e\9d\82·
\82é
349 JoinChannels: TStringList; //
\8c»
\8dÝ
\8eQ
\89Á
\82µ
\82Ä
\82¢
\82é
\83`
\83\83\83\93\83l
\83\8b
352 DefaultBottleServer = 'bottle.mikage.to';
353 DefaultBottleServerPort = 9871;
354 DefaultCGI = '/bottle2.cgi';
355 DefaultCGIGhost = '/glog/bottleglog.cgi';
356 DefaultCGIFetchLog = '/fetchlog.cgi';
359 DefaultHomePage = 'http://bottle.mikage.to/';
360 DefaultGLogPage = 'http://bottle.mikage.to/glog/glogview.cgi';
361 DefaultVotePage = 'http://bottle.mikage.to/viewvotes.cgi';
362 DefaultHelpPage = 'http://bottle.mikage.to/clihelp/index.html';
364 DefaultMinScriptLength = 20;
369 VersionString = 'SSTP Bottle Client ver ' + Version + 'a NO MUTEX VERSION';
371 VersionString = 'SSTP Bottle Client ver ' + Version;
374 SentLogFile = 'sent.log';
376 BottleDisclaimer = '(C)2001-2006 WinBottle Project'#13#10 +
377 'naru, C.Ponapalt, Yune Kotomi, yese, Mikage Sawatari, E01'#13#10 +
380 ChannelDefault = '(CH
\90\84\8f§)';
381 ClipChannel = '(
\83N
\83\8a\83b
\83v)';
383 function ParamsEncode(const ASrc: string): string;
384 function XMLEntity(From: String): String;
385 function SafeFileName(From: String; ChangePathDelimiters: boolean = true): String;
386 function ComponentToString(Component: TComponent): string;
387 function StringToComponent(Value: string): TComponent;
389 function ReplacePresetFileName: string;
391 procedure BuildShortCutList(Target: TStrings);
395 function ParamsEncode(const ASrc: string): string;
399 UnsafeChars = ['*', '#', '%', '<', '>', ' ', '[', ']', '+'];
401 Result := ''; {Do not Localize}
402 for i := 1 to Length(ASrc) do
404 if (ASrc[i] in UnsafeChars) or (not (ord(ASrc[i])in [33..128])) then
405 begin {do not localize}
406 Result := Result + '%' + IntToHex(Ord(ASrc[i]), 2); {do not localize}
410 Result := Result + ASrc[i];
415 // XML
\8eÀ
\91Ì
\8eQ
\8fÆ
\82É
\92u
\82«
\8a·
\82¦
\82é
416 function XMLEntity(From: String): String;
423 for i := 1 to Length(From) do
428 Result := Result + From[i];
429 end else if From[i] in LeadBytes then
432 Result := Result + From[i];
436 60: Result := Result + '<'; // Less than
437 62: Result := Result + '>'; // Greater than
438 38: Result := Result + '&'; // Ampersand
439 39: Result := Result + '''; // Single quote
440 34: Result := Result + '"'; // Double quote
442 Result := Result + From[i];
448 // Escape characters which can not be used as a filename
449 function SafeFileName(From: String; ChangePathDelimiters: boolean = true): String;
451 Result := StringReplace(From, '*', '
\81\96', [rfReplaceAll]);
452 Result := StringReplace(Result, '|', '
\81b', [rfReplaceAll]);
453 Result := StringReplace(Result, '"', '''''', [rfReplaceAll]);
454 Result := StringReplace(Result, '<', '
\81\83', [rfReplaceAll]);
455 Result := StringReplace(Result, '>', '
\81\84', [rfReplaceAll]);
456 Result := StringReplace(Result, '?', '
\81H', [rfReplaceAll]);
457 if ChangePathDelimiters then
459 Result := StringReplace(Result, '\', '
\81\8f', [rfReplaceAll]);
460 Result := StringReplace(Result, ':', '
\81F', [rfReplaceAll]);
461 Result := StringReplace(Result, '/', '
\81^', [rfReplaceAll]);
465 function ComponentToString(Component: TComponent): string;
467 BinStream:TMemoryStream;
468 StrStream: TStringStream;
471 BinStream := TMemoryStream.Create;
473 StrStream := TStringStream.Create(s);
475 BinStream.WriteComponent(Component);
476 BinStream.Seek(0, soFromBeginning);
477 ObjectBinaryToText(BinStream, StrStream);
478 StrStream.Seek(0, soFromBeginning);
479 Result:= StrStream.DataString;
488 function StringToComponent(Value: string): TComponent;
490 StrStream:TStringStream;
491 BinStream: TMemoryStream;
493 StrStream := TStringStream.Create(Value);
495 BinStream := TMemoryStream.Create;
497 ObjectTextToBinary(StrStream, BinStream);
498 BinStream.Seek(0, soFromBeginning);
499 Result := BinStream.ReadComponent(nil);
508 function ReplacePresetFileName: string;
510 Result := ExtractFilePath(Application.ExeName) + 'replace.txt';
513 procedure BuildShortCutList(Target: TStrings);
518 //
\83V
\83\87\81[
\83g
\83J
\83b
\83g
\83\8a\83X
\83g
\82Ì
\91I
\91ð
\8e\88\82ð
\8dì
\90¬
523 for c := 'A' to 'Z' do
525 for c := 'A' to 'Z' do
526 Add('Shift+Ctrl+' + c);
527 for c := 'A' to 'Z' do
528 Add('Alt+Ctrl+' + c);
530 Add('F' + IntToStr(i));
532 Add('Shift+F' + IntToStr(i));
541 constructor TBottlePrefs.Create;
545 FAutoJoinChannels := TStringList.Create;
546 FDefaultScript := TStringList.Create;
547 FFMOName := TStringList.Create;
548 FVisibleGhostsList := TStringList.Create;
550 FIni := TIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));
552 PartialConfirmFormat := FIni.ReadString('System', 'PartialConfirmFormat', '\t|\e');
553 AutoPartialConfirm := FIni.ReadBool('System', 'AutoPartialConfirm', false);
554 ConfirmOnExit := FIni.ReadBool('System', 'ConfirmOnExit', false);
555 ConfirmOnTabClose := FIni.ReadBool('System', 'ConfirmOnTabClose', false);
556 NoWarnOfEmptyFMO := FIni.ReadBool('System', 'NoWarnOfEmptyFMO', False);
557 ShowEditorPreviewWindow := FIni.ReadBool('System', 'ShowEditorPreviewWindow', False);
558 LogItemDragDrop := FIni.ReadBool('System', 'LogItemDragDrop', True);
560 AutoClip := FIni.ReadBool('System', 'AutoClip', false);
561 AutoStart := FIni.ReadBool('System', 'AutoStart', false);
562 TabPosition := TTabPosition(FIni.ReadInteger('System', 'TabPosition', 0));
563 TabWidth := FIni.ReadInteger('System', 'TabWidth', 0);
564 GhostDropDownCount := FIni.ReadInteger('System', 'GhostDropDownCount', 30);
566 NoTranslate := FIni.ReadBool('System', 'NoTranslate', true);
567 NoDescript := FIni.ReadBool('System', 'NoDescript', false);
568 NoTransUrl := FIni.ReadBool('System', 'NoTransUrl', false);
569 SilentWhenHidden:= FIni.ReadBool('System', 'SilentWhenHidden', true);
570 FixMessySurface := FIni.ReadBool('System', 'FixMessySurface', false);
571 HUTagTo01Tag := FIni.ReadBool('System', 'HUTagTo01Tag', false);
572 ResetIfGhostAfterSend := FIni.ReadBool('System', 'ResetIfGhostAfterSend', false);
573 ClearAfterSend := FIni.ReadBool('System', 'ClearAfterSend', true);
574 NeedConfirmBeforeSend := FIni.ReadBool('System', 'NeedConfirmBeforeSend', true);
575 WarnYenTNotExist := FIni.ReadBool('System', 'WarnYenTNotExist', false);
576 WarnScopeChangeInSynchronize := FIni.ReadBool('System', 'WarnScopeChangeInSynchronize', false);
578 IgnoreFrequentYenS := FIni.ReadBool('System', 'IgnoreFrequentYenS', false);
579 WaitScriptEnd := FIni.ReadInteger('System', 'WaitScriptEnd', 0);
580 MinScriptLength := FIni.ReadInteger('System', 'MinScriptLength', DefaultMinScriptLength);
581 StayOnTop := FIni.ReadBool('System', 'StayOnTop', false);
582 ShowConstBar := FIni.ReadBool('System', 'ShowConstBar', true);
583 ShowToolBar := FIni.ReadBool('System', 'ShowToolBar', true);
584 NoConfirm := FIni.ReadBool('System', 'NoConfirm', false);
585 IgnoreTimeCritical := FIni.ReadBool('System', 'IgnoreTimeCritical', false);
586 FDefaultScript.CommaText := FIni.ReadString('System', 'DefaultScript', '\t\u\s[10]\h\s[0]|\e');
587 ShowRuler := FIni.ReadBool('System', 'ShowRuler', false);
590 TalkColorH := StringToColor(FIni.ReadString('System', 'TalkColorH', 'clBlack'));
591 TalkColorU := StringToColor(FIni.ReadString('System', 'TalkColorU', 'clMaroon'));
592 TalkColorS := StringToColor(FIni.ReadString('System', 'TalkColorS', 'clPurple'));
593 MarkUpColor := StringToColor(FIni.ReadString('System', 'MarkUpColor', 'clGreen'));
594 MetaWordColor := StringToColor(FIni.ReadString('System', 'MetaWordColor', 'clBlue'));
595 MarkErrorColor := StringToColor(FIni.ReadString('System', 'MarkErrorColor', 'clRed'));
596 TextColor := StringToColor(FIni.ReadString('System', 'TextColor', ColorToString(TalkColorH)));
597 BgColor := StringToColor(FIni.ReadString('System', 'BgColor', 'clWhite'));
599 on EConvertError do begin
600 ShowMessage('
\83J
\83\89\81[
\82Ì
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
\83G
\83\89\81[');
601 FTalkColorH := clBlack;
602 FTalkColorU := clMaroon;
603 FMarkUpColor := clGreen;
604 FMetaWordColor := clBlue;
605 FMarkErrorColor := clRed;
606 FTextColor := clBlack;
611 if FIni.ReadString('System', 'PlayTimeParams', '') = '' then
613 FPlayTimeParams := TSsPlayTimeParams.Create(nil);
614 FPlayTimeParams.ProfileName := '
\83f
\83t
\83H
\83\8b\83g';
617 Strs := TStringList.Create;
619 Strs.CommaText := FIni.ReadString('System', 'PlayTimeParams', '');
620 FPlayTimeParams := StringToComponent(Strs.Text) as TSsPlayTimeParams;
628 ShowMessage('
\8dÄ
\90¶
\8e\9e\8aÔ
\97\
\91ª
\90Ý
\92è
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\83G
\83\89\81[' + E.Message);
629 if FPlayTimeParams = nil then
630 FPlayTimeParams := TSsPlayTimeParams.Create(nil);
634 WhenReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenReturn', 0));
635 WhenShiftReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenShiftReturn', 0));
636 WhenCtrlReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenCtrlReturn', 0));
637 //
\83\
\83P
\83b
\83g
\82ð
\83{
\83g
\83\8b\94z
\91\97\82ÌSSTP
\92Ê
\90M
\82É
\8eg
\97p
\82·
\82é
\8fê
\8d\87\82Ì
\90Ý
\92è
638 ServerPort := FIni.ReadInteger('System', 'ServerPort', 11000);
640 FBottleServer := FIni.ReadString('System', 'BottleServer', DefaultBottleServer);
641 FBottleServerPort := FIni.ReadInteger('System', 'BottleServerPort', DefaultBottleServerPort);
642 FCgiName := FIni.ReadString('System', 'CgiName', DefaultCGI);
643 FCgiFetchLog := FIni.ReadString('System', 'CgiFetchLog', DefaultCGIFetchLog);
644 FHomePage := FIni.ReadString('System', 'HomePage', DefaultHomePage);
645 FGLogPage := FIni.ReadString('System', 'GLogPage', DefaultGLogPage);
646 FVotePage := FIni.ReadString('System', 'VotePage', DefaultVotePage);
647 FHelpPage := FIni.ReadString('System', 'HelpPage', DefaultHelpPage);
648 FCgiNameGhost := FIni.ReadString('System', 'GHOST', DefaultCGIGhost);
649 FLUID := FIni.ReadString('System', 'LUID', '');
650 FAutoJoinChannels.CommaText := FIni.ReadString('System', 'AutoJoinChannels', '');
652 ARect.Top := FIni.ReadInteger('System', 'SenderWindowPositionTop', 100);
653 ARect.Left := FIni.ReadInteger('System', 'SenderWindowPositionLeft', 100);
654 ARect.Bottom := FIni.ReadInteger('System', 'SenderWindowPositionBottom', 500);
655 ARect.Right := FIni.ReadInteger('System', 'SenderWindowPositionRight', 500);
656 if not InScreen(ARect) then
657 ARect := Rect(100, 100, 500, 500);
658 SenderWindowPosition := ARect;
659 ARect.Top := FIni.ReadInteger('System', 'LogWindowPositionTop', 200);
660 ARect.Left := FIni.ReadInteger('System', 'LogWindowPositionLeft', 200);
661 ARect.Bottom := FIni.ReadInteger('System', 'LogWindowPositionBottom', 600);
662 ARect.Right := FIni.ReadInteger('System', 'LogWindowPositionRight', 400);
663 LogWindowDividerPos := FIni.ReadInteger('System', 'LogWindowDividerPos', 150);
664 LogWindowColumnWidth := FIni.ReadString('System', 'LogWindowColumnWidth', '');
665 if not InScreen(ARect) then begin
666 ARect := Rect(200, 200, 600, 400);
667 LogWindowDividerPos := 150;
669 LogWindowPosition := ARect;
670 Strs := TStringList.Create;
672 Strs.CommaText := FIni.ReadString('System', 'EditorPreviewWindowPosition', '500,100,800,500');
674 ARect.Left := StrToInt(Strs[0]);
675 ARect.Top := StrToInt(Strs[1]);
676 ARect.Right := StrToInt(Strs[2]);
677 ARect.Bottom := StrToInt(Strs[3]);
679 ARect := Rect(500, 100, 800, 500);
681 EditorPreviewWindowPosition := ARect;
686 UseHttpProxy := FIni.ReadBool('System', 'UseHttpProxy', false);
687 AskUseHttpProxy := FIni.ReadBool('System', 'AskUseHttpProxy', false);
688 ProxyAddress := FIni.ReadString('System', 'ProxyAddress', '');
689 ProxyPort := FIni.ReadInteger('System', 'ProxyPort', 0);
690 ProxyUser := FIni.ReadString('System', 'ProxyUser', '');
691 ProxyPass := FIni.ReadString('System', 'ProxyPass', '');
692 ProxyNeedAuthentication := FIni.ReadBool('System', 'ProxyNeedAuthentication', false);
694 ReconnectWait := FIni.ReadInteger('System', 'ReconnectWait', 6);
695 //
\83\8d\83O
\83E
\83B
\83\93\83h
\83E
\8aÖ
\8cW
696 LogWindowPreviewStyle := TLogWindowPreviewStyle(
697 FIni.ReadInteger('System', 'LogWindowPreviewStyle', 0));
698 LogListPreviewStyle := TLogListPreviewStyle(
699 FIni.ReadInteger('System', 'LogListPreviewStyle', 0));
701 FMOName.CommaText := FIni.ReadString('System', 'FMOName', 'Sakura');
702 HideGhosts := FIni.ReadBool('System', 'HideGhosts', false);
703 VisibleGhostsList.CommaText := FIni.ReadString('System', 'VisibleGhostsList', '');
704 NoExtraSSTPHeaders := FIni.ReadBool('System', 'NoExtraSSTPHeaders', false);
705 //
\83T
\81[
\83t
\83B
\83X
\83v
\83\8c\83r
\83\85\81[
706 SurfacePreviewOnHint := FIni.ReadBool('System', 'SurfacePreviewOnHint', false);
707 SurfacePreviewOnScriptPoint := FIni.ReadBool('System', 'SurfacePreviewOnScriptPoint', false);
708 SurfacePreviewOnScriptPointPosition :=
709 TSurfacePreviewOnScriptPointPosition(FIni.ReadInteger('System', 'SurfacePreviewOnScriptPointPosition', 0));
711 //URL
\82ð
\8aJ
\82
\83u
\83\89\83E
\83U
712 FBrowserExeName:= FIni.ReadString('System', 'BrowserExeName', '');
714 //
\8e©
\93®
\92u
\8a·
\83v
\83\8a\83Z
\83b
\83g
715 if FileExists(ReplacePresetFileName) then
718 Strs := TStringList.Create;
720 Strs.LoadFromFile(ReplacePresetFileName);
721 FReplacePresets := StringToComponent(Strs.Text) as TReplacePresets;
726 ShowMessage('Replace.txt
\93Ç
\82Ý
\8d\9e\82Ý
\92\86\82Ì
\83G
\83\89\81[
\81B'#13#10+
727 '
\83t
\83@
\83C
\83\8b\82ª
\94j
\91¹
\82µ
\82Ä
\82¢
\82é
\8fê
\8d\87\82Í
\81A
\82±
\82Ì
\83t
\83@
\83C
\83\8b\82ð
\8dí
\8f\9c\82µ
\82Ä
\8dÄ
\8bN
\93®
\82µ
\82Ä
\82
\82¾
\82³
\82¢');
731 FReplacePresets := TReplacePresets.Create(nil);
735 ShowMessage('
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
\83G
\83\89\81['#13#10 + E.Message);
736 Application.Terminate;
741 destructor TBottlePrefs.Destroy;
745 if FReplacePresets <> nil then
746 FReplacePresets.Free;
749 if FAutoJoinChannels <> nil then
750 FAutoJoinChannels.Free;
751 if FDefaultScript <> nil then
753 if FFMOName <> nil then
755 if FVisibleGhostsList <> nil then
756 FVisibleGhostsList.Free;
757 if FPlayTimeParams <> nil then
758 FPlayTimeParams.Free;
761 procedure TBottlePrefs.SetAutoStart(const Value: boolean);
766 procedure TBottlePrefs.SetBgColor(const Value: TColor);
771 procedure TBottlePrefs.SetConfirmOnExit(const Value: boolean);
773 FConfirmOnExit := Value;
776 procedure TBottlePrefs.SetDblClkInsert(const Value: boolean);
778 FDblClkInsert := Value;
781 procedure TBottlePrefs.SetDefaultScript(const Value: String);
783 FDefaultScript.Text := Value;
786 procedure TBottlePrefs.SetFixMessySurface(const Value: boolean);
788 FFixMessySurface := Value;
791 procedure TBottlePrefs.SetGhostDropDownCount(const Value: integer);
793 FGhostDropDownCount := Value;
796 procedure TBottlePrefs.SetIgnoreFrequentYenS(const Value: boolean);
798 FIgnoreFrequentYenS := Value;
801 procedure TBottlePrefs.SetIgnoreTimeCritical(const Value: boolean);
803 FIgnoreTimeCritical := Value;
806 procedure TBottlePrefs.SetLogWindowDividerPos(const Value: integer);
808 FLogWindowDividerPos := Value;
811 procedure TBottlePrefs.SetLogWindowPosition(const Value: TRect);
813 FLogWindowPosition := Value;
816 procedure TBottlePrefs.SetLUID(const Value: String);
821 procedure TBottlePrefs.SetMarkErrorColor(const Value: TColor);
823 FMarkErrorColor := Value;
826 procedure TBottlePrefs.SetTextColor(const Value: TColor);
831 procedure TBottlePrefs.SetMarkUpColor(const Value: TColor);
833 FMarkUpColor := Value;
836 procedure TBottlePrefs.SetMetaWordColor(const Value: TColor);
838 FMetaWordColor := Value;
841 procedure TBottlePrefs.SetNoConfirm(const Value: boolean);
846 procedure TBottlePrefs.SetNoDescript(const Value: boolean);
848 FNoDescript := Value;
851 procedure TBottlePrefs.SetNoTranslate(const Value: boolean);
853 FNoTranslate := Value;
856 procedure TBottlePrefs.SetNoTransUrl(const Value: boolean);
858 FNoTransUrl := Value;
861 procedure TBottlePrefs.SetLogWindowPreviewStyle(
862 const Value: TLogWindowPreviewStyle);
864 FLogWindowPreviewStyle := Value;
867 procedure TBottlePrefs.SetProxyAddress(const Value: String);
869 FProxyAddress := Value;
872 procedure TBottlePrefs.SetProxyPort(const Value: integer);
877 procedure TBottlePrefs.SetProxyNeedAuthentication(const Value: boolean);
879 FProxyNeedAuthentication := Value;
882 procedure TBottlePrefs.SetProxyPass(const Value: String);
887 procedure TBottlePrefs.SetProxyUser(const Value: String);
892 procedure TBottlePrefs.SetResetIfGhostAfterSend(const Value: boolean);
894 FResetIfGhostAfterSend := Value;
897 procedure TBottlePrefs.SetSenderWindowPosition(const Value: TRect);
899 FSenderWindowPosition := Value;
902 procedure TBottlePrefs.SetServerPort(const Value: integer);
904 if Value > 0 then FServerPort := Value;
907 procedure TBottlePrefs.SetShowConstBar(const Value: boolean);
909 FShowConstBar := Value;
912 procedure TBottlePrefs.SetShowToolBar(const Value: boolean);
914 FShowToolBar := Value;
917 procedure TBottlePrefs.SetSilentWhenHidden(const Value: boolean);
919 FSilentWhenHidden := Value;
922 procedure TBottlePrefs.SetStayOnTop(const Value: boolean);
927 procedure TBottlePrefs.SetTabPosition(const Value: TTabPosition);
929 FTabPosition := Value;
932 procedure TBottlePrefs.SetTalkColorH(const Value: TColor);
934 FTalkColorH := Value;
937 procedure TBottlePrefs.SetTalkColorU(const Value: TColor);
939 FTalkColorU := Value;
942 procedure TBottlePrefs.SetUseHttpProxy(const Value: boolean);
944 FUseHttpProxy := Value;
947 procedure TBottlePrefs.SetAskUseHttpProxy(const Value: boolean);
949 FAskUseHttpProxy := Value;
952 procedure TBottlePrefs.SetWaitScriptEnd(const Value: integer);
954 if Value > 0 then FWaitScriptEnd := Value;
957 procedure TBottlePrefs.SetMinScriptLength(const Value: integer);
959 if Value >= DefaultMinScriptLength then FMinScriptLength := Value;
962 procedure TBottlePrefs.SetWhenCtrlReturn(const Value: TReturnKeyFunction);
964 FWhenCtrlReturn := Value;
967 procedure TBottlePrefs.SetWhenReturn(const Value: TReturnKeyFunction);
969 FWhenReturn := Value;
972 procedure TBottlePrefs.SetWhenShiftReturn(const Value: TReturnKeyFunction);
974 FWhenShiftReturn := Value;
977 procedure TBottlePrefs.SetTalkColorS(const Value: TColor);
979 FTalkColorS := Value;
982 procedure TBottlePrefs.SetLogWindowColumnWidth(const Value: String);
984 FLogWindowColumnWidth := Value;
987 procedure TBottlePrefs.SetClearAfterSend(const Value: boolean);
989 FClearAfterSend := Value;
992 procedure TBottlePrefs.SetAutoJoinChannels(const Value: TStrings);
994 FAutoJoinChannels.Assign(Value);
997 procedure TBottlePrefs.SetFMOName(const Value: TStrings);
999 FFMOName.Assign(Value);
1002 procedure TBottlePrefs.SaveSettings;
1006 FIni.WriteString('System', 'PartialConfirmFormat', PartialConfirmFormat);
1007 FIni.WriteBool('System', 'AutoPartialConfirm', AutoPartialConfirm);
1008 FIni.WriteBool('System', 'ConfirmOnExit', ConfirmOnExit);
1009 FIni.WriteBool('System', 'ConfirmOnTabClose', ConfirmOnTabClose);
1010 FIni.WriteBool('System', 'AutoClip', AutoClip);
1011 FIni.WriteBool('System', 'AutoStart', AutoStart);
1012 FIni.WriteInteger('System', 'TabPosition', Ord(TabPosition));
1013 FIni.WriteInteger('System', 'TabWidth', TabWidth);
1014 FIni.WriteInteger('System', 'GhostDropDownCount', GhostDropDownCount);
1016 FIni.WriteBool('System', 'NoTranslate', NoTranslate);
1017 FIni.WriteBool('System', 'NoDescript', NoDescript);
1018 FIni.WriteBool('System', 'NoTransUrl', NoTransUrl);
1019 FIni.WriteBool('System', 'SilentWhenHidden', SilentWhenHidden);
1020 FIni.WriteBool('System', 'FixMessySurface', FixMessySurface);
1021 FIni.WriteBool('System', 'HUTagTo01Tag', HUTagTo01Tag);
1022 FIni.WriteBool('System', 'ResetIfGhostAfterSend', ResetIfGhostAfterSend);
1023 FIni.WriteBool('System', 'ClearAfterSend', ClearAfterSend);
1024 FIni.WriteBool('System', 'NeedConfirmBeforeSend', NeedConfirmBeforeSend);
1025 FIni.WriteBool('System', 'WarnYenTNotExist', WarnYenTNotExist);
1026 FIni.WriteBool('System', 'WarnScopeChangeInSynchronize', WarnScopeChangeInSynchronize);
1028 FIni.WriteBool('System', 'IgnoreFrequentYenS', IgnoreFrequentYenS);
1029 FIni.WriteInteger('System', 'WaitScriptEnd', WaitScriptEnd);
1030 FIni.WriteInteger('System', 'MinScriptLength', MinScriptLength);
1031 FIni.WriteBool('System', 'StayOnTop', StayOnTop);
1032 FIni.WriteBool('System', 'NoConfirm', NoConfirm);
1033 FIni.WriteBool('System', 'IgnoreTimeCritical', IgnoreTimeCritical);
1034 FIni.WriteString('System', 'TalkColorH', ColorToString(TalkColorH));
1035 FIni.WriteString('System', 'TalkColorU', ColorToString(TalkColorU));
1036 FIni.WriteString('System', 'TalkColorS', ColorToString(TalkColorS));
1037 FIni.WriteString('System', 'MarkUpColor', ColorToString(MarkUpColor));
1038 FIni.WriteString('System', 'MetaWordColor', ColorToString(MetaWordColor));
1039 FIni.WriteString('System', 'MarkErrorColor', ColorToString(MarkErrorColor));
1040 FIni.WriteString('System', 'TextColor', ColorToString(TextColor));
1042 Strs := TStringList.Create;
1044 Strs.Text := ComponentToString(FPlayTimeParams);
1045 FIni.WriteString('System', 'PlayTimeParams', Strs.CommaText);
1050 FIni.WriteString('System', 'BgColor', ColorToString(BgColor));
1051 FIni.WriteBool('System', 'ShowToolBar', ShowToolBar);
1052 FIni.WriteBool('System', 'ShowConstBar', ShowConstBar);
1053 FIni.WriteString('System', 'DefaultScript', FDefaultScript.CommaText);
1054 FIni.WriteBool('System', 'ShowRuler', ShowRuler);
1055 FIni.WriteInteger('System', 'WhenReturn', Ord(WhenReturn));
1056 FIni.WriteInteger('System', 'WhenShiftReturn', Ord(WhenShiftReturn));
1057 FIni.WriteInteger('System', 'WhenCtrlReturn', Ord(WhenCtrlReturn));
1058 FIni.WriteInteger('System', 'ServerPort', ServerPort);
1059 FIni.WriteString('System', 'LUID', LUID);
1060 FIni.WriteString('System', 'AutoJoinChannels', FAutoJoinChannels.CommaText);
1062 FIni.WriteInteger('System', 'SenderWindowPositionLeft', SenderWindowPosition.Left);
1063 FIni.WriteInteger('System', 'SenderWindowPositionTop', SenderWindowPosition.Top);
1064 FIni.WriteInteger('System', 'SenderWindowPositionRight', SenderWindowPosition.Right);
1065 FIni.WriteInteger('System', 'SenderWindowPositionBottom', SenderWindowPosition.Bottom);
1066 FIni.WriteInteger('System', 'LogWindowPositionLeft', LogWindowPosition.Left);
1067 FIni.WriteInteger('System', 'LogWindowPositionTop', LogWindowPosition.Top);
1068 FIni.WriteInteger('System', 'LogWindowPositionRight', LogWindowPosition.Right);
1069 FIni.WriteInteger('System', 'LogWindowPositionBottom', LogWindowPosition.Bottom);
1070 FIni.WriteInteger('System', 'LogWindowDividerPos', LogWindowDividerPos);
1071 FIni.WriteString('System', 'LogWindowColumnWidth', LogWindowColumnWidth);
1072 with EditorPreviewWindowPosition do
1073 FIni.WriteString('System', 'EditorPreviewWindowPosition',
1074 Format('%d,%d,%d,%d', [Left, Top, Right, Bottom]));
1076 FIni.WriteBool('System', 'UseHttpProxy', UseHttpProxy);
1077 FIni.WriteBool('System', 'AskUseHttpProxy', AskUseHttpProxy);
1078 FIni.WriteString('System', 'ProxyAddress', ProxyAddress);
1079 FIni.WriteInteger('System', 'ProxyPort', ProxyPort);
1080 FIni.WriteBool('System', 'ProxyNeedAuthentication', ProxyNeedAuthentication);
1081 FIni.WriteString('System', 'ProxyUser', ProxyUser);
1082 FIni.WriteString('System', 'ProxyPass', ProxyPass);
1084 FIni.WriteInteger('System', 'ReconnectWait', ReconnectWait);
1086 FIni.WriteInteger('System', 'LogWindowPreviewStyle', Ord(LogWindowPreviewStyle));
1087 FIni.WriteInteger('System', 'LogListPreviewStyle', Ord(LogListPreviewStyle));
1088 FIni.WriteString('System', 'FMOName', FFMOName.CommaText);
1089 FIni.WriteBool('System', 'HideGhosts', HideGhosts);
1090 FIni.WriteString('System', 'VisibleGhostsList', VisibleGhostsList.CommaText);
1091 FIni.WriteBool('System', 'NoExtraSSTPHeaders', NoExtraSSTPHeaders);
1093 FIni.WriteBool('System', 'SurfacePreviewOnHint', SurfacePreviewOnHint);
1094 FIni.WriteBool('System', 'SurfacePreviewOnScriptPoint', SurfacePreviewOnScriptPoint);
1095 FIni.WriteInteger('System', 'SurfacePreviewOnScriptPointPosition', Ord(SurfacePreviewOnScriptPointPosition));
1097 FIni.WriteString('System', 'BrowserExeName', BrowserExeName);
1098 FIni.WriteBool('System', 'NoWarnOfEmptyFMO', NoWarnOfEmptyFMO);
1099 FIni.WriteBool('System', 'ShowEditorPreviewWindow', ShowEditorPreviewWindow);
1100 FIni.WriteBool('System', 'LogItemDragDrop', LogItemDragDrop);
1102 Strs := TStringList.Create;
1104 Strs.Text := ComponentToString(FReplacePresets);
1105 Strs.SaveToFile(ReplacePresetFileName);
1111 function TBottlePrefs.GetDefaultScript: String;
1113 Result := FDefaultScript.Text;
1116 procedure TBottlePrefs.SetHUTagTo01Tag(const Value: boolean);
1118 FHUTagTo01Tag := Value;
1121 procedure TBottlePrefs.SetWarnScopeChangeInSynchronize(
1122 const Value: boolean);
1124 FWarnScopeChangeInSynchronize := Value;
1127 procedure TBottlePrefs.SetWarnYenTNotExist(const Value: boolean);
1129 FWarnYenTNotExist := Value;
1132 procedure TBottlePrefs.SetNeedConfirmBeforeSend(const Value: boolean);
1134 FNeedConfirmBeforeSend := Value;
1137 procedure TBottlePrefs.SetShowRuler(const Value: boolean);
1139 FShowRuler := Value;
1142 procedure TBottlePrefs.SetHideGhosts(const Value: boolean);
1144 FHideGhosts := Value;
1147 procedure TBottlePrefs.SetVisibleGhostsList(const Value: TStringList);
1149 FVisibleGhostsList.Assign(Value);
1152 procedure TBottlePrefs.SetSurfacePreviewOnHint(const Value: boolean);
1154 FSurfacePreviewOnHint := Value;
1157 procedure TBottlePrefs.SetSurfacePreviewOnScriptPoint(
1158 const Value: boolean);
1160 FSurfacePreviewOnScriptPoint := Value;
1163 procedure TBottlePrefs.SetSurfacePreviewOnScriptPointPosition(
1164 const Value: TSurfacePreviewOnScriptPointPosition);
1166 FSurfacePreviewOnScriptPointPosition := Value;
1169 procedure TBottlePrefs.SetNoExtraSSTPHeaders(const Value: boolean);
1171 FNoExtraSSTPHeaders := Value;
1174 procedure TBottlePrefs.SetLogListPreviewStyle(
1175 const Value: TLogListPreviewStyle);
1177 FLogListPreviewStyle := Value;
1180 procedure TBottlePrefs.SetEditorPreviewWindowPosition(const Value: TRect);
1182 FEditorPreviewWindowPosition := Value;
1185 function TBottlePrefs.InScreen(ARect: TRect): boolean;
1190 for i := 0 to Screen.MonitorCount-1 do
1192 if IntersectRect(dum, ARect, Screen.Monitors[i].WorkareaRect) then
1200 procedure TBottlePrefs.SetAutoClip(const Value: boolean);
1205 procedure TBottlePrefs.SetConfirmOnTabClose(const Value: boolean);
1207 FConfirmOnTabClose := Value;
1210 procedure TBottlePrefs.SetReconnectWait(const Value: integer);
1212 FReconnectWait := Value;
1214 raise Exception.Create('Reconnect wait must be >=6');
1217 procedure TBottlePrefs.SetPartialConfirmFormat(const Value: String);
1219 FPartialConfirmFormat := Value;
1222 procedure TBottlePrefs.SetAutoPartialConfirm(const Value: boolean);
1224 FAutoPartialConfirm := Value;
1227 procedure TBottlePrefs.SetPlayTimeParams(const Value: TSsPlayTimeParams);
1229 FPlayTimeParams.Assign(Value);
1232 procedure TBottlePrefs.SetTabWidth(const Value: integer);
1237 procedure TBottlePrefs.SetBrowserExeName(const Value: string);
1239 FBrowserExeName := Value;
1242 { TChannelListItem }
1244 procedure TChannelListItem.SetGhost(const Value: String);
1249 procedure TChannelListItem.SetInfo(const Value: String);
1254 procedure TChannelListItem.SetMembers(const Value: integer);
1259 procedure TChannelListItem.SetName(const Value: String);
1264 procedure TChannelListItem.SetNoPost(const Value: boolean);
1269 procedure TChannelListItem.SetWarnPost(const Value: boolean);
1276 procedure TChannelList.Clear;
1279 for i := Self.Count-1 downto 0 do begin
1280 TChannelListItem(Self[i]).Free;
1285 function TChannelList.GetChannel(Name: String): TChannelListItem;
1289 for i := 0 to Count-1 do
1290 if TChannelListItem(Self[i]).Name = Name then begin
1291 Result := TChannelListItem(Self[i]);
1296 function TChannelList.GetChannelItem(Index: integer): TChannelListItem;
1298 Result := TChannelListItem(Self[Index]);
1303 Classes.RegisterClass(TSsPlayTimeParams);
1305 Pref := TBottlePrefs.Create;
1306 ChannelList := TChannelList.Create;
1307 JoinChannels := TStringList.Create;