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)
26 FIgnoreTimeCritical: boolean;
28 FShowConstBar: boolean;
30 FDblClkInsert: boolean;
31 FShowToolBar: boolean;
32 FDefaultScript: TStringList;
34 FMetaWordColor: TColor;
36 FMarkErrorColor: TColor;
41 FWhenCtrlReturn: TReturnKeyFunction;
42 FWhenShiftReturn: TReturnKeyFunction;
43 FWhenReturn: TReturnKeyFunction;
44 FNoTranslate: boolean;
49 FSilentWhenHidden: boolean;
51 FSenderWindowPosition: TRect;
52 FTabPosition: TTabPosition;
53 FLogWindowPosition: TRect;
55 FIgnoreFrequentYenS: boolean;
56 FWaitScriptEnd: integer;
57 FCgiNameGhost: String;
60 FLogWindowDividerPos: integer;
62 FUseHttpProxy: boolean;
63 FAskUseHttpProxy: boolean;
65 FProxyAddress: String;
66 FConfirmOnExit: boolean;
67 FFixMessySurface: boolean;
68 FResetIfGhostAfterSend: boolean;
69 FGhostDropDownCount: integer;
70 FLogWindowPreviewStyle: TLogWindowPreviewStyle;
73 FLogWindowColumnWidth: String;
74 FClearAfterSend: boolean;
75 FAutoJoinChannels: TStrings;
77 FHUTagTo01Tag: boolean;
78 FWarnYenTNotExist: boolean;
79 FWarnScopeChangeInSynchronize: boolean;
80 FNeedConfirmBeforeSend: boolean;
83 FVisibleGhostsList: TStringList;
84 FSurfacePreviewOnHint: boolean;
85 FSurfacePreviewOnScriptPoint: boolean;
86 FSurfacePreviewOnScriptPointPosition: TSurfacePreviewOnScriptPointPosition;
87 FNoExtraSSTPHeaders: boolean;
88 FLogListPreviewStyle: TLogListPreviewStyle;
89 FEditorPreviewWindowPosition: TRect;
91 FConfirmOnTabClose: boolean;
92 FReconnectWait: integer;
93 FPartialConfirmFormat: String;
94 FAutoPartialConfirm: boolean;
95 FPlayTimeParams: TSsPlayTimeParams;
96 FBottleServerPort: integer;
97 FBottleServer: String;
99 FBrowserExeName: string;
100 FReplacePresets: TReplacePresets;
101 FNotWarnGhostIsntExists: Boolean;
102 //
\82â
\82³
\82®
\82ê
\95ª
103 FSendAction: boolean;
105 FScriptBackup: boolean;
106 FScriptBackupTime: integer;
109 FGhostChList: TStringList;
110 FNotShowLog: boolean;
111 FNotCheckClear: boolean;
112 FNotYenETrans: boolean;
113 FNotScriptTime: boolean;
114 FScriptBackupMode: boolean;
117 FNoDeleteBackupFile: boolean;
119 procedure SetDblClkInsert(const Value: boolean);
120 procedure SetDefaultScript(const Value: String);
121 procedure SetIgnoreTimeCritical(const Value: boolean);
122 procedure SetMarkErrorColor(const Value: TColor);
123 procedure SetMarkUpColor(const Value: TColor);
124 procedure SetMetaWordColor(const Value: TColor);
125 procedure SetTextColor(const Value: TColor);
126 procedure SetNoConfirm(const Value: boolean);
127 procedure SetShowConstBar(const Value: boolean);
128 procedure SetShowToolBar(const Value: boolean);
129 procedure SetStayOnTop(const Value: boolean);
130 procedure SetTalkColorH(const Value: TColor);
131 procedure SetTalkColorU(const Value: TColor);
132 procedure SetAutoStart(const Value: boolean);
133 procedure SetWhenCtrlReturn(const Value: TReturnKeyFunction);
134 procedure SetWhenReturn(const Value: TReturnKeyFunction);
135 procedure SetWhenShiftReturn(const Value: TReturnKeyFunction);
136 procedure SetNoTranslate(const Value: boolean);
137 procedure SetNoDescript(const Value: boolean);
138 procedure SetBgColor(const Value: TColor);
139 procedure SetServerPort(const Value: integer);
140 procedure SetSilentWhenHidden(const Value: boolean);
141 procedure SetLUID(const Value: String);
142 procedure SetSenderWindowPosition(const Value: TRect);
143 procedure SetTabPosition(const Value: TTabPosition);
144 procedure SetLogWindowPosition(const Value: TRect);
145 procedure SetIgnoreFrequentYenS(const Value: boolean);
146 procedure SetNoTransUrl(const Value: boolean);
147 procedure SetWaitScriptEnd(const Value: integer);
148 procedure SetLogWindowDividerPos(const Value: integer);
149 procedure SetProxyAddress(const Value: String);
150 procedure SetProxyPort(const Value: integer);
151 procedure SetUseHttpProxy(const Value: boolean);
152 procedure SetAskUseHttpProxy(const Value: boolean);
153 procedure SetConfirmOnExit(const Value: boolean);
154 procedure SetFixMessySurface(const Value: boolean);
155 procedure SetResetIfGhostAfterSend(const Value: boolean);
156 procedure SetGhostDropDownCount(const Value: integer);
157 procedure SetLogWindowPreviewStyle(const Value: TLogWindowPreviewStyle);
158 procedure SetTalkColorS(const Value: TColor);
159 procedure SetLogWindowColumnWidth(const Value: String);
160 procedure SetClearAfterSend(const Value: boolean);
161 procedure SetAutoJoinChannels(const Value: TStrings);
162 procedure SetFMOName(const Value: TStrings);
163 function GetDefaultScript: String;
164 procedure SetHUTagTo01Tag(const Value: boolean);
165 procedure SetWarnScopeChangeInSynchronize(const Value: boolean);
166 procedure SetWarnYenTNotExist(const Value: boolean);
167 procedure SetNeedConfirmBeforeSend(const Value: boolean);
168 procedure SetShowRuler(const Value: boolean);
169 procedure SetHideGhosts(const Value: boolean);
170 procedure SetVisibleGhostsList(const Value: TStringList);
171 procedure SetSurfacePreviewOnHint(const Value: boolean);
172 procedure SetSurfacePreviewOnScriptPoint(const Value: boolean);
173 procedure SetSurfacePreviewOnScriptPointPosition(
174 const Value: TSurfacePreviewOnScriptPointPosition);
175 procedure SetNoExtraSSTPHeaders(const Value: boolean);
176 procedure SetLogListPreviewStyle(const Value: TLogListPreviewStyle);
177 procedure SetEditorPreviewWindowPosition(const Value: TRect);
178 procedure SetAutoClip(const Value: boolean);
179 procedure SetConfirmOnTabClose(const Value: boolean);
180 procedure SetReconnectWait(const Value: integer);
181 procedure SetPartialConfirmFormat(const Value: String);
182 procedure SetAutoPartialConfirm(const Value: boolean);
183 procedure SetPlayTimeParams(const Value: TSsPlayTimeParams);
184 procedure SetTabWidth(const Value: integer);
185 procedure SetBrowserExeName(const Value: string);
186 procedure SetNotWarnGhostIsntExists(const Value: Boolean);
187 //
\82â
\82³
\82®
\82ê
\95ª
188 procedure SetSendAction(const Value: boolean);
189 procedure SetNotSSTP(const Value: boolean);
190 procedure SetScriptBackup(const Value: boolean);
191 procedure SetScriptBackupTime(const Value: integer);
192 procedure SetErrScript(const Value: boolean);
193 procedure SetGhostCh(const Value: boolean);
194 procedure SetGhostChList(const Value: TStringList);
195 procedure SetNotShowLog(const Value: boolean);
196 procedure SetNotCheckClear(const Value: boolean);
197 procedure SetNotYenETrans(const Value: boolean);
198 procedure SetNotScriptTime(const Value: boolean);
199 procedure SetScriptBackupMode(const Value: boolean);
200 procedure SetLogDir(const Value: String);
201 procedure SetTextDir(const Value: String);
202 procedure SetNoDeleteBackupFile(const Value: boolean);
204 function InScreen(ARect: TRect): boolean;
206 property BottleServer: String read FBottleServer;
207 property BottleServerPort: integer read FBottleServerPort;
208 property PartialConfirmFormat: String read FPartialConfirmFormat write SetPartialConfirmFormat;
209 property AutoPartialConfirm: boolean read FAutoPartialConfirm write SetAutoPartialConfirm;
210 property ConfirmOnExit: boolean read FConfirmOnExit write SetConfirmOnExit;
211 property ConfirmOnTabClose: boolean read FConfirmOnTabClose write SetConfirmOnTabClose;
212 property AutoClip: boolean read FAutoClip write SetAutoClip;
213 property AutoStart: boolean read FAutoStart write SetAutoStart;
214 property TabPosition: TTabPosition read FTabPosition write SetTabPosition;
215 property TabWidth: integer read FTabWidth write SetTabWidth;
216 property GhostDropDownCount: integer read FGhostDropDownCount write SetGhostDropDownCount;
217 property NoTranslate: boolean read FNoTranslate write SetNoTranslate;
218 property NoDescript: boolean read FNoDescript write SetNoDescript;
219 property NoTransUrl: boolean read FNoTransUrl write SetNoTransUrl;
220 property SilentWhenHidden: boolean read FSilentWhenHidden write SetSilentWhenHidden;
221 property FixMessySurface: boolean read FFixMessySurface write SetFixMessySurface;
222 property HUTagTo01Tag: boolean read FHUTagTo01Tag write SetHUTagTo01Tag;
223 property ResetIfGhostAfterSend: boolean read FResetIfGhostAfterSend write SetResetIfGhostAfterSend;
224 property ClearAfterSend: boolean read FClearAfterSend write SetClearAfterSend;
225 property NeedConfirmBeforeSend: boolean read FNeedConfirmBeforeSend write SetNeedConfirmBeforeSend;
226 property IgnoreFrequentYenS: boolean read FIgnoreFrequentYenS write SetIgnoreFrequentYenS;
227 property WarnYenTNotExist: boolean read FWarnYenTNotExist write SetWarnYenTNotExist;
228 property WarnScopeChangeInSynchronize: boolean read FWarnScopeChangeInSynchronize write SetWarnScopeChangeInSynchronize;
229 property WaitScriptEnd: integer read FWaitScriptEnd write SetWaitScriptEnd;
230 property StayOnTop: boolean read FStayOnTop write SetStayOnTop;
231 property IgnoreTimeCritical: boolean read FIgnoreTimeCritical write SetIgnoreTimeCritical;
232 property TalkColorH: TColor read FTalkColorH write SetTalkColorH;
233 property TalkColorU: TColor read FTalkColorU write SetTalkColorU;
234 property TalkColorS: TColor read FTalkColorS write SetTalkColorS;
235 property MarkUpColor: TColor read FMarkUpColor write SetMarkUpColor;
236 property MetaWordColor: TColor read FMetaWordColor write SetMetaWordColor;
237 property MarkErrorColor: TColor read FMarkErrorColor write SetMarkErrorColor;
238 property BgColor: TColor read FBgColor write SetBgColor;
239 property TextColor: TColor read FTextColor write SetTextColor;
240 property DefaultScript: String read GetDefaultScript write SetDefaultScript;
241 property ShowRuler: boolean read FShowRuler write SetShowRuler;
242 property DblClkInsert: boolean read FDblClkInsert write SetDblClkInsert;
243 property ShowToolBar: boolean read FShowToolBar write SetShowToolBar;
244 property ShowConstBar: boolean read FShowConstBar write SetShowConstBar;
245 property NoConfirm: boolean read FNoConfirm write SetNoConfirm;
246 property HomePage: string read FHomePage;
247 property WhenReturn: TReturnKeyFunction read FWhenReturn write SetWhenReturn;
248 property WhenShiftReturn: TReturnKeyFunction read FWhenShiftReturn write SetWhenShiftReturn;
249 property WhenCtrlReturn: TReturnKeyFunction read FWhenCtrlReturn write SetWhenCtrlReturn;
250 property ServerPort: integer read FServerPort write SetServerPort;
252 property CgiName: string read FCgiName;
253 property CgiNameGhost: String read FCgiNameGhost;
254 property CgiFetchLog: String read FCgiFetchLog;
255 property GLogPage: String read FGLogPage;
256 property VotePage: String read FVotePage;
257 property HelpPage: String read FHelpPage;
259 //
\83`
\83\83\83\93\83l
\83\8b\8aÖ
\8cW
260 property AutoJoinChannels: TStrings read FAutoJoinChannels write SetAutoJoinChannels;
262 property LUID: String read FLUID write SetLUID;
264 //
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
265 property SenderWindowPosition: TRect
266 read FSenderWindowPosition write SetSenderWindowPosition;
267 property LogWindowPosition: TRect read FLogWindowPosition write SetLogWindowPosition;
268 property LogWindowDividerPos: integer
269 read FLogWindowDividerPos write SetLogWindowDividerPos;
270 property LogWindowColumnWidth: String
271 read FLogWindowColumnWidth write SetLogWindowColumnWidth;
272 property EditorPreviewWindowPosition: TRect read FEditorPreviewWindowPosition write SetEditorPreviewWindowPosition;
273 //
\83v
\83\8d\83L
\83V
\8aÖ
\8cW
274 property UseHttpProxy: boolean read FUseHttpProxy write SetUseHttpProxy;
275 property AskUseHttpProxy: boolean read FAskUseHttpProxy write SetAskUseHttpProxy;
276 property ProxyAddress: String read FProxyAddress write SetProxyAddress;
277 property ProxyPort: integer read FProxyPort write SetProxyPort;
279 property ReconnectWait: integer read FReconnectWait write SetReconnectWait;
280 //
\83\8d\83O
\83E
\83B
\83\93\83h
\83E
\8aÖ
\8cW
281 property LogWindowPreviewStyle: TLogWindowPreviewStyle
282 read FLogWindowPreviewStyle write SetLogWindowPreviewStyle;
283 property LogListPreviewStyle: TLogListPreviewStyle
284 read FLogListPreviewStyle write SetLogListPreviewStyle;
286 property FMOName: TStrings read FFMOName write SetFMOName;
287 property HideGhosts: boolean read FHideGhosts write SetHideGhosts;
288 property VisibleGhostsList: TStringList read FVisibleGhostsList write SetVisibleGhostsList;
289 property NoExtraSSTPHeaders: boolean read FNoExtraSSTPHeaders write SetNoExtraSSTPHeaders;
290 //
\83T
\81[
\83t
\83B
\83X
\83v
\83\8c\83r
\83\85\81[
291 property SurfacePreviewOnHint: boolean
292 read FSurfacePreviewOnHint write SetSurfacePreviewOnHint;
293 property SurfacePreviewOnScriptPoint: boolean
294 read FSurfacePreviewOnScriptPoint write SetSurfacePreviewOnScriptPoint;
295 property SurfacePreviewOnScriptPointPosition: TSurfacePreviewOnScriptPointPosition
296 read FSurfacePreviewOnScriptPointPosition write SetSurfacePreviewOnScriptPointPosition;
297 //
\8dÄ
\90¶
\8e\9e\8aÔ
\97\
\91ª
298 property PlayTimeParams: TSsPlayTimeParams read FPlayTimeParams write SetPlayTimeParams;
299 //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¼
300 property BrowserExeName: string read FBrowserExeName write SetBrowserExeName;
301 //
\8e©
\93®
\92u
\8a·
\83v
\83\8a\83Z
\83b
\83g
302 property ReplacePresets: TReplacePresets read FReplacePresets;
303 //SSTP
\83T
\81[
\83o
\94ñ
\91¶
\8dÝ
\8cx
\8d\90\82Ì
\83J
\83b
\83g
\82ð
\82·
\82é
\82©
304 property NotWarnGhostIsntExists: Boolean
305 read FNotWarnGhostIsntExists write SetNotWarnGhostIsntExists;
306 //
\82â
\82³
\82®
\82ê
\95ª
307 property SendAction: boolean read FSendAction write SetSendACtion;
308 property NotSSTP: boolean read FNotSSTP write SetNotSSTP;
309 property ScriptBackup: boolean read FScriptBackup write SetScriptBackup;
310 property ScriptBackupTime: Integer read FScriptBackupTime write SetScriptBackupTime;
311 property ErrScript: boolean read FErrScript write SetErrScript;
312 property GhostCh: boolean read FGhostCh write SetGhostCh;
313 property GhostChList: TStringList read FGhostChList write SetGhostChList;
314 property NotShowLog: boolean read FNotShowLog write SetNotShowLog;
315 property NotCheckClear: boolean read FNotCheckClear write SetNotCheckClear;
316 property NotYenETrans: boolean read FNotYenETrans write SetNotYenETrans;
317 property NotScriptTime: boolean read FNotScriptTime write SetNotScriptTime;
318 property ScriptBackupMode: boolean read FScriptBackupMode write SetScriptBackupMode;
319 property LogDir: String read FLogDir write SetLogDir;
320 property TextDir: String read FTextDir write SetTextDir;
321 property NoDeleteBackupFile: boolean read FNoDeleteBackupFile write SetNoDeleteBackupFile;
323 //
\83R
\83\93\83X
\83g
\83\89\83N
\83^
\81E
\83f
\83X
\83g
\83\89\83N
\83^
\81E
\95Û
\91¶
325 destructor Destroy; override;
326 procedure SaveSettings;
329 TChannelListItem = class(TObject)
337 procedure SetGhost(const Value: String);
338 procedure SetInfo(const Value: String);
339 procedure SetMembers(const Value: integer);
340 procedure SetName(const Value: String);
341 procedure SetNoPost(const Value: boolean);
342 procedure SetWarnPost(const Value: boolean);
344 property Name: String read FName write SetName;
345 property Info: String read FInfo write SetInfo;
346 property Ghost: String read FGhost write SetGhost;
347 property Members: integer read FMembers write SetMembers;
348 property NoPost: boolean read FNoPost write SetNoPost;
349 property WarnPost: boolean read FWarnPost write SetWarnPost;
352 TChannelList = class(TList)
354 function GetChannel(Name: String): TChannelListItem;
355 function GetChannelItem(Index: integer): TChannelListItem;
357 procedure Clear; override;
358 property Channel[Name: String]: TChannelListItem read GetChannel;
359 property ChannelItem[Index: integer]: TChannelListItem read GetChannelItem;
362 TScriptTransOption = (
363 toIgnoreTimeCritical,
366 toIgnoreFrequentYenS,
374 TScriptTransOptions = set of TScriptTransOption;
378 ChannelList: TChannelList; //
\83`
\83\83\83\93\83l
\83\8b\83\8a\83X
\83g
\82ð
\95Û
\8e\9d\82·
\82é
379 //JoinChannels: TStringList; //
\8c»
\8dÝ
\8eQ
\89Á
\82µ
\82Ä
\82¢
\82é
\83`
\83\83\83\93\83l
\83\8b
382 DefaultBottleServer = 'bottle.mikage.to';
383 DefaultBottleServerPort = 9871;
384 DefaultCGI = '/bottle2.cgi';
385 DefaultCGIGhost = '/glog/bottleglog.cgi';
386 DefaultCGIFetchLog = '/fetchlog.cgi';
389 DefaultHomePage = 'http://bottle.mikage.to/';
390 DefaultGLogPage = 'http://bottle.mikage.to/glog/glogview.cgi';
391 DefaultVotePage = 'http://bottle.mikage.to/viewvotes.cgi';
392 DefaultHelpPage = 'http://bottle.mikage.to/clihelp/index.html';
394 Version = '1.02'; //2.69
\82©
\82ç
\95ª
\8aò
397 VersionString = 'SSTP Bottle Client ver ' + Version + 'a NO MUTEX VERSION';
399 VersionString = 'Yasagure Client ver ' + Version;
402 SentLogFile = 'sent.log';
404 BottleDisclaimer = '(C)2001-2004 WinBottle Project'#13#10 +
405 'naru, C.Ponapalt, Yune Kotomi, yese, Mikage Sawatari, E01'#13#10 +
408 ChannelDefault = '(CH
\90\84\8f§)';
409 ClipChannel = '(
\83N
\83\8a\83b
\83v)';
411 function ParamsEncode(const ASrc: string): string;
412 function XMLEntity(From: String): String;
413 function SafeFileName(From: String; ChangePathDelimiters: boolean = true): String;
414 function ComponentToString(Component: TComponent): string;
415 function StringToComponent(Value: string): TComponent;
417 function ReplacePresetFileName: string;
419 procedure BuildShortCutList(Target: TStrings);
423 function ParamsEncode(const ASrc: string): string;
427 UnsafeChars = ['*', '#', '%', '<', '>', ' ', '[', ']', '+'];
429 Result := ''; {Do not Localize}
430 for i := 1 to Length(ASrc) do
432 if (ASrc[i] in UnsafeChars) or (not (ord(ASrc[i])in [33..128])) then
433 begin {do not localize}
434 Result := Result + '%' + IntToHex(Ord(ASrc[i]), 2); {do not localize}
438 Result := Result + ASrc[i];
443 // XML
\8eÀ
\91Ì
\8eQ
\8fÆ
\82É
\92u
\82«
\8a·
\82¦
\82é
444 function XMLEntity(From: String): String;
451 for i := 1 to Length(From) do
456 Result := Result + From[i];
457 end else if From[i] in LeadBytes then
460 Result := Result + From[i];
464 60: Result := Result + '<'; // Less than
465 62: Result := Result + '>'; // Greater than
466 38: Result := Result + '&'; // Ampersand
467 39: Result := Result + '''; // Single quote
468 34: Result := Result + '"'; // Double quote
470 Result := Result + From[i];
476 // Escape characters which can not be used as a filename
477 function SafeFileName(From: String; ChangePathDelimiters: boolean = true): String;
479 Result := StringReplace(From, '*', '
\81\96', [rfReplaceAll]);
480 Result := StringReplace(Result, '|', '
\81b', [rfReplaceAll]);
481 Result := StringReplace(Result, '"', '''''', [rfReplaceAll]);
482 Result := StringReplace(Result, '<', '
\81\83', [rfReplaceAll]);
483 Result := StringReplace(Result, '>', '
\81\84', [rfReplaceAll]);
484 Result := StringReplace(Result, '?', '
\81H', [rfReplaceAll]);
485 if ChangePathDelimiters then
487 Result := StringReplace(Result, '\', '
\81\8f', [rfReplaceAll]);
488 Result := StringReplace(Result, ':', '
\81F', [rfReplaceAll]);
489 Result := StringReplace(Result, '/', '
\81^', [rfReplaceAll]);
493 function ComponentToString(Component: TComponent): string;
495 BinStream:TMemoryStream;
496 StrStream: TStringStream;
499 BinStream := TMemoryStream.Create;
501 StrStream := TStringStream.Create(s);
503 BinStream.WriteComponent(Component);
504 BinStream.Seek(0, soFromBeginning);
505 ObjectBinaryToText(BinStream, StrStream);
506 StrStream.Seek(0, soFromBeginning);
507 Result:= StrStream.DataString;
516 function StringToComponent(Value: string): TComponent;
518 StrStream:TStringStream;
519 BinStream: TMemoryStream;
521 StrStream := TStringStream.Create(Value);
523 BinStream := TMemoryStream.Create;
525 ObjectTextToBinary(StrStream, BinStream);
526 BinStream.Seek(0, soFromBeginning);
527 Result := BinStream.ReadComponent(nil);
536 function ReplacePresetFileName: string;
538 Result := ExtractFilePath(Application.ExeName) + 'replace.txt';
541 procedure BuildShortCutList(Target: TStrings);
546 //
\83V
\83\87\81[
\83g
\83J
\83b
\83g
\83\8a\83X
\83g
\82Ì
\91I
\91ð
\8e\88\82ð
\8dì
\90¬
551 for c := 'A' to 'Z' do
553 for c := 'A' to 'Z' do
554 Add('Shift+Ctrl+' + c);
555 for c := 'A' to 'Z' do
556 Add('Alt+Ctrl+' + c);
558 Add('F' + IntToStr(i));
560 Add('Shift+F' + IntToStr(i));
569 constructor TBottlePrefs.Create;
573 FAutoJoinChannels := TStringList.Create;
574 FDefaultScript := TStringList.Create;
575 FFMOName := TStringList.Create;
576 FVisibleGhostsList := TStringList.Create;
577 FGhostChList := TStringList.Create;
579 FIni := TIniFile.Create(ChangeFileExt(Application.ExeName, '.ini'));
580 FIni2 := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'YC.ini');
582 PartialConfirmFormat := FIni.ReadString('System', 'PartialConfirmFormat', '\t|\e');
583 AutoPartialConfirm := FIni.ReadBool('System', 'AutoPartialConfirm', false);
584 ConfirmOnExit := FIni.ReadBool('System', 'ConfirmOnExit', false);
585 ConfirmOnExit := FIni.ReadBool('System', 'ConfirmOnExit', false);
586 ConfirmOnTabClose := FIni.ReadBool('System', 'ConfirmOnTabClose', false);
587 AutoClip := FIni.ReadBool('System', 'AutoClip', false);
588 AutoStart := FIni.ReadBool('System', 'AutoStart', false);
589 TabPosition := TTabPosition(FIni.ReadInteger('System', 'TabPosition', 0));
590 TabWidth := FIni.ReadInteger('System', 'TabWidth', 0);
591 GhostDropDownCount := FIni.ReadInteger('System', 'GhostDropDownCount', 30);
593 NoTranslate := FIni.ReadBool('System', 'NoTranslate', true);
594 NoDescript := FIni.ReadBool('System', 'NoDescript', false);
595 NoTransUrl := FIni.ReadBool('System', 'NoTransUrl', false);
596 SilentWhenHidden:= FIni.ReadBool('System', 'SilentWhenHidden', true);
597 FixMessySurface := FIni.ReadBool('System', 'FixMessySurface', false);
598 HUTagTo01Tag := FIni.ReadBool('System', 'HUTagTo01Tag', false);
599 ResetIfGhostAfterSend := FIni.ReadBool('System', 'ResetIfGhostAfterSend', false);
600 ClearAfterSend := FIni.ReadBool('System', 'ClearAfterSend', true);
601 NeedConfirmBeforeSend := FIni.ReadBool('System', 'NeedConfirmBeforeSend', true);
602 WarnYenTNotExist := FIni.ReadBool('System', 'WarnYenTNotExist', false);
603 WarnScopeChangeInSynchronize := FIni.ReadBool('System', 'WarnScopeChangeInSynchronize', false);
605 IgnoreFrequentYenS := FIni.ReadBool('System', 'IgnoreFrequentYenS', false);
606 WaitScriptEnd := FIni.ReadInteger('System', 'WaitScriptEnd', 0);
607 StayOnTop := FIni.ReadBool('System', 'StayOnTop', false);
608 ShowConstBar := FIni.ReadBool('System', 'ShowConstBar', true);
609 ShowToolBar := FIni.ReadBool('System', 'ShowToolBar', true);
610 NoConfirm := FIni.ReadBool('System', 'NoConfirm', false);
611 IgnoreTimeCritical := FIni.ReadBool('System', 'IgnoreTimeCritical', false);
612 FDefaultScript.CommaText := FIni.ReadString('System', 'DefaultScript', '\t\u\s[10]\h\s[0]|\e');
613 ShowRuler := FIni.ReadBool('System', 'ShowRuler', false);
616 TalkColorH := StringToColor(FIni.ReadString('System', 'TalkColorH', 'clBlack'));
617 TalkColorU := StringToColor(FIni.ReadString('System', 'TalkColorU', 'clMaroon'));
618 TalkColorS := StringToColor(FIni.ReadString('System', 'TalkColorS', 'clPurple'));
619 MarkUpColor := StringToColor(FIni.ReadString('System', 'MarkUpColor', 'clGreen'));
620 MetaWordColor := StringToColor(FIni.ReadString('System', 'MetaWordColor', 'clBlue'));
621 MarkErrorColor := StringToColor(FIni.ReadString('System', 'MarkErrorColor', 'clRed'));
622 TextColor := StringToColor(FIni.ReadString('System', 'TextColor', ColorToString(TalkColorH)));
623 BgColor := StringToColor(FIni.ReadString('System', 'BgColor', 'clWhite'));
625 on EConvertError do begin
626 ShowMessage('
\83J
\83\89\81[
\82Ì
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
\83G
\83\89\81[');
627 FTalkColorH := clBlack;
628 FTalkColorU := clMaroon;
629 FMarkUpColor := clGreen;
630 FMetaWordColor := clBlue;
631 FMarkErrorColor := clRed;
632 FTextColor := clBlack;
637 if FIni.ReadString('System', 'PlayTimeParams', '') = '' then
639 FPlayTimeParams := TSsPlayTimeParams.Create(nil);
640 FPlayTimeParams.ProfileName := '
\83f
\83t
\83H
\83\8b\83g';
643 Strs := TStringList.Create;
645 Strs.CommaText := FIni.ReadString('System', 'PlayTimeParams', '');
646 FPlayTimeParams := StringToComponent(Strs.Text) as TSsPlayTimeParams;
654 ShowMessage('
\8dÄ
\90¶
\8e\9e\8aÔ
\97\
\91ª
\90Ý
\92è
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
\83G
\83\89\81[' + E.Message);
655 if FPlayTimeParams = nil then
656 FPlayTimeParams := TSsPlayTimeParams.Create(nil);
660 WhenReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenReturn', 0));
661 WhenShiftReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenShiftReturn', 0));
662 WhenCtrlReturn := TReturnKeyFunction(FIni.ReadInteger('System', 'WhenCtrlReturn', 0));
663 //
\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è
664 ServerPort := FIni.ReadInteger('System', 'ServerPort', 11000);
666 FBottleServer := FIni.ReadString('System', 'BottleServer', DefaultBottleServer);
667 FBottleServerPort := FIni.ReadInteger('System', 'BottleServerPort', DefaultBottleServerPort);
668 FCgiName := FIni.ReadString('System', 'CgiName', DefaultCGI);
669 FCgiFetchLog := FIni.ReadString('System', 'CgiFetchLog', DefaultCGIFetchLog);
670 FHomePage := FIni.ReadString('System', 'HomePage', DefaultHomePage);
671 FGLogPage := FIni.ReadString('System', 'GLogPage', DefaultGLogPage);
672 FVotePage := FIni.ReadString('System', 'VotePage', DefaultVotePage);
673 FHelpPage := FIni.ReadString('System', 'HelpPage', DefaultHelpPage);
674 FCgiNameGhost := FIni.ReadString('System', 'GHOST', DefaultCGIGhost);
675 FLUID := FIni.ReadString('System', 'LUID', '');
676 FAutoJoinChannels.CommaText := FIni.ReadString('System', 'AutoJoinChannels', '');
678 ARect.Top := FIni.ReadInteger('System', 'SenderWindowPositionTop', 100);
679 ARect.Left := FIni.ReadInteger('System', 'SenderWindowPositionLeft', 100);
680 ARect.Bottom := FIni.ReadInteger('System', 'SenderWindowPositionBottom', 500);
681 ARect.Right := FIni.ReadInteger('System', 'SenderWindowPositionRight', 500);
682 if not InScreen(ARect) then
683 ARect := Rect(100, 100, 500, 500);
684 SenderWindowPosition := ARect;
685 ARect.Top := FIni.ReadInteger('System', 'LogWindowPositionTop', 200);
686 ARect.Left := FIni.ReadInteger('System', 'LogWindowPositionLeft', 200);
687 ARect.Bottom := FIni.ReadInteger('System', 'LogWindowPositionBottom', 600);
688 ARect.Right := FIni.ReadInteger('System', 'LogWindowPositionRight', 400);
689 LogWindowDividerPos := FIni.ReadInteger('System', 'LogWindowDividerPos', 150);
690 LogWindowColumnWidth := FIni.ReadString('System', 'LogWindowColumnWidth', '');
691 if not InScreen(ARect) then begin
692 ARect := Rect(200, 200, 600, 400);
693 LogWindowDividerPos := 150;
695 LogWindowPosition := ARect;
696 Strs := TStringList.Create;
698 Strs.CommaText := FIni.ReadString('System', 'EditorPreviewWindowPosition', '500,100,800,500');
700 ARect.Left := StrToInt(Strs[0]);
701 ARect.Top := StrToInt(Strs[1]);
702 ARect.Right := StrToInt(Strs[2]);
703 ARect.Bottom := StrToInt(Strs[3]);
705 ARect := Rect(500, 100, 800, 500);
707 EditorPreviewWindowPosition := ARect;
712 UseHttpProxy := FIni.ReadBool('System', 'UseHttpProxy', false);
713 AskUseHttpProxy := FIni.ReadBool('System', 'AskUseHttpProxy', false);
714 ProxyAddress := FIni.ReadString('System', 'ProxyAddress', '');
715 ProxyPort := FIni.ReadInteger('System', 'ProxyPort', 0);
717 ReconnectWait := FIni.ReadInteger('System', 'ReconnectWait', 6);
718 //
\83\8d\83O
\83E
\83B
\83\93\83h
\83E
\8aÖ
\8cW
719 LogWindowPreviewStyle := TLogWindowPreviewStyle(
720 FIni.ReadInteger('System', 'LogWindowPreviewStyle', 0));
721 LogListPreviewStyle := TLogListPreviewStyle(
722 FIni.ReadInteger('System', 'LogListPreviewStyle', 0));
724 FMOName.CommaText := FIni.ReadString('System', 'FMOName', 'Sakura');
725 HideGhosts := FIni.ReadBool('System', 'HideGhosts', false);
726 VisibleGhostsList.CommaText := FIni.ReadString('System', 'VisibleGhostsList', '');
727 NoExtraSSTPHeaders := FIni.ReadBool('System', 'NoExtraSSTPHeaders', false);
728 //
\83T
\81[
\83t
\83B
\83X
\83v
\83\8c\83r
\83\85\81[
729 SurfacePreviewOnHint := FIni.ReadBool('System', 'SurfacePreviewOnHint', false);
730 SurfacePreviewOnScriptPoint := FIni.ReadBool('System', 'SurfacePreviewOnScriptPoint', false);
731 SurfacePreviewOnScriptPointPosition :=
732 TSurfacePreviewOnScriptPointPosition(FIni.ReadInteger('System', 'SurfacePreviewOnScriptPointPosition', 0));
734 //URL
\82ð
\8aJ
\82
\83u
\83\89\83E
\83U
735 BrowserExeName:= FIni.ReadString('System', 'BrowserExeName', '');
736 NotWarnGhostIsntExists := FIni.ReadBool('System', 'NotWarnGhostIsntExists', False);
738 //
\8e©
\93®
\92u
\8a·
\83v
\83\8a\83Z
\83b
\83g
739 if FileExists(ReplacePresetFileName) then
742 Strs := TStringList.Create;
744 Strs.LoadFromFile(ReplacePresetFileName);
745 FReplacePresets := StringToComponent(Strs.Text) as TReplacePresets;
750 ShowMessage('Replace.txt
\93Ç
\82Ý
\8d\9e\82Ý
\92\86\82Ì
\83G
\83\89\81[
\81B'#13#10+
751 '
\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¢');
755 FReplacePresets := TReplacePresets.Create(nil);
756 //
\82â
\82³
\82®
\82ê
\95ª
757 SendAction := FIni2.ReadBool('System', 'SendAction', false);
758 NotSSTP := FIni2.ReadBool('System', 'NotSSTP', false);
759 ScriptBackup := FIni2.ReadBool('System', 'ScriptBackup', false);
760 ScriptBackupTime := FIni2.ReadInteger('System', 'ScriptBackupTime', 3);
761 ErrScript := FIni2.ReadBool('System', 'ErrScript', false);
762 GhostCh := FIni2.ReadBool('System', 'GhostCh', false);
763 GhostChList.CommaText := FIni2.ReadString('System', 'GhostChList', '');
764 NotShowLog := FIni2.ReadBool('System', 'NotShowLog', false);
765 NotCheckClear := FIni2.ReadBool('System', 'NotCheckClear', false);
766 NotYenETrans := FIni2.ReadBool('System', 'NotYenETrans', false);
767 NotScriptTime := FIni2.ReadBool('System', 'NotScriptTime', true);
768 ScriptBackupMode := FIni2.ReadBool('System', 'ScriptBackupMode', false);
769 LogDir := FIni2.ReadString('System', 'LogDir', '');
770 TextDir := FIni2.ReadString('System', 'TextDir', '');
771 NoDeleteBackupFile := FIni2.ReadBool('System', 'NoDeleteBackupFile', false);
776 ShowMessage('
\90Ý
\92è
\93Ç
\82Ý
\8d\9e\82Ý
\83G
\83\89\81['#13#10 + E.Message);
777 Application.Terminate;
782 destructor TBottlePrefs.Destroy;
786 if FReplacePresets <> nil then
787 FReplacePresets.Free;
792 if FAutoJoinChannels <> nil then
793 FAutoJoinChannels.Free;
794 if FDefaultScript <> nil then
796 if FFMOName <> nil then
798 if FVisibleGhostsList <> nil then
799 FVisibleGhostsList.Free;
800 if FGhostChList <> nil then
802 if FPlayTimeParams <> nil then
803 FPlayTimeParams.Free;
806 procedure TBottlePrefs.SetAutoStart(const Value: boolean);
811 procedure TBottlePrefs.SetBgColor(const Value: TColor);
816 procedure TBottlePrefs.SetConfirmOnExit(const Value: boolean);
818 FConfirmOnExit := Value;
821 procedure TBottlePrefs.SetDblClkInsert(const Value: boolean);
823 FDblClkInsert := Value;
826 procedure TBottlePrefs.SetDefaultScript(const Value: String);
828 FDefaultScript.Text := Value;
831 procedure TBottlePrefs.SetFixMessySurface(const Value: boolean);
833 FFixMessySurface := Value;
836 procedure TBottlePrefs.SetGhostDropDownCount(const Value: integer);
838 FGhostDropDownCount := Value;
841 procedure TBottlePrefs.SetIgnoreFrequentYenS(const Value: boolean);
843 FIgnoreFrequentYenS := Value;
846 procedure TBottlePrefs.SetIgnoreTimeCritical(const Value: boolean);
848 FIgnoreTimeCritical := Value;
851 procedure TBottlePrefs.SetLogWindowDividerPos(const Value: integer);
853 FLogWindowDividerPos := Value;
856 procedure TBottlePrefs.SetLogWindowPosition(const Value: TRect);
858 FLogWindowPosition := Value;
861 procedure TBottlePrefs.SetLUID(const Value: String);
866 procedure TBottlePrefs.SetMarkErrorColor(const Value: TColor);
868 FMarkErrorColor := Value;
871 procedure TBottlePrefs.SetTextColor(const Value: TColor);
876 procedure TBottlePrefs.SetMarkUpColor(const Value: TColor);
878 FMarkUpColor := Value;
881 procedure TBottlePrefs.SetMetaWordColor(const Value: TColor);
883 FMetaWordColor := Value;
886 procedure TBottlePrefs.SetNoConfirm(const Value: boolean);
891 procedure TBottlePrefs.SetNoDescript(const Value: boolean);
893 FNoDescript := Value;
896 procedure TBottlePrefs.SetNoTranslate(const Value: boolean);
898 FNoTranslate := Value;
901 procedure TBottlePrefs.SetNoTransUrl(const Value: boolean);
903 FNoTransUrl := Value;
906 procedure TBottlePrefs.SetLogWindowPreviewStyle(
907 const Value: TLogWindowPreviewStyle);
909 FLogWindowPreviewStyle := Value;
912 procedure TBottlePrefs.SetProxyAddress(const Value: String);
914 FProxyAddress := Value;
917 procedure TBottlePrefs.SetProxyPort(const Value: integer);
922 procedure TBottlePrefs.SetResetIfGhostAfterSend(const Value: boolean);
924 FResetIfGhostAfterSend := Value;
927 procedure TBottlePrefs.SetSenderWindowPosition(const Value: TRect);
929 FSenderWindowPosition := Value;
932 procedure TBottlePrefs.SetServerPort(const Value: integer);
934 if Value > 0 then FServerPort := Value;
937 procedure TBottlePrefs.SetShowConstBar(const Value: boolean);
939 FShowConstBar := Value;
942 procedure TBottlePrefs.SetShowToolBar(const Value: boolean);
944 FShowToolBar := Value;
947 procedure TBottlePrefs.SetSilentWhenHidden(const Value: boolean);
949 FSilentWhenHidden := Value;
952 procedure TBottlePrefs.SetStayOnTop(const Value: boolean);
957 procedure TBottlePrefs.SetTabPosition(const Value: TTabPosition);
959 FTabPosition := Value;
962 procedure TBottlePrefs.SetTalkColorH(const Value: TColor);
964 FTalkColorH := Value;
967 procedure TBottlePrefs.SetTalkColorU(const Value: TColor);
969 FTalkColorU := Value;
972 procedure TBottlePrefs.SetUseHttpProxy(const Value: boolean);
974 FUseHttpProxy := Value;
977 procedure TBottlePrefs.SetAskUseHttpProxy(const Value: boolean);
979 FAskUseHttpProxy := Value;
982 procedure TBottlePrefs.SetWaitScriptEnd(const Value: integer);
984 if Value > 0 then FWaitScriptEnd := Value;
987 procedure TBottlePrefs.SetWhenCtrlReturn(const Value: TReturnKeyFunction);
989 FWhenCtrlReturn := Value;
992 procedure TBottlePrefs.SetWhenReturn(const Value: TReturnKeyFunction);
994 FWhenReturn := Value;
997 procedure TBottlePrefs.SetWhenShiftReturn(const Value: TReturnKeyFunction);
999 FWhenShiftReturn := Value;
1002 procedure TBottlePrefs.SetTalkColorS(const Value: TColor);
1004 FTalkColorS := Value;
1007 procedure TBottlePrefs.SetLogWindowColumnWidth(const Value: String);
1009 FLogWindowColumnWidth := Value;
1012 procedure TBottlePrefs.SetClearAfterSend(const Value: boolean);
1014 FClearAfterSend := Value;
1017 procedure TBottlePrefs.SetAutoJoinChannels(const Value: TStrings);
1019 FAutoJoinChannels.Assign(Value);
1022 procedure TBottlePrefs.SetFMOName(const Value: TStrings);
1024 FFMOName.Assign(Value);
1027 procedure TBottlePrefs.SaveSettings;
1031 FIni.WriteString('System', 'PartialConfirmFormat', PartialConfirmFormat);
1032 FIni.WriteBool('System', 'AutoPartialConfirm', AutoPartialConfirm);
1033 FIni.WriteBool('System', 'ConfirmOnExit', ConfirmOnExit);
1034 FIni.WriteBool('System', 'ConfirmOnTabClose', ConfirmOnTabClose);
1035 FIni.WriteBool('System', 'AutoClip', AutoClip);
1036 FIni.WriteBool('System', 'AutoStart', AutoStart);
1037 FIni.WriteInteger('System', 'TabPosition', Ord(TabPosition));
1038 FIni.WriteInteger('System', 'TabWidth', TabWidth);
1039 FIni.WriteInteger('System', 'GhostDropDownCount', GhostDropDownCount);
1041 FIni.WriteBool('System', 'NoTranslate', NoTranslate);
1042 FIni.WriteBool('System', 'NoDescript', NoDescript);
1043 FIni.WriteBool('System', 'NoTransUrl', NoTransUrl);
1044 FIni.WriteBool('System', 'SilentWhenHidden', SilentWhenHidden);
1045 FIni.WriteBool('System', 'FixMessySurface', FixMessySurface);
1046 FIni.WriteBool('System', 'HUTagTo01Tag', HUTagTo01Tag);
1047 FIni.WriteBool('System', 'ResetIfGhostAfterSend', ResetIfGhostAfterSend);
1048 FIni.WriteBool('System', 'ClearAfterSend', ClearAfterSend);
1049 FIni.WriteBool('System', 'NeedConfirmBeforeSend', NeedConfirmBeforeSend);
1050 FIni.WriteBool('System', 'WarnYenTNotExist', WarnYenTNotExist);
1051 FIni.WriteBool('System', 'WarnScopeChangeInSynchronize', WarnScopeChangeInSynchronize);
1053 FIni.WriteBool('System', 'IgnoreFrequentYenS', IgnoreFrequentYenS);
1054 FIni.WriteInteger('System', 'WaitScriptEnd', WaitScriptEnd);
1055 FIni.WriteBool('System', 'StayOnTop', StayOnTop);
1056 FIni.WriteBool('System', 'NoConfirm', NoConfirm);
1057 FIni.WriteBool('System', 'IgnoreTimeCritical', IgnoreTimeCritical);
1058 FIni.WriteString('System', 'TalkColorH', ColorToString(TalkColorH));
1059 FIni.WriteString('System', 'TalkColorU', ColorToString(TalkColorU));
1060 FIni.WriteString('System', 'TalkColorS', ColorToString(TalkColorS));
1061 FIni.WriteString('System', 'MarkUpColor', ColorToString(MarkUpColor));
1062 FIni.WriteString('System', 'MetaWordColor', ColorToString(MetaWordColor));
1063 FIni.WriteString('System', 'MarkErrorColor', ColorToString(MarkErrorColor));
1064 FIni.WriteString('System', 'TextColor', ColorToString(TextColor));
1066 Strs := TStringList.Create;
1068 Strs.Text := ComponentToString(FPlayTimeParams);
1069 FIni.WriteString('System', 'PlayTimeParams', Strs.CommaText);
1074 FIni.WriteString('System', 'BgColor', ColorToString(BgColor));
1075 FIni.WriteBool('System', 'ShowToolBar', ShowToolBar);
1076 FIni.WriteBool('System', 'ShowConstBar', ShowConstBar);
1077 FIni.WriteString('System', 'DefaultScript', FDefaultScript.CommaText);
1078 FIni.WriteBool('System', 'ShowRuler', ShowRuler);
1079 FIni.WriteInteger('System', 'WhenReturn', Ord(WhenReturn));
1080 FIni.WriteInteger('System', 'WhenShiftReturn', Ord(WhenShiftReturn));
1081 FIni.WriteInteger('System', 'WhenCtrlReturn', Ord(WhenCtrlReturn));
1082 FIni.WriteInteger('System', 'ServerPort', ServerPort);
1083 FIni.WriteString('System', 'LUID', LUID);
1084 FIni.WriteString('System', 'AutoJoinChannels', FAutoJoinChannels.CommaText);
1086 FIni.WriteInteger('System', 'SenderWindowPositionLeft', SenderWindowPosition.Left);
1087 FIni.WriteInteger('System', 'SenderWindowPositionTop', SenderWindowPosition.Top);
1088 FIni.WriteInteger('System', 'SenderWindowPositionRight', SenderWindowPosition.Right);
1089 FIni.WriteInteger('System', 'SenderWindowPositionBottom', SenderWindowPosition.Bottom);
1090 FIni.WriteInteger('System', 'LogWindowPositionLeft', LogWindowPosition.Left);
1091 FIni.WriteInteger('System', 'LogWindowPositionTop', LogWindowPosition.Top);
1092 FIni.WriteInteger('System', 'LogWindowPositionRight', LogWindowPosition.Right);
1093 FIni.WriteInteger('System', 'LogWindowPositionBottom', LogWindowPosition.Bottom);
1094 FIni.WriteInteger('System', 'LogWindowDividerPos', LogWindowDividerPos);
1095 FIni.WriteString('System', 'LogWindowColumnWidth', LogWindowColumnWidth);
1096 with EditorPreviewWindowPosition do
1097 FIni.WriteString('System', 'EditorPreviewWindowPosition',
1098 Format('%d,%d,%d,%d', [Left, Top, Right, Bottom]));
1100 FIni.WriteBool('System', 'UseHttpProxy', UseHttpProxy);
1101 FIni.WriteBool('System', 'AskUseHttpProxy', AskUseHttpProxy);
1102 FIni.WriteString('System', 'ProxyAddress', ProxyAddress);
1103 FIni.WriteInteger('System', 'ProxyPort', ProxyPort);
1105 FIni.WriteInteger('System', 'ReconnectWait', ReconnectWait);
1107 FIni.WriteInteger('System', 'LogWindowPreviewStyle', Ord(LogWindowPreviewStyle));
1108 FIni.WriteInteger('System', 'LogListPreviewStyle', Ord(LogListPreviewStyle));
1109 FIni.WriteString('System', 'FMOName', FFMOName.CommaText);
1110 FIni.WriteBool('System', 'HideGhosts', HideGhosts);
1111 FIni.WriteString('System', 'VisibleGhostsList', VisibleGhostsList.CommaText);
1112 FIni.WriteBool('System', 'NoExtraSSTPHeaders', NoExtraSSTPHeaders);
1114 FIni.WriteBool('System', 'SurfacePreviewOnHint', SurfacePreviewOnHint);
1115 FIni.WriteBool('System', 'SurfacePreviewOnScriptPoint', SurfacePreviewOnScriptPoint);
1116 FIni.WriteInteger('System', 'SurfacePreviewOnScriptPointPosition', Ord(SurfacePreviewOnScriptPointPosition));
1118 FIni.WriteString('System', 'BrowserExeName', BrowserExeName);
1119 FIni.WriteBool('System', 'NotWarnGhostIsntExists', NotWarnGhostIsntExists);
1121 Strs := TStringList.Create;
1123 Strs.Text := ComponentToString(FReplacePresets);
1124 Strs.SaveToFile(ReplacePresetFileName);
1129 //
\82â
\82³
\82®
\82ê
\95ª
1130 FIni2.WriteBool('System', 'SendAction', SendAction);
1131 FIni2.WriteBool('System', 'NotSSTP', NotSSTP);
1132 FIni2.WriteBool('System', 'ScriptBackup', ScriptBackup);
1133 FIni2.WriteInteger('System', 'ScriptBackupTime', ScriptBackupTime);
1134 FIni2.WriteBool('System', 'ErrScript', ErrScript);
1135 FIni2.WriteBool('System', 'GhostCh', GhostCh);
1136 FIni2.WriteString('System', 'GhostChList', GhostChList.CommaText);
1137 FIni2.WriteBool('System', 'NotShowLog', NotShowLog);
1138 FIni2.WriteBool('System', 'NotCheckClear', NotCheckClear);
1139 FIni2.WriteBool('System', 'NotYenETrans', NotYenETrans);
1140 FIni2.WriteBool('System', 'NotScriptTime', NotScriptTime);
1141 FIni2.WriteBool('System', 'ScriptBackupMode', ScriptBackupMode);
1142 FIni2.WriteString('System', 'LogDir', LogDir);
1143 FIni2.WriteString('System', 'TextDir', TextDir);
1144 FIni2.WriteBool('System', 'NoDeleteBackupFile', NoDeleteBackupFile);
1147 function TBottlePrefs.GetDefaultScript: String;
1149 Result := FDefaultScript.Text;
1152 procedure TBottlePrefs.SetHUTagTo01Tag(const Value: boolean);
1154 FHUTagTo01Tag := Value;
1157 procedure TBottlePrefs.SetWarnScopeChangeInSynchronize(
1158 const Value: boolean);
1160 FWarnScopeChangeInSynchronize := Value;
1163 procedure TBottlePrefs.SetWarnYenTNotExist(const Value: boolean);
1165 FWarnYenTNotExist := Value;
1168 procedure TBottlePrefs.SetNeedConfirmBeforeSend(const Value: boolean);
1170 FNeedConfirmBeforeSend := Value;
1173 procedure TBottlePrefs.SetShowRuler(const Value: boolean);
1175 FShowRuler := Value;
1178 procedure TBottlePrefs.SetHideGhosts(const Value: boolean);
1180 FHideGhosts := Value;
1183 procedure TBottlePrefs.SetVisibleGhostsList(const Value: TStringList);
1185 FVisibleGhostsList.Assign(Value);
1188 procedure TBottlePrefs.SetSurfacePreviewOnHint(const Value: boolean);
1190 FSurfacePreviewOnHint := Value;
1193 procedure TBottlePrefs.SetSurfacePreviewOnScriptPoint(
1194 const Value: boolean);
1196 FSurfacePreviewOnScriptPoint := Value;
1199 procedure TBottlePrefs.SetSurfacePreviewOnScriptPointPosition(
1200 const Value: TSurfacePreviewOnScriptPointPosition);
1202 FSurfacePreviewOnScriptPointPosition := Value;
1205 procedure TBottlePrefs.SetNoExtraSSTPHeaders(const Value: boolean);
1207 FNoExtraSSTPHeaders := Value;
1210 procedure TBottlePrefs.SetLogListPreviewStyle(
1211 const Value: TLogListPreviewStyle);
1213 FLogListPreviewStyle := Value;
1216 procedure TBottlePrefs.SetEditorPreviewWindowPosition(const Value: TRect);
1218 FEditorPreviewWindowPosition := Value;
1221 function TBottlePrefs.InScreen(ARect: TRect): boolean;
1226 for i := 0 to Screen.MonitorCount-1 do
1228 if IntersectRect(dum, ARect, Screen.Monitors[i].WorkareaRect) then
1236 procedure TBottlePrefs.SetAutoClip(const Value: boolean);
1241 procedure TBottlePrefs.SetConfirmOnTabClose(const Value: boolean);
1243 FConfirmOnTabClose := Value;
1246 procedure TBottlePrefs.SetReconnectWait(const Value: integer);
1248 FReconnectWait := Value;
1250 raise Exception.Create('Reconnect wait must be >=6');
1253 procedure TBottlePrefs.SetPartialConfirmFormat(const Value: String);
1255 FPartialConfirmFormat := Value;
1258 procedure TBottlePrefs.SetAutoPartialConfirm(const Value: boolean);
1260 FAutoPartialConfirm := Value;
1263 procedure TBottlePrefs.SetPlayTimeParams(const Value: TSsPlayTimeParams);
1265 FPlayTimeParams.Assign(Value);
1268 procedure TBottlePrefs.SetTabWidth(const Value: integer);
1273 procedure TBottlePrefs.SetBrowserExeName(const Value: string);
1275 FBrowserExeName := Value;
1278 procedure TBottlePrefs.SetNotWarnGhostIsntExists(const Value: boolean);
1280 FNotWarnGhostIsntExists := Value;
1283 { TChannelListItem }
1285 procedure TChannelListItem.SetGhost(const Value: String);
1290 procedure TChannelListItem.SetInfo(const Value: String);
1295 procedure TChannelListItem.SetMembers(const Value: integer);
1300 procedure TChannelListItem.SetName(const Value: String);
1305 procedure TChannelListItem.SetNoPost(const Value: boolean);
1310 procedure TChannelListItem.SetWarnPost(const Value: boolean);
1317 procedure TChannelList.Clear;
1320 for i := Self.Count-1 downto 0 do begin
1321 TChannelListItem(Self[i]).Free;
1326 function TChannelList.GetChannel(Name: String): TChannelListItem;
1330 for i := 0 to Count-1 do
1331 if TChannelListItem(Self[i]).Name = Name then begin
1332 Result := TChannelListItem(Self[i]);
1337 function TChannelList.GetChannelItem(Index: integer): TChannelListItem;
1339 Result := TChannelListItem(Self[Index]);
1342 //
\82â
\82³
\82®
\82ê
\95ª
1343 procedure TBottlePrefs.SetSendAction(const Value: boolean);
1345 FSendAction := Value;
1348 procedure TBottlePrefs.SetNotSSTP(const Value: boolean);
1353 procedure TBottlePrefs.SetScriptBackup(const Value: boolean);
1355 FScriptBackup := Value;
1358 procedure TBottlePrefs.SetScriptBackupTime(const Value: Integer);
1360 FScriptBackupTime := Value;
1363 procedure TBottlePrefs.SetErrScript(const Value: boolean);
1365 FErrScript := Value;
1368 procedure TBottlePrefs.SetGhostCh(const Value: boolean);
1373 procedure TBottlePrefs.SetGhostChList(const Value: TStringList);
1375 FGhostChList.Assign(Value);
1378 procedure TBottlePrefs.SetNotShowLog(const Value: boolean);
1380 FNotShowLog := Value;
1383 procedure TBottlePrefs.SetNotCheckClear(const Value: boolean);
1385 FNotCheckClear := Value;
1388 procedure TBottlePrefs.SetNotYenETrans(const Value: boolean);
1390 FNotYenETrans := Value;
1393 procedure TBottlePrefs.SetNotScriptTime(const Value: boolean);
1395 FNotScriptTime := Value;
1398 procedure TBottlePrefs.SetScriptBackupMode(const Value: boolean);
1400 FScriptBackupMode := Value;
1403 procedure TBottlePrefs.SetLogDir(const Value: String);
1408 procedure TBottlePrefs.SetTextDir(const Value: String);
1413 procedure TBottlePrefs.SetNoDeleteBackupFile(const Value: boolean);
1415 FNoDeleteBackupFile := Value;
1420 Classes.RegisterClass(TSsPlayTimeParams);
1422 Pref := TBottlePrefs.Create;
1423 ChannelList := TChannelList.Create;
1424 //JoinChannels := TStringList.Create;
1430 //JoinChannels.Free;