6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
7 Dialogs, StdCtrls, ComCtrls, ExtCtrls, ToolWin, Menus, OleCtrls, Registry,
15 ActiveX, {HTTPApp,} YofUtils, IniFiles, StrUtils,
16 GikoSystem, GikoUtil, ImgList, Clipbrd, BoardGroup,
17 IdAntiFreezeBase, IdAntiFreeze, IdBaseComponent, IdComponent,
18 IdTCPConnection, IdTCPClient, IdHTTP, ActnList, StdActns, IdIntercept,
19 IdLogBase, IdLogDebug, IdException, DateUtils, bmRegExp,
20 Gesture, AppEvnts, SambaTimer;
23 // TSetLayeredWindowAttributes = function(wnd: HWND; crKey: DWORD; bAlpha: BYTE; dwFlag: DWORD): Boolean; stdcall;
24 //
\8f\91\82«
\8d\9e\82Ý
\96ß
\82è
\92l
\83^
\83C
\83v
25 TGikoResultType = (grtOK, grtCookie, grtCheck, grtError);
27 TEditorForm = class(TForm)
30 PostMessage: TMenuItem;
31 SaveMessage: TMenuItem;
34 StatusBar: TStatusBar;
35 EditorPage: TPageControl;
37 PreviewTab: TTabSheet;
45 ToolBarImageList: TImageList;
46 HotToobarImageList: TImageList;
47 NameBasePanel: TPanel;
50 NameComboBox: TComboBox;
51 MailComboBox: TComboBox;
53 SendToolButton: TToolButton;
54 OutBoxToolButton: TToolButton;
55 ToolButton5: TToolButton;
56 UndoToolButton: TToolButton;
57 CutToolButton: TToolButton;
58 CopyToolButton: TToolButton;
59 PasteToolButton: TToolButton;
60 ToolButton3: TToolButton;
61 TransToolButton: TToolButton;
62 TopToolButton: TToolButton;
64 IdAntiFreeze: TIdAntiFreeze;
65 ToolButton1: TToolButton;
66 ToolButton2: TToolButton;
67 ActionList: TActionList;
81 SageCheckBox: TCheckBox;
82 IdLogDebug: TIdLogDebug;
85 KotehanCheckBox: TCheckBox;
89 SelectAllAction: TAction;
91 SelectAll1: TMenuItem;
92 QuotePasteAction: TAction;
93 QuotePasteMenuItem: TMenuItem;
95 SpaceToNBSPAction: TAction;
96 AmpToCharRefAction: TAction;
97 SpaceTabnbsp1: TMenuItem;
99 BoardInformationTab: TTabSheet;
100 BoardtopTab: TTabSheet;
101 TitlePictureBrowser: TWebBrowser;
103 BoardInformationMemo: TMemo;
104 GetSETTINGTXTAction: TAction;
106 SETTINGTXT2: TMenuItem;
107 GetTitlePictureAction: TAction;
109 GetHeadTXTAction: TAction;
111 RocalRuleTab: TTabSheet;
112 WebBrowser1: TWebBrowser;
113 CalcCapacityAction: TAction;
116 LocalRule: TMenuItem;
119 LocalRuleBrowse: TMenuItem;
120 ToolButton4: TToolButton;
121 ToolButton6: TToolButton;
122 SaveNameMailAction: TAction;
123 ToolButton7: TToolButton;
124 BeLogInOutEAction: TAction;
125 UpdateSambaAction: TAction;
128 InputAssistAction: TAction;
129 InputAssistPopupMenu: TPopupMenu;
131 ApplicationEvents1: TApplicationEvents;
132 ToolButton8: TToolButton;
133 ToolButton9: TToolButton;
134 ShowInputAssistForm: TAction;
135 ReleaseCookieAction: TAction;
137 ContinueModeAction: TAction;
138 ToolButton10: TToolButton;
139 ToolButton11: TToolButton;
140 OpenSendTargetAction: TAction;
141 ReloadTargetAction: TAction;
146 procedure EditorPageChange(Sender: TObject);
147 procedure FormCreate(Sender: TObject);
148 procedure BrowserStatusTextChange(Sender: TObject;
149 const Text: WideString);
150 procedure FormClose(Sender: TObject; var Action: TCloseAction);
151 procedure FormDestroy(Sender: TObject);
152 procedure SendActionExecute(Sender: TObject);
153 procedure SaveActionExecute(Sender: TObject);
154 procedure AbortActionExecute(Sender: TObject);
155 procedure CloseActionExecute(Sender: TObject);
156 procedure UndoActionExecute(Sender: TObject);
157 procedure CutActionExecute(Sender: TObject);
158 procedure CopyActionExecute(Sender: TObject);
159 procedure PasteActionExecute(Sender: TObject);
160 procedure SendActionUpdate(Sender: TObject);
161 procedure SaveActionUpdate(Sender: TObject);
162 procedure CloseActionUpdate(Sender: TObject);
163 procedure UndoActionUpdate(Sender: TObject);
164 procedure CutActionUpdate(Sender: TObject);
165 procedure CopyActionUpdate(Sender: TObject);
166 procedure PasteActionUpdate(Sender: TObject);
167 procedure TopActionExecute(Sender: TObject);
168 procedure TopActionUpdate(Sender: TObject);
169 procedure SageCheckBoxClick(Sender: TObject);
170 procedure MailComboBoxChange(Sender: TObject);
171 procedure TransActionExecute(Sender: TObject);
172 procedure TransActionUpdate(Sender: TObject);
173 procedure IdLogDebugReceive(ASender: TIdConnectionIntercept;
175 procedure IdLogDebugSend(ASender: TIdConnectionIntercept;
177 procedure SelectAllActionExecute(Sender: TObject);
178 procedure StatusBarResize(Sender: TObject);
179 procedure FormActivate(Sender: TObject);
180 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
181 procedure QuotePasteActionExecute(Sender: TObject);
182 procedure SpaceToNBSPActionExecute(Sender: TObject);
183 procedure AmpToCharRefActionExecute(Sender: TObject);
184 procedure BoardTopClick(Sender: TObject);
185 procedure GetSETTINGTXTActionExecute(Sender: TObject);
186 procedure GetTitlePictureActionUpdate(Sender: TObject);
187 procedure GetTitlePictureActionExecute(Sender: TObject);
188 procedure GetHeadTXTActionExecute(Sender: TObject);
189 procedure CalcCapacityActionExecute(Sender: TObject);
190 procedure LocalRuleClick(Sender: TObject);
191 procedure FormDeactivate(Sender: TObject);
192 procedure LocalRuleBrowseClick(Sender: TObject);
193 procedure SaveNameMailActionExecute(Sender: TObject);
194 procedure BeLogInOutEActionExecute(Sender: TObject);
195 procedure BeLogInOutEActionUpdate(Sender: TObject);
196 procedure UpdateSambaActionUpdate(Sender: TObject);
197 procedure UpdateSambaActionExecute(Sender: TObject);
198 procedure InputAssistActionExecute(Sender: TObject);
199 procedure ApplicationEvents1Message(var Msg: tagMSG;
200 var Handled: Boolean);
201 procedure ShowInputAssistFormExecute(Sender: TObject);
202 procedure ReleaseCookieActionExecute(Sender: TObject);
203 procedure GetSETTINGTXTActionUpdate(Sender: TObject);
204 procedure GetHeadTXTActionUpdate(Sender: TObject);
205 procedure ContinueModeActionExecute(Sender: TObject);
206 procedure ContinueModeActionUpdate(Sender: TObject);
207 procedure OpenSendTargetActionExecute(Sender: TObject);
208 procedure ReloadTargetActionExecute(Sender: TObject);
210 FThreadItem: TThreadItem;
212 FNameComboEdit: THandle;
213 FMailComboEdit: THandle;
216 FStatusCode: Integer;
217 FDebugStrReceive: string;
218 FDebugStrSend: string;
220 FInputAssistKey: String; ///<
\93ü
\97Í
\83A
\83V
\83X
\83g
\82Ì
\83L
\81[
221 FResistWords: TStringList; ///<
\93ü
\97Í
\83A
\83V
\83X
\83g
\82Ì
\8e«
\8f\91\82©
\82ç
\82Ì
\8c\9f\8dõ
\8c\8b\89Ê
222 FSambaTimer: TSambaTimer; ///< Samba
\91Î
\8dô
\82Ì
\83^
\83C
\83}
\81[
224 function Check: Boolean;
225 procedure SetNameList(sName, sMail: string);
226 procedure Send(const ACOOKIE: string; const SPID: string; const PON: string; FirstWriting: Boolean);
227 function GetActiveControlHandle: THandle;
228 procedure GetSendData(Source: TStringStream);
229 procedure SaveSendFile;
230 procedure SetContent(Content: string; ABrowser: TWebBrowser);
231 function GetResultType(ResponseText: string): TGikoResultType;
232 ///
\96{
\95¶
\82Ì
\8eæ
\93¾
233 function GetBody : string;
234 //IdHttp
\82Ì
\8f\89\8aú
\89»
235 procedure InitIdHTTP(http: TIdHTTP);
236 procedure ShowBoardInformation(ABoard: TBoard; AMemo: TMemo);
237 function GetTitlePictureURL(body: TStringList; ABoard: TBoard): string;
238 procedure ShowTitlePicture();
239 function GetFusianaName(body: TStringList; ABoard: TBoard): String;
240 //!
\83}
\83E
\83X
\83W
\83F
\83X
\83`
\83\83\81[
\8aJ
\8en
241 procedure OnGestureStart(Sender: TObject);
242 //!
\83}
\83E
\83X
\83W
\83F
\83X
\83`
\83\83\81[
\92\86
243 procedure OnGestureMove(Sender: TObject);
244 //!
\83}
\83E
\83X
\83W
\83F
\83X
\83`
\83\83\81[
\8fI
\97¹
245 procedure OnGestureEnd(Sender: TObject);
246 //HEAD.TXT
\8e©
\93®
\95\
\8e¦
247 procedure ShowBoardHead(ABoard: TBoard; AMemo: TMemo);
248 //LocalFusianaTrapAlart
249 function LFusianaGet(const s: String): Boolean;
250 // Cookie
\82Ì
\8eæ
\93¾
251 procedure GetCookie(Rawtext: String; ABoard: TBoard);
252 // hidden
\83f
\81[
\83^
\8eæ
\93¾
253 procedure GetHiddenParameter(Rawtext: String; ABoard: TBoard);
254 //!
\93ü
\97Í
\83A
\83V
\83X
\83g
\82Ì
\83|
\83b
\83v
\83A
\83b
\83v
\83\81\83j
\83\85\81[
\82Ì
\83N
\83\8a\83b
\83N
\83C
\83x
\83\93\83g
255 procedure InputAssistMenuClick(Sender: TObject);
256 //! TMemo
\82Ì
\83J
\81[
\83\
\83\8b\88Ê
\92u
\82É
\95¶
\8e\9a\97ñ
\91}
\93ü
257 procedure InsertText(Memo: TMemo; Text: String);
258 //!
\91\97\90M
\92\86\8e~
259 procedure CancelSend(ABoard: TBoard; ASysMenu: HMENU);
260 //! Samba
\83^
\83C
\83}
\81[
\83C
\83x
\83\93\83g
261 procedure SambaTimer(Sender: TObject);
262 //!
\83E
\83B
\83\93\83h
\83E
\82Ì
\88Ê
\92u
\82Æ
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
263 procedure SetWindowRect;
264 //!
\8ag
\92£
\83^
\83u
\90Ý
\92è
265 procedure SetExtraTab;
267 function GetBoard : TBoard;
268 //! URL
\82Ì
\83f
\81[
\83^
\82ðstream
\82É
\8eæ
\82è
\8d\9e\82Þ
269 procedure GetWebData(const URL: string; const RefURL: string;
270 Modified: TDateTime; stream: TStream);
271 //! GikoForm
\82É
\90V
\92\85\83\81\83b
\83Z
\81[
\83W
\82ð
\92Ç
\89Á
\82·
\82é
272 procedure AddFormMessageNew(icon: TGikoMessageIcon);
273 //!
\83\8d\81[
\83J
\83\8bfusiana
\83g
\83\89\83b
\83v
274 function isLocalFusianaTrap: Boolean;
275 //!
\83\8d\81[
\83J
\83\8bfusiana
\83g
\83\89\83b
\83v
276 function isRemoteFusianaTrap: Boolean;
277 //! Header
\95¶
\8e\9a\97ñ
\8eæ
\93¾
278 function getHeaderStr(const ACOOKIE: string; const SPID : string;
279 const PON : string; Board : TBoard) : string;
280 //! fusiana
\8cx
\8d\90\83_
\83C
\83A
\83\8d\83O
281 function FusianaMsgBox: Integer;
282 //! sent.ini
\83t
\83@
\83C
\83\8b\82Ì
\90¶
\90¬
283 function CreateSentIniFile: TMemIniFile;
285 procedure CreateParams(var Params: TCreateParams); override;
289 procedure SetThreadItem(Item: TThreadItem);
290 procedure SetBoard(Item: TBoard);
291 procedure UpdateSambaStatus;
292 property BBSID: string read FBBSID write FBBSID;
298 Giko, ItemDownload, MojuUtils, IdGlobal, GikoMessage, Imm,
299 InputAssistDataModule, InputAssist, HTMLCreate;
301 CAPTION_NAME_NEW: string = '
\83M
\83R
\83i
\83r
\83X
\83\8c\97§
\82Ä
\83G
\83f
\83B
\83^';
302 CAPTION_NAME_RES: string = '
\83M
\83R
\83i
\83r
\83\8c\83X
\83G
\83f
\83B
\83^';
304 //
\83G
\83f
\83B
\83b
\83g
\83E
\83B
\83\93\83h
\83E
\82ð
\89E
\89º
\82É
\82¸
\82ç
\82µ
\82Ä
\8aJ
\82
\88Ú
\93®
\97Ê
308 //DAX
\82³
\82ñ±Ø¶ÞÄ!(
\81L
\81¤
\81M)
309 READCGI_ERR = '-ERR';
310 READCGI_INCR = '-INCR';
312 READCGI_PARTIAL = '+PARTIAL';
313 READCGI_ERR_FOUND_KAKO = '-ERR
\89ß
\8b\8e\83\8d\83O
\91q
\8cÉ
\82Å
\94
\8c©';
314 READCGI_ERR_NOT_HTML = '-ERR html
\89»
\91Ò
\82¿';
315 READCGI_ERR_NOT_FOUND = '-ERR
\82»
\82ñ
\82È
\94Âor
\83X
\83\8c\83b
\83h
\82È
\82¢
\82Å
\82·
\81B';
316 READCGI_ERR_ABONE = '-ERR
\82Ç
\82±
\82©
\82Å
\82 \82Ú
\81[
\82ñ
\82ª
\82 \82Á
\82½
\82Ý
\82½
\82¢
\82Å
\82·
\81B';
317 READCGI_ERR_TIMEOUT = '-ERR
\8ew
\92è
\8e\9e\8aÔ
\82ª
\89ß
\82¬
\82Ü
\82µ
\82½
\81B';
318 READCGI_ERR_CANTUSE = '-ERR
\82à
\82¤
\81@
\82Â
\82©
\82¦
\82Ü
\82¹
\82ñ';
319 RES2CH_TRUE = '<!-- 2ch_X:true -->';
320 RES2CH_FALSE = '<!-- 2ch_X:false -->';
321 RES2CH_ERROR = '<!-- 2ch_X:error -->';
322 RES2CH_CHECK = '<!-- 2ch_X:check -->';
323 RES2CH_COOKIE = '<!-- 2ch_X:cookie -->';
327 StartPos, EndPos: Integer;
332 {constructor TEditorForm.Create(AOwner: TComponent; Item: TBoard);
334 inherited Create(AOwner);
337 procedure TEditorForm.CreateParams(var Params: TCreateParams);
340 if FormStyle in [fsNormal, fsStayOnTop] then
341 if BorderStyle in [bsSingle, bsSizeable] then begin
342 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
343 Params.WndParent := 0;
347 {procedure TEditorForm.CreateParams(var Params: TCreateParams);
349 inherited CreateParams(Params);
350 Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
353 procedure TEditorForm.FormCreate(Sender: TObject);
356 FSambaTimer := TSambaTimer.Create(Self);
357 FSambaTimer.Interval := 0;
358 Browser.Navigate('about:blank');
359 TitlePictureBrowser.Navigate('about:blank');
360 WebBrowser1.Navigate('about:blank');
364 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\88Ê
\92u
\90Ý
\92è
367 EditorPage.ActivePage := EditorTab;
368 FNameComboEdit := GetWindow(NameComboBox.Handle, GW_CHILD);
369 FMailComboEdit := GetWindow(MailComboBox.Handle, GW_CHILD);
370 NameComboBox.Items.Assign(GikoSys.Setting.NameList);
371 MailComboBox.Items.Assign(GikoSys.Setting.MailList);
373 //
\94¼
\93§
\96¾
\97\98\97p
\89Â
\94\
\90Ý
\92è
374 TransAction.Enabled := GikoSys.CanUser32DLL;
376 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\83X
\83e
\83C
\8fó
\91Ô
377 if GikoSys.Setting.EditWindowStay then begin //
\83X
\83e
\83C
\8fó
\91Ô
378 SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
379 TopAction.Checked := true;
380 TopToolButton.Down := true;
381 end else begin //
\83X
\83e
\83C
\82µ
\82È
\82¢
382 SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
383 TopAction.Checked := false;
384 TopToolButton.Down := false;
387 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\94¼
\93§
\96¾
\8fó
\91Ô
388 if(GikoSys.Setting.EditWindowTranslucent) and (TransAction.Enabled) then begin //
\94¼
\93§
\96¾
\81i
\83g
\83\89\83\93\83X
\83\8b\81[
\83Z
\83\93\83g
\81j
\8fó
\91Ô
390 TransAction.Checked := true;
391 TransToolButton.Down := true;
392 end else begin //
\95s
\93§
\96¾
394 TransAction.Checked := false;
395 TransToolButton.Down := false;
397 //
\94¼
\93§
\96¾
\8fó
\91Ô
\82Ì
\95Û
\91¶
398 GikoSys.Setting.EditWindowTranslucent := TransAction.Checked;
400 SpaceToNBSPAction.Checked := GikoSys.Setting.SpaceToNBSP;
401 AmpToCharRefAction.Checked := GikoSys.Setting.AmpToCharRef;
402 //
\83\8d\81[
\83J
\83\8b\83\8b\81[
\83\8b\81{
\94Â
\83g
\83b
\83v
\89æ
\91\9c\82Ì
\83^
\83u
\82Ì
\90Ý
\92è
405 //
\83L
\81[
\90Ý
\92è
\82Ì
\93Ç
\82Ý
\8d\9e\82Ý
406 GikoSys.LoadKeySetting(ActionList, GikoSys.GetEditorKeyFileName);
407 SaveNameMailAction.Checked := True;
409 procedure TEditorForm.SetBoard(Item: TBoard);
412 Caption := CAPTION_NAME_NEW + ' - [' + Item.Title + ']';
413 NameComboBox.Text := FBoard.KotehanName;
414 MailComboBox.Text := FBoard.KotehanMail;
415 SageCheckBox.Checked := AnsiPos('sage', MailComboBox.Text) <> 0;
416 TitlePanel.Visible := True;
418 if (FSambaTimer.SetBoard(FBoard) >= 0) then begin
421 FSambaTimer.OnTimer := SambaTimer;
424 ShowBoardInformation(FBoard, BoardInformationMemo);
428 procedure TEditorForm.SetThreadItem(Item: TThreadItem);
431 Caption := CAPTION_NAME_RES + ' - [' + FThreadItem.Title + ']';
432 NameComboBox.Text := FThreadItem.ParentBoard.KotehanName;
433 MailComboBox.Text := FThreadItem.ParentBoard.KotehanMail;
434 SageCheckBox.Checked := AnsiPos('sage', MailComboBox.Text) <> 0;
435 TitlePanel.Visible := False;
437 if (FSambaTimer.SetBoard(FThreadItem.ParentBoard) >= 0) then begin
440 FSambaTimer.OnTimer := SambaTimer;
443 ShowBoardInformation(FThreadItem.ParentBoard, BoardInformationMemo);
447 function TEditorForm.GetBody : string;
456 body := BodyEdit.Text;
457 if AmpToCharRefAction.Checked then
458 // &
\82Ì
\92u
\8a·
\82Í
\88ê
\94Ô
\8dÅ
\8f\89\82É
\82â
\82é
\82±
\82Æ
459 body := CustomStringReplace( body, '&', '&' );
460 if SpaceToNBSPAction.Checked then begin
462 tail := p + Length( body );
464 while p < tail do begin
471 tmp := tmp + ' ';
472 until (len mod TAB_LENGTH) = 0;
477 tmp := tmp + p^; Inc( p );
483 tmp := tmp + ' ';
489 //
\8eÀ
\91Ì
\8eQ
\8fÆ
\82Í 1
\95¶
\8e\9a\95ª
494 while p < tail do begin
495 if p^ in ['a'..'z', 'A'..'Z', '0'..'9', '#'] then begin
497 end else if p^ = ';' then begin
509 if p^ in kYofKanji then begin
510 tmp := tmp + p^; Inc( p );
511 tmp := tmp + p^; Inc( p );
514 tmp := tmp + p^; Inc( p );
526 procedure TEditorForm.SetFont;
528 BodyEdit.Font.Name := GikoSys.Setting.EditorFontName;
529 BodyEdit.Font.Size := GikoSys.Setting.EditorFontSize;
530 BodyEdit.Font.Color := GikoSys.Setting.EditorFontColor;
531 BodyEdit.Color := GikoSys.Setting.EditorBackColor;
534 procedure TEditorForm.Preview;
543 if FThreadItem = nil then begin
545 Title := THTMLCreate.RepHtml(TitleEdit.Text);
547 No := IntToStr(FThreadItem.Count + 1);
548 Title := THTMLCreate.RepHtml(FThreadItem.Title);
552 Namae := THTMLCreate.RepHtml(NameComboBox.Text);
553 Mail := THTMLCreate.RepHtml(MailComboBox.Text);
554 Body := THTMLCreate.RepHtml(Body);
555 Body := CustomStringReplace(Body, #13#10, '<br>', False);
558 if Trim(Namae) = '' then
559 Namae := '
\96¼
\96³
\82µ
\82³
\82ñ';
561 s := THTMLCreate.CreatePreviewHTML(Title, No, Mail, Namae, Body);
563 SetContent(s, Browser);
566 procedure TEditorForm.EditorPageChange(Sender: TObject);
571 tmpBoard := GetBoard;
573 if tmpBoard = nil then Exit;
575 if EditorPage.ActivePage = PreviewTab then begin
577 end else if EditorPage.ActivePage = RocalRuleTab then begin
578 if not FileExists(tmpBoard.GETHEADTXTFileName) then begin
579 LocalEdit.Text := '
\83\8d\81[
\83J
\83\8b\83\8b\81[
\83\8b\96¢
\8eæ
\93¾';
582 ShowBoardHead(tmpBoard, LocalEdit);
584 Browser.Navigate('about:blank');
588 procedure TEditorForm.BrowserStatusTextChange(Sender: TObject;
589 const Text: WideString);
591 if EditorPage.ActivePage = PreviewTab then begin
592 StatusBar.Panels[0].Text := Text;
594 StatusBar.Panels[0].Text := '';
598 function TEditorForm.Check: Boolean;
600 REQUIRED: string = '
\82ª
\93ü
\97Í
\82³
\82ê
\82Ä
\82¢
\82Ü
\82¹
\82ñ
\81B';
601 ERROR: string = '
\83G
\83\89\81[';
611 if (not GikoSys.Setting.UseMachineTime) and
612 ((Board.LastGetTime = 0) or
613 (Board.LastGetTime = ZERO_DATE)) then begin
614 Msg := '
\83T
\81[
\83o
\82Ì
\8e\9e\8d\8f\82ª
\95ª
\82©
\82ç
\82È
\82¢
\82½
\82ß
\81A
\91\97\90M
\8fo
\97\88\82Ü
\82¹
\82ñ'#13#10
615 + '
\83X
\83\8c\83b
\83h
\82ð
\8dX
\90V
\81i
\8eæ
\93¾
\81j
\8cã
\81A15
\95b
\91Ò
\82Á
\82Ä
\82©
\82ç
\91\97\90M
\82µ
\82Ä
\82
\82¾
\82³
\82¢';
616 MsgBox(Handle, Msg, ERROR, MB_OK or MB_ICONSTOP);
618 end else if BodyEdit.Text = '' then begin
619 Msg := '
\96{
\95¶' + REQUIRED;
620 MsgBox(Handle, Msg, ERROR, MB_OK or MB_ICONSTOP);
622 end else if (FBoard <> nil) and (Trim(TitleEdit.Text) = '') then begin
623 Msg := '
\83^
\83C
\83g
\83\8b' + REQUIRED;
624 MsgBox(Handle, Msg, ERROR, MB_OK or MB_ICONSTOP);
627 if (not GikoSys.Dolib.Connected) and (AnsiPos('
\81\9c', NameComboBox.Text) <> 0) then begin
628 Msg := '
\83\8d\83O
\83C
\83\93\82µ
\82Ä
\82¢
\82È
\82¢
\82Ì
\82Å
\81\9c\82Ì
\8b@
\94\
\82Í
\97\98\97p
\8fo
\97\88\82Ü
\82¹
\82ñ
\81B'#13#10
629 + '
\82±
\82Ì
\82Ü
\82Ü
\91\97\90M
\82µ
\82Ä
\82à
\82æ
\82ë
\82µ
\82¢
\82Å
\82·
\82©
\81H';
630 rc := MsgBox(Handle, Msg, '
\8am
\94F', MB_YESNO or MB_ICONQUESTION);
631 Result := (rc = IDYES);
636 procedure TEditorForm.FormClose(Sender: TObject; var Action: TCloseAction);
641 procedure TEditorForm.FormDestroy(Sender: TObject);
643 wp: TWindowPlacement;
647 //
\8dÅ
\91å
\89»
\81E
\83E
\83B
\83\93\83h
\83E
\88Ê
\92u
\95Û
\91¶
648 wp.length := sizeof(wp);
649 GetWindowPlacement(Handle, @wp);
651 GikoSys.Setting.EditWindowTop := wp.rcNormalPosition.Top;
652 GikoSys.Setting.EditWindowLeft := wp.rcNormalPosition.Left;
653 GikoSys.Setting.EditWindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
654 GikoSys.Setting.EditWindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
655 GikoSys.Setting.EditWindowMax := WindowState = wsMaximized;
656 //GikoSys.Setting.EditWindowStay := FormStyle = fsStayOnTop; //
\83X
\83e
\83C
\8fó
\91Ô
\82Ì
\95Û
\91¶
657 GikoSys.Setting.EditWindowTranslucent := TransAction.Checked; //
\94¼
\93§
\96¾
\8fó
\91Ô
\82Ì
\95Û
\91¶
661 procedure TEditorForm.SetNameList(sName, sMail: string);
663 if SaveNameMailAction.Checked then begin
664 if Trim(sName) <> '' then begin
665 if GikoSys.Setting.NameList.IndexOf(sName) = -1 then
666 GikoSys.Setting.NameList.Insert(0, sName);
668 if Trim(sMail) <> '' then begin
669 if GikoSys.Setting.MailList.IndexOf(sMail) = -1 then
670 GikoSys.Setting.MailList.Insert(0, sMail);
675 function TEditorForm.GetActiveControlHandle: THandle;
677 if EditorPage.ActivePage = EditorTab then begin
678 if ActiveControl = NameComboBox then
679 Result := FNameComboEdit
680 else if ActiveControl = MailComboBox then
681 Result := FMailComboEdit
682 else if ActiveControl = BodyEdit then
683 Result := BodyEdit.Handle
684 else if ActiveControl = TitleEdit then
685 Result := TitleEdit.Handle
688 end else if Editorpage.ActivePage = BoardInformationTab then begin
689 if ActiveControl = BoardInformationMemo then
690 Result := BoardInformationMemo.Handle
693 end else if Editorpage.ActivePage = RocalRuleTab then begin
694 if ActiveCOntrol = LocalEdit then
695 Result := LocalEdit.Handle
702 procedure TEditorForm.SetContent(Content: string; ABrowser: TWebBrowser);
706 if Assigned(ABrowser.ControlInterface.Document) then begin
707 doc := OleVariant(ABrowser.Document);
710 doc.charset := 'Shift_JIS';
715 procedure TEditorForm.InitIdHTTP(http: TIdHTTP);
718 http.ProxyParams.BasicAuthentication := False;
719 if GikoSys.Setting.WriteProxy then begin
720 http.ProxyParams.ProxyServer := GikoSys.Setting.WriteProxyAddress;
721 http.ProxyParams.ProxyPort := GikoSys.Setting.WriteProxyPort;
722 http.ProxyParams.ProxyUsername := GikoSys.Setting.WriteProxyUserID;
723 http.ProxyParams.ProxyPassword := GikoSys.Setting.WriteProxyPassword;
724 if GikoSys.Setting.ReadProxyUserID <> '' then
725 http.ProxyParams.BasicAuthentication := True;
727 http.ProxyParams.ProxyServer := '';
728 http.ProxyParams.ProxyPort := 80;
729 http.ProxyParams.ProxyUsername := '';
730 http.ProxyParams.ProxyPassword := '';
732 Indy.Request.UserAgent := GikoSys.GetUserAgent;
733 Indy.Request.AcceptEncoding := '';
735 //!
\91\97\90M
\92\86\8e~
\82Ì
\82½
\82ß
\82Ì
\83\81\83j
\83\85\81[
\82Ì
\8dÄ
\90¶
736 procedure TEditorForm.CancelSend(ABoard: TBoard; ASysMenu: HMENU);
741 EnableMenuItem(ASysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
745 procedure TEditorForm.Send( const ACOOKIE: string; const SPID: string;
746 const PON: string; FirstWriting: Boolean);
748 TextStream: TStringStream;
749 Source: TStringStream;
750 ResponseText: string;
752 State: TGikoDownloadState;
753 ResultType: TGikoResultType;
757 {Protocol,Host, Path, Document, Port, Bookmark : String;}
765 if FThreadItem = nil then begin
766 URL := FBoard.GetSendURL;
767 Indy.Request.Referer := GikoSys.UrlToServer(FBoard.URL) + 'test/bbs.cgi';
769 URL := FThreadItem.GetSendURL;
770 Indy.Request.Referer := FThreadItem.URL;
773 sysMenu := GetSystemMenu( Handle, false );
774 EnableMenuItem( sysMenu, SC_CLOSE, MF_GRAYED );
776 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
779 Indy.Request.CustomHeaders.Clear;
780 // Indy.Request.CacheControl := 'no-cache';
781 Indy.Request.CustomHeaders.Add('Pragma: no-cache');
782 Indy.Request.AcceptLanguage := 'ja';
783 Indy.Request.Accept := 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*';
784 Indy.Request.ContentType := 'application/x-www-form-urlencoded';
785 Indy.Request.CustomHeaders.Add(getHeaderStr(ACOOKIE, SPID, PON, Board));
786 TextStream := TStringStream.Create('');
787 Source := TStringStream.Create('');
790 FDebugStrReceive := '';
793 if (FirstWriting) then begin
794 //
\83t
\83V
\83A
\83i
\83g
\83\89\83b
\83v
\8cx
\8d\90(LocalMode) by
\92è
\8aú
\95Ö
795 if (isLocalFusianaTrap) then begin
796 CancelSend( Board, SysMenu );
799 //
\83t
\83V
\83A
\83i
\83g
\83\89\83b
\83v
\8cx
\8d\90(Remote)
800 if (isRemoteFusianaTrap) then begin
801 CancelSend( Board, SysMenu );
807 IdAntiFreeze.Active := True;
809 Indy.Post(URL, Source, TextStream);
811 IdAntiFreeze.Active := False;
813 ResponseText := TextStream.DataString;
815 ResultType := GetResultType(ResponseText);
818 if ResultType = grtOK then begin
819 if (GikoSys.Setting.UseSamba) and (FSambaTimer.Enabled) then
821 FSambaTimer.WriteSambaTime(Now());
823 State := gdsComplete;
824 end else if ResultType = grtCookie then begin
825 //
\83\8b\81[
\83v
\96h
\8e~
826 if not FirstWriting then
827 raise Exception.Create('');
829 MsgResult := MsgBox( Handle,
830 '
\81E
\93\8a\8de
\82³
\82ê
\82½
\93à
\97e
\82Í
\83R
\83s
\81[
\81A
\95Û
\91¶
\81A
\88ø
\97p
\81A
\93]
\8dÚ
\93\99\82³
\82ê
\82é
\8fê
\8d\87\82ª
\82 \82è
\82Ü
\82·
\81B' + #13#10 +
831 '
\81E
\93\8a\8de
\82É
\8aÖ
\82µ
\82Ä
\94
\90¶
\82·
\82é
\90Ó
\94C
\82Í
\91S
\82Ä
\93\8a\8de
\8eÒ
\82É
\8bA
\82µ
\82Ü
\82·
\81B' + #13#10#13#10 +
832 '
\91S
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Ý
\82Ü
\82·
\82©
\81H',
834 MB_YESNO or MB_ICONQUESTION);
836 if MsgResult = IDYES then begin
837 GetCookie(Indy.Response.RawHeaders.Text, Board);
838 if (Board.Is2ch) then begin
839 GetHiddenParameter(ResponseText, Board);
842 if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then
843 raise Exception.Create('');
845 //
\82à
\82¤
\88ê
\89ñ
\82±
\82Ì
\83\81\83\
\83b
\83h
846 Send(Board.Cookie, Board.SPID, Board.PON, False);
849 CancelSend( Board, SysMenu );
852 end else if ResultType = grtCheck then begin
853 //
\83\8b\81[
\83v
\96h
\8e~
854 if not FirstWriting then
855 raise Exception.Create('');
857 MsgResult := MsgBox( Handle,
858 '
\8f\91\82«
\8d\9e\82Ý
\82É
\8aÖ
\82µ
\82Ä
\82Í
\97l
\81X
\82È
\83\8d\83O
\8fî
\95ñ
\82ª
\8bL
\98^
\82³
\82ê
\82Ä
\82¢
\82Ü
\82·
\81B' + #13#10 +
859 '
\93\8a\8de
\82É
\8aÖ
\82µ
\82Ä
\94
\90¶
\82·
\82é
\90Ó
\94C
\82Í
\91S
\82Ä
\93\8a\8de
\8eÒ
\82É
\8bA
\82µ
\82Ü
\82·
\81B' + #13#10 +
860 '
\8cö
\8f\98\97Ç
\91
\82É
\94½
\82µ
\82½
\82è
\81A
\91¼
\90l
\82É
\96À
\98f
\82ð
\82©
\82¯
\82é
\8f\91\82«
\8d\9e\82Ý
\82Í
\8dT
\82¦
\82Ä
\89º
\82³
\82¢
\81B' + #13#10 +
861 '
\93\8a\8de
\82³
\82ê
\82½
\93à
\97e
\82Í
\83R
\83s
\81[
\81E
\95Û
\91¶
\81E
\88ø
\97p
\81E
\93]
\8dÚ
\93\99\82³
\82ê
\82é
\8fê
\8d\87\82ª
\82 \82è
\82Ü
\82·
\81B' + #13#10 +
863 '
\91S
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Ý
\82Ü
\82·
\82©
\81H',
865 MB_YESNO or MB_ICONQUESTION);
867 if MsgResult = IDYES then begin
868 GetCookie(Indy.Response.RawHeaders.Text, Board);
869 if (Board.Is2ch) then begin
870 GetHiddenParameter(ResponseText, Board);
873 if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then
874 raise Exception.Create('');
876 Send(Board.Cookie, Board.SPID, Board.PON, False);
879 CancelSend( Board, SysMenu );
883 if (GikoSys.Setting.UseSamba) and (FSambaTimer.Enabled) then
885 FSambaTimer.WriteSambaTime(Now());
889 raise Exception.Create('');
892 on E: EIdConnectException do begin
894 ResponseText := '<html><body>'
895 + '<div>
\90Ú
\91±
\82ª
\8e¸
\94s
\82µ
\82Ü
\82µ
\82½<br>'
896 + '
\89ñ
\90ü
\82â
\83v
\83\8d\83L
\83V
\82Ì
\8fó
\91Ô
\82ð
\92²
\82×
\82Ä
\82
\82¾
\82³
\82¢<br></div>'
897 + '<br><br><div>' + E.Message + '</div>'
900 on E: Exception do begin
903 FDebugStrReceive := AnsiReplaceText(FDebugStrReceive, '<', '<');
904 FDebugStrReceive := AnsiReplaceText(FDebugStrReceive, '>', '>');
905 FDebugStrSend := AnsiReplaceText(FDebugStrSend, '<', '<');
906 FDebugStrSend := AnsiReplaceText(FDebugStrSend, '>', '>');
908 ResponseText := '<html><body>' + TextStream.DataString;
909 ResponseText := AnsiReplaceText(ResponseText, '</body>', '');
910 ResponseText := AnsiReplaceText(ResponseText, '</html>', '');
911 ResponseText := ResponseText + '<hr><div align="left"><pre>';
912 ResponseText := ResponseText + '<b>
\82±
\82±
\82©
\82ç
\83M
\83R
\83i
\83r
\82Ì
\8fî
\95ñ</b>'#13#10;
913 ResponseText := ResponseText + #13#10'
\81\9c\91\97\90M'#13#10;
914 ResponseText := ResponseText + FDebugStrSend;
915 ResponseText := ResponseText + #13#10'
\81\9c\8eó
\90M'#13#10;
916 ResponseText := ResponseText + FDebugStrReceive;
917 ResponseText := ResponseText + '</pre></div></body></html>';
920 FStatusCode := Indy.ResponseCode;
926 //sysMenu := GetSystemMenu( Handle, true );
927 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
931 //
\94ñ
\8cö
\8e®
\83M
\83R
\83i
\83r
\94Â
\82È
\82Ç
\82Ì2ch
\8cÝ
\8a·
\83X
\83N
\83\8a\83v
\83g
\97p
932 //2ch
\88È
\8aO
\82Å
\82©
\82ÂResponceCode
\82ª302Found
\82Å
\8f\91\82«
\8d\9e\82Ý
\8a®
\97¹
933 //if (not Board.Is2ch) and (FStatusCode = 302) then begin
934 if FStatusCode = 302 then begin
935 GikoForm.PlaySound('ResEnd');
937 AddFormMessageNew( gmiOK );
938 if (not ContinueModeAction.Enabled) or (not ContinueModeAction.Checked) then begin
943 if State = gdsComplete then begin
944 GikoForm.PlaySound('ResEnd');
946 AddFormMessageNew( gmiOK );
947 if (not ContinueModeAction.Enabled) or (not ContinueModeAction.Checked) then begin
950 end else if State = gdsError then begin
951 AddFormMessageNew( gmiOK );
952 EditorPage.ActivePage := PreviewTab;
953 SetContent(ResponseText, Browser);
954 end else if State = gdsAbort then begin
955 GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiSAD);
958 function TEditorForm.GetResultType(ResponseText: string): TGikoResultType;
960 if AnsiPos('
\8f\91\82«
\82±
\82Ý
\82ª
\8fI
\82í
\82è
\82Ü
\82µ
\82½', ResponseText) <> 0 then
962 else if (AnsiPos('
\83N
\83b
\83L
\81[
\82ª
\82È
\82¢
\82©
\8aú
\8cÀ
\90Ø
\82ê
\82Å
\82·', ResponseText) > 0) or
963 (AnsiPos('<title>
\83N
\83b
\83L
\81[
\8am
\94F
\81I</title>', ResponseText) > 0) or
964 (AnsiPos('<title>
\81¡
\83N
\83b
\83L
\81[
\8am
\94F
\81I
\81¡</title>', ResponseText) > 0) or
965 //(AnsiPos('
\83N
\83b
\83L
\81[
\8am
\94F', ResponseText) > 0) or
966 (AnsiPos(RES2CH_COOKIE, ResponseText) > 0) then
968 else if (AnsiPos('<font size=+2 color=#FF0000>
\8f\91\82«
\8d\9e\82Ý
\83`
\83F
\83b
\83N
\81I </font>', ResponseText) > 0) or
969 (AnsiPos('<title>
\81¡
\8f\91\82«
\8d\9e\82Ý
\8am
\94F
\82µ
\82Ü
\82·
\81¡</title>', ResponseText) > 0) or
970 (AnsiPos('<title>
\93\8a\8de
\8am
\94F</title>', ResponseText) > 0) or
971 (AnsiPos('<b>
\8f\91\82«
\82±
\82Ý
\8am
\94F</b>', ResponseText) > 0) or
972 (AnsiPos('="../test/subbbs.cgi">', ResponseText) > 0) or
973 (AnsiPos(RES2CH_FALSE, ResponseText) > 0) then
975 else if (AnsiPos('
\81E
\93\8a\8de
\8eÒ
\82Í
\81A
\8cf
\8e¦
\94Â
\89^
\89c
\8eÒ
\82É
\91Î
\82µ
\82Ä
\81A
\92\98\8dì
\8eÒ
\90l
\8ai
\8c \82ð
\88ê
\90Ø
\8ds
\8eg
\82µ
\82È
\82¢
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ü
\82·
\81B<br>', ResponseText) > 0) or
976 (AnsiPos('
\81i
\92\98\8dì
\8c \96@
\91æ21
\8fð
\82È
\82¢
\82µ
\91æ28
\8fð
\82É
\8bK
\92è
\82³
\82ê
\82é
\8c \97\98\82à
\8aÜ
\82Þ
\81j
\82»
\82Ì
\91¼
\82Ì
\8c \97\98\82É
\82Â
\82«
\81A', ResponseText) > 0) then
983 procedure TEditorForm.GetSendData(Source: TStringStream);
994 if GikoSys.Setting.UseMachineTime then begin
995 if GikoSys.Setting.TimeAdjust then
996 Adjust := Gikosys.Setting.TimeAdjustSec
998 Adjust := GikoSys.Setting.TimeAdjustSec * -1;
999 SendTime := GikoSys.DateTimeToInt(Now) - (9 * 60 * 60) + Adjust
1001 if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then
1002 SendTime := GikoSys.DateTimeToInt(Now)
1004 SendTime := GikoSys.DateTimeToInt(Board.LastGetTime);
1009 SessionID := GikoSys.Dolib.SessionID;
1010 if SessionID <> '' then
1011 s := 'sid=' + HttpEncode(SessionID) + '&'
1014 s := s + 'subject=&'
1015 + 'FROM=' + HttpEncode(NameComboBox.Text) + '&'
1016 + 'mail=' + HttpEncode(MailComboBox.Text) + '&'
1017 + 'MESSAGE=' + HttpEncode(body) + '&'
1018 + 'bbs=' + Board.BBSID + '&'
1019 + 'time=' + IntToStr(SendTime) + '&';
1021 if FThreadItem = nil then begin
1022 s := s + 'subject=' + HttpEncode(TitleEdit.Text) + '&';
1023 s := s + 'submit=' + HttpEncode('
\91S
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Þ') + #13#10;
1025 s := s + 'key=' + ChangeFileExt(FThreadItem.FileName, '') + '&';
1026 s := s + 'submit=' + HttpEncode('
\8f\91\82«
\8d\9e\82Þ') + #13#10;
1028 Source.WriteString(s);
1031 procedure TEditorForm.SaveSendFile;
1036 ini := CreateSentIniFile;
1037 if (ini <> nil) then begin
1039 sDate := IntToStr(GikoSys.DateTimeToInt(Now));
1041 ini.WriteString(sDate, 'Name', NameComboBox.Text);
1042 ini.WriteString(sDate, 'EMail', MailComboBox.Text);
1043 ini.WriteString(sDate, 'Body', HttpEncode(BodyEdit.Text));
1044 ini.WriteInteger(sDate, 'Status', FStatusCode);
1045 ini.WriteDateTime(sDate, 'Date', Now);
1046 if FThreadItem = nil then begin
1047 ini.WriteString(sDate, 'Title', MojuUtils.Sanitize(TitleEdit.Text));
1048 //ini.WriteString(sDate, 'BBS', FBoard.BBSID);
1049 ini.WriteString(sDate, 'URL', FBoard.URL);
1050 ini.WriteInteger(sDate, 'NewThread', 1);
1052 ini.WriteString(sDate, 'Title', FThreadItem.Title);
1053 //ini.WriteString(sDate, 'BBS', FThreadItem.ParentBoard.BBSID);
1054 ini.WriteString(sDate, 'URL', FThreadItem.URL);
1055 ini.WriteString(sDate, 'Key', ChangeFileExt(FThreadItem.FileName, ''));
1064 function TEditorForm.CreateSentIniFile: TMemIniFile;
1066 maxSize, fileSize, i: Integer;
1071 maxSize := GikoSys.Setting.SentIniFileSize * 1024 * 1024;
1072 //
\83t
\83@
\83C
\83\8b\83T
\83C
\83Y
\82ª0
\82Ì
\8fê
\8d\87\82Í
\81Asent.ini
\82É
\8f\91\82«
\8d\9e\82Ü
\82È
\82¢
\82Ì
\82Ånil
\82ð
\95Ô
\82·
1073 if (maxSize > 0) then begin
1074 fileSize := GikoSys.GetFileSize(GikoSys.Setting.GetSentFileName);
1075 //
\8dÅ
\91å
\83T
\83C
\83Y
\82ð
\92´
\82¦
\82Ä
\82¢
\82½
\8fê
\8d\87\82Í
\83\8a\83l
\81[
\83\80\82·
\82é
1076 if (fileSize >= maxSize) then begin
1078 //
\8d¡
\82Ì
\8e\9e\8d\8f\82ð
\83t
\83@
\83C
\83\8b\96¼
\82Ì
\8cã
\82ë
\82É
\82Â
\82¯
\82é
1080 // 10
\89ñ
\88È
\8fã
\8e¸
\94s
\82µ
\82½
\82ç
\82 \82«
\82ç
\82ß
\82é
1081 if (i > 10) then break;
1082 DateTimeToString(newName, 'yyhhnnsszzz', Now());
1084 until RenameFile(GikoSys.Setting.GetSentFileName,
1085 GikoSys.Setting.GetSentFileName + '.' + newName);
1087 Result := TMemIniFile.Create(GikoSys.Setting.GetSentFileName);
1090 procedure TEditorForm.SendActionExecute(Sender: TObject);
1092 TITLE_SAMBA : string = 'Samba24
\8cx
\8d\90';
1097 state : TGikoDownloadState;
1104 SendAction.Enabled := False;
1105 Application.ProcessMessages;
1106 if not Check then Exit;
1110 if FThreadItem = nil then begin
1111 rc := GikoUtil.MsgBox(Handle,
1112 '
\81u' + Board.Title + '
\81v
\94Â
\82É
\90V
\82µ
\82¢
\83X
\83\8c\83b
\83h
\97§
\82Ä
\82Ü
\82·'#13#10#13#10
1113 + '
\81E
\94Â
\82Ì
\83\8b\81[
\83\8b\82ð
\8eç
\82Á
\82½
\8f\91\82«
\8d\9e\82Ý
\82Å
\82 \82é
\82±
\82Æ
\82ð
\8am
\94F
\82µ
\82Ü
\82µ
\82½
\82©
\81H'#13#10
1114 + '
\81E
\91¼
\82É
\93¯
\82¶
\82æ
\82¤
\82È
\83X
\83\8c\83b
\83h
\82ª
\96³
\82©
\82Á
\82½
\82±
\82Æ
\82ð
\8am
\94F
\82µ
\82Ü
\82µ
\82½
\82©
\81H'#13#10#13#10
1115 + '
\81u
\82Í
\82¢
\81v
\82ð
\89\9f\82·
\82Æ
\91\97\90M
\82µ
\82Ü
\82·',
1117 MB_ICONQUESTION or MB_YESNO);
1118 if rc <> ID_YES then
1122 SetNameList(NameComboBox.Text, MailComboBox.Text);
1123 if (KotehanCheckBox.Enabled) and (KotehanCheckBox.Checked) then begin
1124 Board.KotehanName := NameComboBox.Text;
1125 Board.KotehanMail := MailComboBox.Text;
1128 if Board.IsBoardPlugInAvailable then begin
1131 if FThreadItem = nil then begin
1132 //
\83X
\83\8c\97§
\82Ä
1133 state := TGikoDownloadState( Board.BoardPlugIn.CreateThread(
1134 DWORD( Board ), TitleEdit.Text, NameComboBox.Text, MailComboBox.Text, body ) );
1136 if state = gdsComplete then begin
1137 GikoForm.PlaySound('ResEnd');
1139 GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmNewSure), nil, gmiOK);
1142 end else if State = gdsError then begin
1143 GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmSureError), nil, gmiNG);
1144 end else if State = gdsAbort then begin
1145 GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiNG);
1149 state := TGikoDownloadState( FThreadItem.ParentBoard.BoardPlugIn.WriteThread(
1150 DWORD( FThreadItem ), NameComboBox.Text, MailComboBox.Text, body ) );
1152 if state = gdsComplete then begin
1153 GikoForm.PlaySound('ResEnd');
1155 GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmNewRes), nil, gmiOK);
1158 end else if State = gdsError then begin
1159 GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmResError), nil, gmiOK);
1160 end else if State = gdsAbort then begin
1161 GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmAbort), nil, gmiOK);
1165 if not FSambaTimer.Enabled then begin
1166 if CompareDateTime(Board.Expires ,Now) <= 0 then begin
1171 Send(Board.Cookie, Board.SPID, Board.PON, True);
1173 if not FSambaTimer.CheckSambaTime(Now()) then begin
1174 rc := GikoUtil.MsgBox(Handle,
1175 'Samba24
\82Ì
\8bK
\92è
\92l
\96¢
\96\9e\82Ì
\95b
\90\94\82µ
\82©
\8co
\89ß
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ
\81B'#13#10
1176 + '
\91\97\90M
\82ð
\92\86\8e~
\82µ
\82Ü
\82·
\82©
\81H' + #13#10
1177 + '(
\81u
\82¢
\82¢
\82¦
\81v
\82¾
\82Æ
\91\97\90M
\82µ
\82Ü
\82·)', TITLE_SAMBA,
1178 MB_YESNO or MB_ICONQUESTION);
1179 if rc = IDYES then begin
1183 if rc = IDNO then begin
1184 rc2 := GikoUtil.MsgBox(Handle,
1185 '
\96{
\93\96\82É
\91\97\90M
\82µ
\82Ü
\82·
\82©
\81H',
1187 MB_YESNO or MB_ICONQUESTION);
1188 if rc2 = IDNO then begin
1194 if CompareDateTime(Board.Expires ,Now) <= 0 then begin
1199 Send(Board.Cookie, Board.SPID, Board.PON, True);
1204 if FSambaTimer.Enabled then begin
1205 FNow := FSambaTimer.Update;
1210 procedure TEditorForm.SaveActionExecute(Sender: TObject);
1215 procedure TEditorForm.CloseActionExecute(Sender: TObject);
1220 procedure TEditorForm.UndoActionExecute(Sender: TObject);
1222 SendMessage(GetActiveControlHandle, WM_UNDO, 0, 0);
1225 procedure TEditorForm.CutActionExecute(Sender: TObject);
1227 SendMessage(GetActiveControlHandle, WM_CUT, 0, 0);
1230 procedure TEditorForm.CopyActionExecute(Sender: TObject);
1232 SendMessage(GetActiveControlHandle, WM_COPY, 0, 0);
1235 procedure TEditorForm.PasteActionExecute(Sender: TObject);
1237 SendMessage(GetActiveControlHandle, WM_PASTE, 0, 0);
1240 procedure TEditorForm.SelectAllActionExecute(Sender: TObject);
1242 SendMessage(GetActiveControlHandle, EM_SETSEL, 0, GetWindowTextLength(GetActiveControlHandle));
1245 procedure TEditorForm.TopActionExecute(Sender: TObject); //
\83E
\83B
\83\93\83h
\83E
\8dÅ
\91O
\96Ê(Stay)
\83{
\83^
\83\93\82Ì
\8f\88\97\9d
1247 if not (fsShowing in Self.FormState) then begin
1248 if TopAction.Checked then begin //
\83X
\83e
\83C
\8fó
\91Ô
\82É
\90Ý
\92è
1249 SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
1250 GikoSys.Setting.EditWindowStay := true;
1251 end else begin //
\83X
\83e
\83C
\8fó
\91Ô
\89ð
\8f\9c
1252 SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
1253 GikoSys.Setting.EditWindowStay := false;
1255 //
\83X
\83e
\83C
\8fó
\91Ô
\82Ì
\95Û
\91¶
1256 //GikoSys.Setting.EditWindowStay := FormStyle = fsStayOnTop;
1260 procedure TEditorForm.AbortActionExecute(Sender: TObject);
1265 procedure TEditorForm.SendActionUpdate(Sender: TObject);
1267 SendAction.Enabled := not FWork;
1270 procedure TEditorForm.SaveActionUpdate(Sender: TObject);
1272 SaveAction.Enabled := False;
1275 procedure TEditorForm.CloseActionUpdate(Sender: TObject);
1277 CloseAction.Enabled := not FWork;
1280 procedure TEditorForm.UndoActionUpdate(Sender: TObject);
1282 UndoAction.Enabled := (GetActiveControlHandle <> 0)
1283 and (SendMessage(GetActiveControlHandle, EM_CANUNDO, 0, 0) <> 0)
1287 procedure TEditorForm.CutActionUpdate(Sender: TObject);
1289 Selection: TSelection;
1292 AHandle := GetActiveControlHandle;
1293 SendMessage(AHandle, EM_GETSEL, Longint(@Selection.StartPos), Longint(@Selection.EndPos));
1294 CutAction.Enabled := (AHandle <> 0)
1295 and ((Selection.EndPos - Selection.StartPos) <> 0)
1299 procedure TEditorForm.CopyActionUpdate(Sender: TObject);
1301 Selection: TSelection;
1304 AHandle := GetActiveControlHandle;
1305 SendMessage(AHandle, EM_GETSEL, Longint(@Selection.StartPos), Longint(@Selection.EndPos));
1306 CopyAction.Enabled := (AHandle <> 0)
1307 and ((Selection.EndPos - Selection.StartPos) <> 0)
1311 procedure TEditorForm.PasteActionUpdate(Sender: TObject);
1313 PasteAction.Enabled := (GetActiveControlHandle <> 0)
1314 and (Clipboard.HasFormat(CF_TEXT))
1318 procedure TEditorForm.TopActionUpdate(Sender: TObject);
1320 TopAction.Enabled := not FWork;
1323 procedure TEditorForm.SageCheckBoxClick(Sender: TObject);
1325 if SageCheckBox.Checked then begin
1326 if AnsiPos('sage', MailComboBox.Text) = 0 then
1327 MailComboBox.Text := 'sage' + MailComboBox.Text;
1329 if AnsiPos('sage', MailComboBox.Text) <> 0 then
1330 MailComboBox.Text := StringReplace(MailComboBox.Text, 'sage', '', [rfReplaceAll]);
1334 procedure TEditorForm.MailComboBoxChange(Sender: TObject);
1336 if AnsiPos('sage', MailComboBox.Text) = 0 then
1337 SageCheckBox.Checked := False
1339 SageCheckBox.Checked := True;
1342 procedure TEditorForm.IdLogDebugReceive(ASender: TIdConnectionIntercept;
1345 StringStream: TStringStream;
1347 StringStream := TStringStream.Create('');
1349 StringStream.CopyFrom(AStream, AStream.Size);
1350 FDebugStrReceive := FDebugStrReceive + StringStream.DataString;
1356 procedure TEditorForm.IdLogDebugSend(ASender: TIdConnectionIntercept;
1359 StringStream: TStringStream;
1361 StringStream := TStringStream.Create('');
1363 StringStream.CopyFrom(AStream, AStream.Size);
1364 FDebugStrSend := FDebugStrSend + StringStream.DataString;
1370 procedure TEditorForm.TransActionExecute(Sender: TObject);
1372 AlphaBlend := TransAction.Checked;
1373 //
\94¼
\93§
\96¾
\8fó
\91Ô
\82Ì
\95Û
\91¶
1374 GikoSys.Setting.EditWindowTranslucent := TransAction.Checked;
1377 procedure TEditorForm.TransActionUpdate(Sender: TObject);
1379 TransAction.Enabled := not FWork;
1381 //StatusBar
\82ÌPanels[0]
\82Ì
\95\9d\82ð
\89Â
\95Ï
\81B
\8ec
\82è
\82ð
\8cÅ
\92è
\82É
\82·
\82é
1382 procedure TEditorForm.StatusBarResize(Sender: TObject);
1384 StatusBar.Panels[0].Width := StatusBar.Width
1385 - StatusBar.Panels[1].Width - StatusBar.Panels[2].Width;
1389 //Form
\82ªActive
\82É
\82È
\82Á
\82½
\82ç
\8dÅ
\8fI
\8f\91\82«
\8d\9e\82Ý
\8e\9e\8aÔ
\82ð
\93Ç
\82Ý
\8d\9e\82Þ
1390 procedure TEditorForm.FormActivate(Sender: TObject);
1392 if ( FSambaTimer.Enabled ) and ( FThreadItem <> nil ) then
1394 FNow := FSambaTimer.Update;
1396 if GikoSys.Setting.GestureEnabled then begin
1397 GikoSys.Setting.Gestures.ClearGesture;
1398 GikoSys.Setting.Gestures.LoadGesture(
1399 GikoSys.Setting.GetGestureFileName, ActionList );
1400 MouseGesture.UnHook;
1401 MouseGesture.OnGestureStart := OnGestureStart;
1402 MouseGesture.OnGestureMove := OnGestureMove;
1403 MouseGesture.OnGestureEnd := OnGestureEnd;
1404 MouseGesture.SetHook( Handle );
1407 procedure TEditorForm.FormCloseQuery(Sender: TObject;
1408 var CanClose: Boolean);
1410 CanClose := not FWork;
1413 procedure TEditorForm.QuotePasteActionExecute(Sender: TObject);
1420 quote := GikoSys.GetOEIndentChar;
1421 s := TStringList.Create;
1423 s.Text := Clipboard.AsText;
1425 for i := s.Count - 1 downto 0 do
1426 s[ i ] := quote + s[ i ];
1428 BodyEdit.SelText := s.Text;
1435 procedure TEditorForm.SpaceToNBSPActionExecute(Sender: TObject);
1437 GikoSys.Setting.SpaceToNBSP := SpaceToNBSPAction.Checked;
1438 if EditorPage.ActivePage = PreviewTab then
1442 procedure TEditorForm.AmpToCharRefActionExecute(Sender: TObject);
1444 GikoSys.Setting.AmpToCharRef := AmpToCharRefAction.Checked;
1445 if EditorPage.ActivePage = PreviewTab then
1449 procedure TEditorForm.BoardTopClick(Sender: TObject);
1453 ini := TMemIniFile.Create(GikoSys.Setting.GetFileName);
1455 BoardtopTab.TabVisible := BoardTop.Checked;
1456 ini.WriteBool('EditorForm', 'BoardTopTab', BoardtopTab.TabVisible);
1464 procedure TEditorForm.GetSETTINGTXTActionExecute(Sender: TObject);
1466 memStream: TMemoryStream;
1467 URL, RefURL: string;
1468 settingBody: TStringList;
1471 if not FWork then begin
1474 tmpBoard := GetBoard;
1475 if tmpBoard <> nil then begin
1477 RefURL := tmpBoard.URL;
1478 if RefURL[Length(RefURL)] <> '/' then
1479 URL := RefURL + '/' + 'SETTING.TXT'
1481 URL := RefURL + 'SETTING.TXT';
1482 Screen.Cursor := crHourGlass;
1483 memStream := TMemoryStream.Create;
1486 StatusBar.Panels[0].Text := 'SETTING.TXT
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86';
1487 GetWebData(URL, RefURL, tmpBoard.SETTINGTXTTime, memStream);
1488 if( Indy.ResponseCode = 200 ) then begin
1489 settingBody := TStringList.Create;
1491 memStream.Seek(0, soFromBeginning);
1492 settingBody.LoadFromStream(memStream);
1493 settingBody.SaveToFile(tmpBoard.GetSETTINGTXTFileName);
1494 tmpBoard.SETTINGTXTTime := Indy.Response.LastModified;
1495 tmpBoard.IsSETTINGTXT := true;
1496 tmpBoard.TitlePictureURL := GetTitlePictureURL(settingBody, tmpBoard);
1497 tmpBoard.Modified := true;
1501 StatusBar.Panels[0].Text := 'SETTING.TXT
\8eæ
\93¾
\8a®
\97¹(' + IntToStr(Indy.ResponseCode) + ')';
1504 on E: EIdException do begin
1505 if( AnsiPos('304', E.Message) > 0 ) then
1506 StatusBar.Panels[0].Text := 'SETTING.TXT
\8dX
\90V
\96³
\82µ(' + IntToStr(Indy.ResponseCode) + ')'
1508 StatusBar.Panels[0].Text := 'SETTING.TXT
\8eæ
\93¾
\83G
\83\89\81[(' + IntToStr(Indy.ResponseCode) + ')';
1513 Screen.Cursor := crDefault;
1515 ShowBoardInformation(tmpBoard, BoardInformationMemo);
1521 procedure TEditorForm.ShowBoardInformation(ABoard: TBoard; AMemo: TMemo);
1526 AMemo.Lines.Add('[SETTING.TXT]');
1527 if ABoard.IsSETTINGTXT then begin
1528 if FileExists(ABoard.GetSETTINGTXTFileName) then begin
1529 AMemo.Lines.Add(DateTimeToStr(ABoard.SETTINGTXTTime) + '
\8dX
\90V');
1530 body := TStringList.Create;
1532 body.LoadFromFile(ABoard.GetSETTINGTXTFileName);
1533 AMemo.Lines.AddStrings(body);
1538 ABoard.IsSETTINGTXT := false;
1539 ABoard.SETTINGTXTTime := ZERO_DATE;
1540 AMemo.Lines.Add('Local
\82É
\95Û
\91¶
\82³
\82ê
\82½SETTING.TXT
\82ª
\8c©
\82Â
\82©
\82è
\82Ü
\82¹
\82ñ');
1541 AMemo.Lines.Add('
\83\81\83j
\83\85\81[
\82æ
\82è
\8dÄ
\8eæ
\93¾
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B');
1544 AMemo.Lines.Add('SETTING.TXT
\82ð
\8eæ
\93¾
\82µ
\82Ä
\82¢
\82Ü
\82¹
\82ñ
\81B');
1545 AMemo.Lines.Add('
\83\81\83j
\83\85\81[
\82æ
\82è
\8eæ
\93¾
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B');
1548 function TEditorForm.GetTitlePictureURL(body: TStringList; ABoard: TBoard): string;
1549 //BBS_TITLE_PICTURE=
1556 for i := 0 to body.Count - 1 do begin
1557 if (AnsiPos('BBS_TITLE_PICTURE=', body[i]) > 0) or
1558 (AnsiPos('BBS_FIGUREHEAD=', body[i]) > 0) then begin
1560 Delete(tmp, 1, AnsiPos('=', tmp));
1561 if AnsiPos('../', tmp) > 0 then begin
1562 tmp := CustomStringReplace(tmp, '../', GikoSys.UrlToServer(ABoard.URL));
1570 procedure TEditorForm.GetTitlePictureActionUpdate(Sender: TObject);
1572 if FThreadItem = nil then
1573 GetTitlePictureAction.Enabled := FBoard.IsSETTINGTXT
1575 GetTitlePictureAction.Enabled := FThreadItem.ParentBoard.IsSETTINGTXT;
1577 if GetTitlePictureAction.Enabled Then begin
1578 //
\8eÀ
\8ds
\92\86\82Í
\8eÀ
\8ds
\95s
\89Â
1579 GetTitlePictureAction.Enabled := not FWork;
1583 procedure TEditorForm.GetTitlePictureActionExecute(Sender: TObject);
1585 memStream: TMemoryStream;
1592 memStream := TMemoryStream.Create;
1594 tmpBoard := GetBoard;
1596 if (tmpBoard <> nil) and (tmpBoard.TitlePictureURL <> '') then begin
1597 StatusBar.Panels[0].Text := '
\94Â
\83g
\83b
\83v
\89æ
\91\9c\83_
\83E
\83\93\83\8d\81[
\83h
\92\86';
1598 Screen.Cursor := crHourGlass;
1600 // URL
\82ð
\8ew
\92è
\82µ
\82Ä
\83\81\83\82\83\8a\82É
\93Ç
\82Ý
\8d\9e\82Þ
1601 GetWebData(tmpBoard.TitlePictureURL, tmpBoard.URL,
1602 ZERO_DATE, memStream);
1603 if Indy.ResponseCode = 200 then begin
1604 memStream.SaveToFile(tmpBoard.GetTitlePictureFileName);
1606 tmpBoard.Modified := true;
1608 StatusBar.Panels[0].Text := '
\94Â
\83g
\83b
\83v
\89æ
\91\9c (' + IntToStr(Indy.ResponseCode) + ')';
1615 Screen.Cursor := crDefault;
1619 \brief URL
\82Ì
\83f
\81[
\83^
\82ðstream
\82É
\93Ç
\82Ý
\8d\9e\82Þ
1620 \param URL
\93Ç
\82Ý
\8d\9e\82Þ
\90æ
1621 \param RefURL referer
\82É
\90Ý
\92è
\82·
\82é
1622 \param Modified Modified
\82É
\90Ý
\92è
\82·
\82é
1623 \param stream
\93Ç
\82Ý
\8d\9e\82ñ
\82¾
\83f
\81[
\83^
\82Ì
\95Û
\91¶
\90æ
1625 procedure TEditorForm.GetWebData(const URL: string; const RefURL: string;
1626 Modified: TDateTime; stream: TStream);
1629 Indy.Request.Referer := RefURL;
1630 Indy.Request.LastModified := Modified;
1632 IdAntiFreeze.Active := True;
1634 Indy.Get(URL, stream);
1636 IdAntiFreeze.Active := False;
1640 procedure TEditorForm.ShowTitlePicture();
1645 tmpBoard := GetBoard;
1647 if FileExists(tmpBoard.GetTitlePictureFileName) then begin
1648 TitlePictureBrowser.Navigate(tmpBoard.GetTitlePictureFileName);
1650 s := '
\94Â
\83g
\83b
\83v
\89æ
\91\9c\96¢
\8eæ
\93¾
\82Å
\82·
\81B<br>
\83\81\83j
\83\85\81[
\82æ
\82è
\8eæ
\93¾
\82µ
\82Ä
\82
\82¾
\82³
\82¢
\81B';
1651 SetContent(s, TitlePictureBrowser);
1655 function TEditorForm.GetFusianaName(body: TStringList; ABoard: TBoard): String;
1660 for i := 0 to body.Count - 1 do begin
1661 if (AnsiPos('BBS_NONAME_NAME=', body[i]) > 0) then begin
1663 Delete(tmp, 1, AnsiPos('=', tmp));
1670 procedure TEditorForm.GetHeadTXTActionExecute(Sender: TObject);
1672 URL, RefURL: string;
1673 settingBody: TStringList;
1675 memStream: TMemoryStream;
1677 if not FWork then begin
1680 tmpBoard := GetBoard;
1681 if (tmpBoard <> nil) then begin
1683 RefURL := tmpBoard.URL;
1684 if RefURL[Length(RefURL)] <> '/' then
1685 URL := RefURL + '/' + 'head.txt'
1687 URL := RefURL + 'head.txt';
1689 Screen.Cursor := crHourGlass;
1690 memStream := TMemoryStream.Create;
1692 StatusBar.Panels[0].Text := '
\83\8d\81[
\83J
\83\8b\83\8b\81[
\83\8b(head.txt)
\83_
\83E
\83\93\83\8d\81[
\83h
\92\86';
1694 GetWebData(URL, RefURL, tmpBoard.HEADTXTTime, memStream);
1695 if( Indy.ResponseCode = 200 ) then begin
1696 settingBody := TStringList.Create;
1698 memStream.Seek(0, soFromBeginning);
1699 settingBody.LoadFromStream(memStream);
1700 settingBody.Insert(0, '<HTML lang="ja"><HEAD>');
1701 settingBody.Insert(1, '<META http-equiv="Content-Type" content="text/html; charset=Shift_JIS">');
1702 settingBody.Insert(2, '<TITLE>' + tmpBoard.Title + '</TITLE>');
1703 settingBody.Insert(3, '<base href="' + RefURL + '"></HEAD><BODY>');
1704 settingBody.Add('</BODY></HTML>');
1705 settingBody.SaveToFile(tmpBoard.GETHEADTXTFileName);
1706 tmpBoard.HEADTXTTime := Indy.Response.LastModified;
1707 tmpBoard.IsHEADTXT := true;
1708 tmpBoard.Modified := true;
1712 StatusBar.Panels[0].Text := '
\83\8d\81[
\83J
\83\8b\83\8b\81[
\83\8b\8eæ
\93¾
\8a®
\97¹(' + IntToStr(Indy.ResponseCode) + ')';
1715 on E: EIdException do begin
1716 if( AnsiPos('304', E.Message) > 0 ) then
1717 StatusBar.Panels[0].Text := '
\83\8d\81[
\83J
\83\8b\83\8b\81[
\83\8b\8dX
\90V
\96³
\82µ(' + IntToStr(Indy.ResponseCode) + ')'
1719 StatusBar.Panels[0].Text := '
\83\8d\81[
\83J
\83\8b\83\8b\81[
\83\8b\8eæ
\93¾
\83G
\83\89\81[(' + IntToStr(Indy.ResponseCode) + ')';
1724 Screen.Cursor := crDefault;
1726 if tmpBoard.IsHEADTXT then begin
1727 ShowBoardHead(tmpboard, LocalEdit);
1735 procedure TEditorForm.CalcCapacityActionExecute(Sender: TObject);
1741 //
\82Ç
\82¤
\82à
\81A
\89ü
\8ds
\95ª
\82¸
\82ê
\82Ä
\82½
\82Á
\82Û
\82¢
\82¯
\82Ç
\81A
\96{
\93\96\82©
\82æ
\82
\95ª
\82©
\82ç
\82È
\82¢
\81B
1744 if Board.BoardPlugIn <> nil then
1745 body := CustomStringReplace(body, #13#10, '<br>')
1747 body := CustomStringReplace(body, #13#10, ' <br> ');
1748 StatusBar.Panels[0].Text := '
\97e
\97Ê:' + IntToStr(Length(body)) + ' byte';
1751 procedure TEditorForm.LocalRuleClick(Sender: TObject);
1755 ini := TMemIniFile.Create(GikoSys.Setting.GetFileName);
1757 RocalRuleTab.TabVisible := LocalRule.Checked;
1758 ini.WriteBool('EditorForm', 'LocalRuleTab', RocalRuleTab.TabVisible);
1765 procedure TEditorForm.FormDeactivate(Sender: TObject);
1767 if GikoSys.Setting.GestureEnabled then begin
1768 GikoSys.Setting.Gestures.ClearGesture;
1769 MouseGesture.UnHook;
1770 MouseGesture.OnGestureStart := nil;
1771 MouseGesture.OnGestureMove := nil;
1772 MouseGesture.OnGestureEnd := nil;
1776 procedure TEditorForm.OnGestureStart(Sender: TObject);
1781 procedure TEditorForm.OnGestureMove(Sender: TObject);
1787 s := MouseGesture.GetGestureStr;
1789 Action := GikoSys.Setting.Gestures.GetGestureAction(s);
1790 if Action <> nil then
1791 ActStr := '
\81i' + Action.Caption + '
\81j';
1792 s := '
\83W
\83F
\83X
\83`
\83\83\81[: ' + s + ActStr;
1793 StatusBar.Panels[0].Text := s;
1796 procedure TEditorForm.OnGestureEnd(Sender: TObject);
1801 s := MouseGesture.GetGestureStr;
1803 Action := GikoSys.Setting.Gestures.GetGestureAction(s);
1804 if Action <> nil then
1806 StatusBar.Panels[0].Text := '';
1809 procedure TEditorForm.ShowBoardHead(ABoard: TBoard; AMemo: TMemo);
1814 //http://www.campus.ne.jp/~ishigami/CREATION/TECHNIC/WEBAP-2.htm
1815 WebBrowser1.Navigate(ABoard.GETHEADTXTFileName);
1816 //
\83\8c\83^
\83\8a\83\93\83O
\82ª
\92x
\82·
\82¬
\82ÄTXT
\82É
\88Ú
\82¹
\82È
\82¢
\81B
\82Ê
\82é
\82Ûorz
1817 //
\89º
\82Ì
\82æ
\82¤
\82É
\82¿
\82á
\82ñ
\82Æ
\93Ç
\82Ý
\8d\9e\82Ý
\82ª
\8fI
\82í
\82Á
\82Ä
\82¢
\82é
\82©
\81A
\83`
\83F
\83b
\83N
\82·
\82ê
\82Î
\82¢
\82¢
\82ñ
\82¾
\82æ
\81B
1818 //
\82±
\82ê
\82Å
\82¢
\82¯
\82Ü
\82µ
\82½
\81B
\82 \82è
\82ª
\82Æ
\82¤
\82²
\82´
\82¢
\82Ü
\82µ
\82½
\81B
1819 while (WebBrowser1.ReadyState <> READYSTATE_COMPLETE) and
1820 (WebBrowser1.ReadyState <> READYSTATE_INTERACTIVE) do begin
1821 Application.ProcessMessages;
1826 range := OleVariant(WebBrowser1.Document).body.createTextRange;
1827 LocalEdit.Text := range.text;
1832 procedure TEditorForm.LocalRuleBrowseClick(Sender: TObject);
1842 URL := ABoard.GETHEADTXTFileName;
1843 GikoSys.OpenBrowser(URL, gbtAuto);
1846 procedure TEditorForm.SaveNameMailActionExecute(Sender: TObject);
1848 SaveNameMailAction.Checked := not SaveNameMailAction.Checked;
1849 KotehanCheckBox.Enabled := SaveNameMailAction.Checked;
1852 function TEditorForm.LFusianaGet(const s: String): Boolean;
1854 FUSIANA = 'fusianasan';
1858 i := AnsiPos(FUSIANA, s);
1862 procedure TEditorForm.BeLogInOutEActionExecute(Sender: TObject);
1864 GikoSys.Setting.BeLogin := not GikoSys.Setting.BeLogin;
1867 procedure TEditorForm.BeLogInOutEActionUpdate(Sender: TObject);
1869 if (GikoSys.Setting.BeUserID <> '') and (GikoSys.Setting.BeCode <> '') then begin
1870 if (GikoSys.Setting.BeLogin) then BeLogInOutEAction.Checked := true
1871 else BeLogInOutEAction.Checked := false;
1872 BeLogInOutEAction.Enabled := true
1874 BeLogInOutEAction.Enabled := false;
1877 // Cookie
\82Ì
\8eæ
\93¾
1878 procedure TEditorForm.GetCookie(Rawtext: String; ABoard: TBoard);
1880 COOKIE_MARK = 'Set-Cookie:';
1883 EXPIRES_MARK = 'expires=';
1888 curCookies : TStringList;
1889 tmpCookieName : string;
1891 // 2008.12.14
\96³
\8fð
\8c\8f\83N
\83\8a\83A
\82µ
\82Ä
\82Í
\82¢
\82¯
\82È
\82¢ by
\82à
\82¶
\82ã
1892 curCookies := TStringList.Create;
1893 curCookies.Delimiter := ';';
1894 curCookies.DelimitedText := ABoard.Cookie;
1895 ABoard.Cookie := '';
1897 while (AnsiPos(COOKIE_MARK, Rawtext) > 0 ) do begin
1898 tmp := Copy(Rawtext, AnsiPos(COOKIE_MARK, Rawtext) + Length(COOKIE_MARK), Length(Rawtext));
1899 Delete(Rawtext, 1, AnsiPos('Set-Cookie', Rawtext)+ Length(COOKIE_MARK));
1900 //Cookie
\82ð
\90Ø
\82è
\8fo
\82·
1901 val := Trim(GikoSys.GetTokenIndex(tmp, ';', 0));
1902 if( AnsiPos(VAL_SPID, val) > 0 ) then begin
1903 ABoard.SPID := Copy(val, AnsiPos(VAL_SPID, val) + Length(VAL_SPID), Length(val));
1904 end else if( AnsiPos(VAL_PON, val) > 0 ) then begin
1905 ABoard.PON := Copy(val, AnsiPos(VAL_PON, val) + Length(VAL_PON), Length(val));
1907 //
\8aù
\91¶
\82ÌCookie
\82Ì
\8fê
\8d\87\82Í
\92l
\82¾
\82¯
\95t
\82¯
\91Ö
\82¦
\82é
1908 pos := AnsiPos('=', val);
1909 if pos > 0 then begin
1910 tmpCookieName := Copy(val, 0, pos - 1);
1911 for i := 0 to curCookies.Count - 1 do begin
1912 if (curCookies.IndexOfName(tmpCookieName) >= 0) then begin
1913 curCookies.Values[tmpCookieName] := Copy(val, pos + 1, Length(val));
1914 tmpCookieName := '';
1918 if (tmpCookieName <> '') then begin
1919 curCookies.Add(val);
1922 //tmpCookie := tmpCookie + val + '; ';
1924 //expires
\82ð
\90Ø
\82è
\8fo
\82·
1925 val := Trim(GikoSys.GetTokenIndex(tmp, ';', 1));
1926 if( AnsiPos(EXPIRES_MARK, val) > 0) then begin
1927 Delete(val, 1, AnsiPos(EXPIRES_MARK, val) + Length(EXPIRES_MARK) - 1);
1928 ABoard.Expires := GMTToLocalDateTime(val);
1931 for i := 0 to curCookies.Count - 1 do begin
1932 if (curCookies.Strings[i] <> '') then begin
1933 ABoard.Cookie := ABoard.Cookie + curCookies.Strings[i] + '; ';
1941 //! hidden
\83f
\81[
\83^
\8eæ
\93¾
1942 procedure TEditorForm.GetHiddenParameter(Rawtext: String; ABoard: TBoard);
1944 INPUT_MARK = '<input type=hidden' ; //
\91å
\95¶
\8e\9a\8f¬
\95¶
\8e\9a\82Î
\82ç
\82Î
\82ç
\82È
\82±
\82Æ
\82É
\92\8d\88Ó
1945 VALUE_MARK = 'value=' ; //
\91å
\95¶
\8e\9a\8f¬
\95¶
\8e\9a\82Î
\82ç
\82Î
\82ç
\82È
\82±
\82Æ
\82É
\92\8d\88Ó
1946 NAME_MARK = 'name=' ; //
\91å
\95¶
\8e\9a\8f¬
\95¶
\8e\9a\82Î
\82ç
\82Î
\82ç
\82È
\82±
\82Æ
\82É
\92\8d\88Ó
1947 IGNORE_NAMES : array[0..6] of String =
1948 ('subject', 'from', 'mail', 'message', 'bbs', 'time', 'key');
1950 tmp, line, name, value, lname : String;
1951 pos, pose, i : Integer;
1953 tmp := AnsiLowerCase(Rawtext);
1954 pos := AnsiPos(INPUT_MARK, tmp);
1955 while (pos > 0 ) do begin
1956 tmp := Copy(Rawtext, pos + Length(INPUT_MARK), Length(tmp));
1957 Delete(Rawtext, 1, pos+ Length(INPUT_MARK) - 1);
1958 pose := AnsiPos('>', tmp);
1959 // name=xxx value=yyy
\82ª
\90Ø
\82è
\8fo
\82³
\82ê
\82é
1960 line := Copy(tmp, 1, pose - 1);
1963 pos := AnsiPos(NAME_MARK, tmp);
1964 if (pos > 0) then begin
1965 name := Copy(Rawtext, pos + Length(NAME_MARK), Length(line));
1966 //
\94¼
\8ap"
\82Å
\8en
\82Ü
\82Á
\82Ä
\82¢
\82é
\82©
1967 if AnsiPos('"', name) = 1 then begin
1968 //
\94¼
\8ap"
\82Ü
\82Å
\82ð
\83R
\83s
\81[
1970 pose := AnsiPos('"', name);
1971 if (pose > 0) then begin
1972 Delete(name, pose, Length(name));
1974 pose := AnsiPos(' ', name);
1975 if (pose > 0) then begin
1976 Delete(name, pose, Length(name));
1980 pose := AnsiPos(' ', name);
1981 if (pose > 0) then begin
1982 Delete(name, pose, Length(name));
1986 lname := AnsiLowerCase(name);
1987 for i := 0 to Length(IGNORE_NAMES) do begin
1988 if lname = IGNORE_NAMES[i] then begin
1993 pos := AnsiPos(VALUE_MARK, tmp);
1994 if (name <> '') and (pos > 0) then begin
1995 value := Copy(Rawtext, pos + Length(VALUE_MARK), Length(line));
1996 //
\94¼
\8ap"
\82Å
\8en
\82Ü
\82Á
\82Ä
\82¢
\82é
\82©
1997 if AnsiPos('"', value) = 1 then begin
1998 //
\94¼
\8ap"
\82Ü
\82Å
\82ð
\83R
\83s
\81[
1999 Delete(value, 1, 1);
2000 pose := AnsiPos('"', value);
2001 if (pose > 0) then begin
2002 Delete(value, pose, Length(value));
2004 pose := AnsiPos(' ', value);
2005 if (pose > 0) then begin
2006 Delete(value, pose, Length(value));
2010 pose := AnsiPos(' ', value);
2011 if (pose > 0) then begin
2012 Delete(value, pose, Length(name));
2016 if (name <> '') then begin
2017 ABoard.Cookie := ABoard.Cookie + name + '=' + value + '; ';
2020 Delete(tmp, 1, Length(line));
2021 Delete(Rawtext, 1, Length(line));
2022 pos := AnsiPos(INPUT_MARK, tmp);
2026 //!
\83T
\83\93\83o
\8dX
\90V
\82Ì
\83A
\83N
\83V
\83\87\83\93\82ÌUpdate
\83C
\83x
\83\93\83g
\81@
\8aÈ
\92P
\82Ì
\82½
\82ß
\83^
\83C
\83}
\81[
\82Æ
\93¯
\82¶
\82É
\82µ
\82Ä
\82¨
\82
2027 procedure TEditorForm.UpdateSambaActionUpdate(Sender: TObject);
2029 UpdateSambaAction.Enabled := FSambaTimer.Enabled;
2032 //!
\83T
\83\93\83o
\8dX
\90V
\83A
\83N
\83V
\83\87\83\93
2033 procedure TEditorForm.UpdateSambaActionExecute(Sender: TObject);
2038 if InputQuery('Samba24
\90Ý
\92è
\92l
\8dX
\90V', '
\90V
\82µ
\82¢
\90Ý
\92è
\92l
\82ð
\93ü
\97Í
\82µ
\82Ä
\82
\82¾
\82³
\82¢', input) then begin
2039 input := ZenToHan(input);
2040 if GikoSys.IsNumeric(input) then begin
2041 FSambaTimer.UpdateSambaSetting(StrToInt(input));
2043 //
\91S
\82Ä
\82Ì
\83t
\83H
\81[
\83\80\82©
\82ç
\81ASamba
\83^
\83C
\83}
\81[
\82ð
\8dX
\90V
\82·
\82é
2044 for i := 0 to Screen.FormCount - 1 do begin
2045 if Screen.Forms[i] is TEditorForm then begin
2046 TEditorForm(Screen.Forms[i]).FSambaTimer.Update;
2047 TEditorForm(Screen.Forms[i]).UpdateSambaStatus;
2051 ShowMessage('
\90\94\92l
\82ð
\93ü
\97Í
\82µ
\82Ä
\82
\82¾
\82³
\82¢');
2052 UpdateSambaActionExecute(Sender);
2057 procedure TEditorForm.UpdateSambaStatus;
2059 if (FSambaTimer.Enabled) then begin
2060 StatusBar.Panels[2].Text
2061 := 'Samba24
\8bK
\92è
\92l' + IntToStr(FSambaTimer.SambaInterval);
2065 procedure TEditorForm.InputAssistActionExecute(Sender: TObject);
2071 TextWidth, ItemWidth, tmpWidth: Integer;
2073 if FInputAssistKey = '' then Exit;
2075 InputAssistPopupMenu.Items.Clear;
2077 if (FResistWords = nil) then begin
2078 FResistWords := TStringList.Create;
2083 if (GetKeyState( VK_SHIFT ) < 0) then begin
2084 //
\83V
\83t
\83g
\82ª
\89\9f\82³
\82ê
\82Ä
\82¢
\82ê
\82Î
\81A
\83L
\81[
\82Å
\8en
\82Ü
\82é
\83J
\83e
\83S
\83\8a
2086 InputAssistDM.GetStartWithCategoryResistWords(
2087 FInputAssistKey, FResistWords);
2089 //
\83V
\83t
\83g
\82ª
\96³
\82¢
\82Ì
\82Å
\81A
\83L
\81[
\82Å
\8en
\82Ü
\82é
\83L
\81[
2091 InputAssistDM.GetStartWithKeyResistWords(
2092 FInputAssistKey, FResistWords);
2094 Bitmap := TBitmap.Create;
2096 Bitmap.Canvas.Font.Assign(BodyEdit.Font);
2097 //
\83}
\81[
\83W
\83\935px
2098 TextWidth := Bitmap.Canvas.TextWidth(FInputAssistKey) + 5;
2100 for i := 0 to count - 1 do begin
2101 item := TMenuItem.Create(nil);
2102 item.Break := mbNone;
2103 item.Caption := FResistWords[i];
2105 item.OnClick := InputAssistMenuClick;
2106 InputAssistPopupMenu.Items.Add(item);
2108 tmpWidth := Bitmap.Canvas.TextWidth(Item.Caption);
2109 if (tmpWidth > ItemWidth) then begin
2110 ItemWidth := tmpWidth;
2117 if (count > 0) then begin
2119 point.X := point.X + Self.Left + (Self.Width - BodyEdit.Width) div 2;
2120 point.Y := point.Y + Self.Top + (Self.Height - Self.ClientHeight);
2122 if Screen.DesktopWidth >
2123 (point.X + TextWidth + ItemWidth) then begin
2124 InputAssistPopupMenu.Popup(
2125 point.X + TextWidth,
2126 point.Y + EditorPage.Top + EditorPage.TabHeight + BodyEdit.Top);
2128 InputAssistPopupMenu.Popup(
2129 point.X - TextWidth - ItemWidth,
2130 point.Y + EditorPage.Top + EditorPage.TabHeight + BodyEdit.Top);
2135 procedure TEditorForm.InputAssistMenuClick(Sender: TObject);
2140 if not (Sender is TMenuItem) then Exit;
2142 if (FResistWords <> nil) then begin
2145 TResistWord(FResistWords.Objects[TMenuItem(Sender).Tag]).GetText;
2149 IMC := ImmGetContext(BodyEdit.Handle); //
\83R
\83\93\83e
\83L
\83X
\83g
\8eæ
\93¾
2151 ImmNotifyIME(IMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
2153 ImmReleaseContext(BodyEdit.Handle, IMC); //
\83R
\83\93\83e
\83L
\83X
\83g
\89ð
\95ú
2157 FInputAssistKey := '';
2159 InsertText(BodyEdit, text);
2162 //! TMemo
\82Ì
\83J
\81[
\83\
\83\8b\88Ê
\92u
\82É
\95¶
\8e\9a\97ñ
\91}
\93ü
2163 procedure TEditorForm.InsertText(Memo: TMemo; Text: String);
2165 line, sel, pos: Integer;
2166 left, right : String;
2168 Memo.Lines.BeginUpdate;
2169 line := SendMessage(Memo.Handle,EM_LINEFROMCHAR,-1,0); //
\8ds
2170 sel := Memo.SelStart;
2171 pos := sel - SendMessage(Memo.Handle, EM_LINEINDEX, -1, 0); //
\8c\85
2172 if (pos > 0) then begin
2173 left := Copy(Memo.Lines[line], 0, pos);
2177 right := Copy(Memo.Lines[line], pos + 1, Length(Memo.Lines[line]));
2178 Memo.Lines.Strings[line] := left + Text + right;
2179 Memo.Lines.EndUpdate;
2180 //
\81@
\83L
\83\83\83\8c\83b
\83g
\82Ì
\88Ê
\92u
\82ð
\8dX
\90V
\82·
\82é
2181 Memo.SelStart := sel + Length(text);
2182 //
\83L
\83\83\83\8c\83b
\83g
\82Ì
\88Ê
\92u
\82Ü
\82Å
\83X
\83N
\83\8d\81[
\83\8b
2183 Memo.Perform(EM_SCROLLCARET, 0, 0);
2187 procedure TEditorForm.ApplicationEvents1Message(var Msg: tagMSG;
2188 var Handled: Boolean);
2195 if (Self.Active) then begin
2197 //
\83L
\81[
\89\9f\89º
\82Ì
\82Ý
\8eó
\82¯
\8eæ
\82é
2200 //
\83^
\83u
\82ª
\81h
\95Ò
\8fW
\81h
\82ÅCtrl
\83L
\81[
\82ª
\89\9f\82³
\82ê
\82Ä
\82¢
\82é
\82Ì
\82ð
\8am
\94F
\82·
\82é
2201 if (EditorPage.ActivePageIndex = 0)
2202 and (GetKeyState( VK_CONTROL ) < 0) then begin
2203 wmMsg.Msg := Msg.message;
2204 wmMsg.CharCode := Word(Msg.wParam);
2205 wmMsg.KeyData := Msg.lParam;
2206 if (wmMsg.CharCode = 229) and (wmMsg.KeyData = 3735553) then begin
2207 IMC := ImmGetContext(BodyEdit.Handle); //
\83R
\83\93\83e
\83L
\83X
\83g
\8eæ
\93¾
2208 Len := ImmGetCompositionString(IMC, GCS_COMPSTR, nil, 0); //
\82Ü
\82¸
\92·
\82³
\82ð
\8eæ
\93¾
2209 if (Len > 0) then begin
2210 SetLength(Str, Len + 1); //Buffer
\82Ì
\83\81\83\82\83\8a\82ð
\90Ý
\92è
2211 ImmGetCompositionString(IMC, GCS_COMPSTR, PChar(Str), Len + 1); //
\82Ü
\82¸
\92·
\82³
\82ð
\8eæ
\93¾
2212 SetLength(Str, Len);
2213 FInputAssistKey := Str;
2214 InputAssistActionExecute(nil);
2217 ImmReleaseContext(BodyEdit.Handle, IMC); //
\83R
\83\93\83e
\83L
\83X
\83g
\89ð
\95ú
2226 procedure TEditorForm.ShowInputAssistFormExecute(Sender: TObject);
2228 form : TInputAssistForm;
2230 form := TInputAssistForm.Create(nil);
2232 if TopAction.Checked then begin //
\83X
\83e
\83C
\8fó
\91Ô
\82É
\90Ý
\92è
2233 SetWindowPos(form.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
2235 form.SetUpFromEditor;
2236 if (form.ShowModal = mrOk) then begin
2237 InsertText(BodyEdit, form.GetInsertText);
2243 //! Cookie
\8fî
\95ñ
\8dí
\8f\9c
2244 procedure TEditorForm.ReleaseCookieActionExecute(Sender: TObject);
2248 //
\83X
\83\8c\83b
\83h
\82ª
\96³
\82¢
\81@
\83X
\83\8c\97§
\82Ä
\82Ì
\82Æ
\82«
\82ÍFBoard
\82ð
\92¼
\90Ú
\8eg
\82¤
2251 //
\83N
\83b
\83L
\81[
\82Ì
\8fî
\95ñ
\82ð
\8eÌ
\82Ä
\82é
2255 // 0
\82É
\8aª
\82«
\96ß
\82·
2258 //!
\94Â
\8fî
\95ñ
\8eæ
\93¾Update
\83C
\83x
\83\93\83g
2259 procedure TEditorForm.GetSETTINGTXTActionUpdate(Sender: TObject);
2261 //
\8eÀ
\8ds
\92\86\82Í
\8eÀ
\8ds
\95s
\89Â
2262 GetSETTINGTXTAction.Enabled := not FWork;
2264 //!
\83\8d\81[
\83J
\83\8b\83\8b\81[
\83\8b\8eæ
\93¾Update
\83C
\83x
\83\93\83g
2265 procedure TEditorForm.GetHeadTXTActionUpdate(Sender: TObject);
2267 //
\8eÀ
\8ds
\92\86\82Í
\8eÀ
\8ds
\95s
\89Â
2268 GetSETTINGTXTAction.Enabled := not FWork;
2271 //! Samba
\83^
\83C
\83}
\81[
\83C
\83x
\83\93\83g
2272 procedure TEditorForm.SambaTimer(Sender: TObject);
2275 if FSambaTimer.WriteDeta = ZERO_DATE then
2276 StatusBar.Panels[1].Text := '
\8f\89\8f\91'
2278 FNow := IncMilliSecond(FNow, 500);
2279 StatusBar.Panels[1].Text :=
2280 Format('%8.0f
\95b
\8co
\89ß', [SecondSpan(FNow, FSambaTimer.WriteDeta)]);
2284 \brief
\83E
\83B
\83\93\83h
\83E
\82Ì
\88Ê
\92u
\82Æ
\83T
\83C
\83Y
\82Ì
\90Ý
\92è
2286 procedure TEditorForm.SetWindowRect;
2288 wp: TWindowPlacement;
2290 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\88Ê
\92u
\90Ý
\92è
2291 wp.length := sizeof(wp);
2292 wp.rcNormalPosition.Top := GikoSys.Setting.EditWindowTop;
2293 wp.rcNormalPosition.Left := GikoSys.Setting.EditWindowLeft;
2295 wp.rcNormalPosition.Bottom := GikoSys.Setting.EditWindowTop + GikoSys.Setting.EditWindowHeight;
2296 wp.rcNormalPosition.Right := GikoSys.Setting.EditWindowLeft + GikoSys.Setting.EditWindowWidth;
2297 wp.showCmd := SW_HIDE;
2298 SetWindowPlacement(Handle, @wp);
2300 if GikoSys.Setting.EditWindowMax then begin
2301 WindowState := wsMaximized;
2304 //
\83E
\83B
\83\93\83h
\83E
\82ª
\89æ
\96Ê
\8aO
\82È
\82ç
\89æ
\96Ê
\93à
\82É
\88Ú
\93®
\82·
\82é
2305 if (Left + Width) > Screen.Width then begin
2308 if (Top + Height) > Screen.Height then begin
2311 if Left < 0 then begin
2314 if Top < 0 then begin
2318 //
\8c»
\8dÝ
\82Ì
\83E
\83B
\83\93\83h
\83E
\82Ì
\88Ê
\92u
\82ð
\95Û
\91¶
2319 GikoSys.Setting.EditWindowTop := Top + WINDOWMOVE_V; //
\8e\9f\82É
\8aJ
\82
\83E
\83B
\83\93\83h
\83E
\82Í
2320 GikoSys.Setting.EditWindowLeft := Left + WINDOWMOVE_H; //
\81@
\81@
\81@
\89E
\8eÎ
\82ß
\89º
\82É
\82¸
\82ç
\82·
2321 //
\83E
\83B
\83\93\83h
\83E
\82Ì
\95\9d\82Æ
\8d\82\82³
\82ª
\8f¬
\82³
\82·
\82¬
\82¢
\82ê
\82Î
\8c³
\82É
\96ß
\82·
2322 if GikoSys.Setting.EditWindowHeight < 144 then begin
2325 if GikoSys.Setting.EditWindowWidth < 144 then begin
2330 \brief
\8ag
\92£
\83^
\83u
\90Ý
\92è
2332 procedure TEditorForm.SetExtraTab;
2334 SECTION = 'EditorForm';
2338 ini := TMemIniFile.Create(GikoSys.Setting.GetFileName);
2340 BoardtopTab.TabVisible := ini.Readbool(SECTION, 'BoardTopTab', False);
2341 BoardTop.Checked := BoardtopTab.TabVisible;
2342 RocalRuleTab.TabVisible := ini.ReadBool(SECTION, 'LocalRuleTab', False);
2343 LocalRule.Checked := RocalRuleTab.TabVisible;
2350 \return
\83\8c\83X
\83G
\83f
\83B
\83^
\82ª
\93\8a\8de
\82µ
\82æ
\82¤
\82Æ
\82µ
\82Ä
\82¢
\82é
\94Â
2352 function TEditorForm.GetBoard : TBoard;
2354 //
\83X
\83\8c\83b
\83h
\83A
\83C
\83e
\83\80\82ªnull
\82Ì
\8e\9e\82ÍFBoard
2355 if FThreadItem = nil then begin
2358 Result := FThreadItem.ParentBoard;
2362 \brief GikoForm
\82É
\83\81\83b
\83Z
\81[
\83W
\82ð
\92Ç
\89Á
\82·
\82é
2363 \param icon
\83\81\83b
\83Z
\81[
\83W
\82É
\82Â
\82
\83A
\83C
\83R
\83\93
2365 procedure TEditorForm.AddFormMessageNew(icon: TGikoMessageIcon);
2367 if FThreadItem = nil then begin
2368 GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmNewSure), nil, icon)
2370 GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmNewRes), nil, icon);
2375 \brief
\83\8d\81[
\83J
\83\8bfusiana
\83g
\83\89\83b
\83v
2376 \return true:
\91\97\90M
\92\86\8e~ false:
\91\97\90M
2378 function TEditorForm.isLocalFusianaTrap: Boolean;
2383 if GikoSys.Setting.LocalTrapAtt then begin
2384 Namae := THTMLCreate.RepHtml(NameComboBox.Text);
2385 if (LFusianaGet(Namae)) or (Namae = '
\8eR
\8dè
\8fÂ') then begin
2386 if FusianaMsgBox = IDNO then begin
2393 \brief
\83\8a\83\82\81[
\83gfusiana
\83g
\83\89\83b
\83v
2394 \return true:
\91\97\90M
\92\86\8e~ false:
\91\97\90M
2396 function TEditorForm.isRemoteFusianaTrap: Boolean;
2404 Namae := THTMLCreate.RepHtml(NameComboBox.Text);
2405 if (GikoSys.Setting.RemoteTrapAtt) and (Length(Namae) = 0) then begin
2408 if Board = nil then Exit;
2410 if not FileExists(Board.GetSETTINGTXTFileName) then begin
2411 //Setting.txt
\82ª
\82È
\82©
\82Á
\82½
\82ç
\8eæ
\93¾
2412 //
\8eI
\82É
\95\89\89×
\82ª
\82©
\82©
\82è
\82»
\82¤...
2414 GetSETTINGTXTAction.Execute;
2420 if FileExists(Board.GetSETTINGTXTFileName) then begin
2421 body := TStringList.Create;
2423 body.LoadFromFile(Board.GetSETTINGTXTFileName);
2424 Remote := GetFusianaName(body, Board);
2430 if LFusianaGet(Remote) then begin
2431 if FusianaMsgBox = IDNO then begin
2438 \brief Header
\95¶
\8e\9a\97ñ
\8eæ
\93¾
2439 \param ACOOKIE Cookie
2443 \return Header
\95¶
\8e\9a\97ñ
2445 function TEditorForm.getHeaderStr(const ACOOKIE: string; const SPID : string;
2446 const PON : string; Board : TBoard) : string;
2450 Result := Result + 'SPID=' + SPID + '; ';
2452 Result := Result + 'PON=' + PON + '; ';
2454 //
\83z
\83X
\83g
\82ª2ch
\82Å
\81ABe
\82ÉLogin
\82µ
\82Ä
\82¢
\82ê
\82ÎBE
\82Ì
\83f
\81[
\83^
\82ð
\91\97\82é
2455 //GikoSys.ParseURI( URL, Protocol,Host, Path, Document, Port, Bookmark );
2456 //if GikoSys.Is2chHost(Host) and GikoSys.Setting.BeLogin then
2457 if (Board.Is2ch) then begin
2458 //
\8cÅ
\92è
\82Ì
\83N
\83b
\83L
\81[
\82ª
\82 \82ê
\82Î
\90H
\82í
\82¹
\82é
2459 if Length(GikoSys.Setting.FixedCookie) > 0 then begin
2460 //
\83z
\83X
\83g
\82ª2ch
\82Ì
\8fê
\8d\87\81C
\8cÅ
\92è
\82Ì
\83N
\83b
\83L
\81[
\82ð
\90H
\82í
\82¹
\82é
2461 Result := Result + GikoSys.Setting.FixedCookie + '; ';
2463 if (GikoSys.Setting.BeLogin) then begin
2464 Result := Result + 'MDMD=' + GikoSys.Setting.BeCode + '; '
2465 + 'DMDM=' + GikoSys.Setting.BeUserID + '; ';
2469 Result := 'Cookie: ' + Result + 'NAME=' + NameComboBox.Text + '; MAIL=' + MailComboBox.Text;
2473 \brief fusiana
\8cx
\8d\90\83_
\83C
\83A
\83\8d\83O
2474 \return IDYES
\8f\91\82«
\8d\9e\82Þ IDNO
\92\86\8e~
2476 function TEditorForm.FusianaMsgBox: Integer;
2478 MSG_FUSIANA : string = '
\83\8a\83\82\81[
\83g
\83z
\83X
\83g
\82ð
\95\
\8e¦
\82·
\82é
\8b@
\94\
\82ª
\8eg
\82í
\82ê
\82Ä
\82¢
\82Ü
\82·'#13#10 +
2479 '
\82à
\82µ
\82à
\8aÔ
\88á
\82Á
\82Ä
\82±
\82Ì
\95û
\96@
\82Å
\83z
\83X
\83g
\82ª
\95\
\8e¦
\82³
\82ê
\82½
\82Æ
\82µ
\82Ä
\82à
\81A
\8e©
\8cÈ
\90Ó
\94C
\82È
\82Ì
\82Å
\8dí
\8f\9c\88Ë
\97\8a\82É
\82Í
\89\9e\82¶
\82Ü
\82¹
\82ñ
\81B' +
2480 #13#10#13#10'
\90Ó
\94C
\82ð
\95\89\82¤
\82±
\82Æ
\82ð
\8f³
\91ø
\82µ
\82Ä
\8f\91\82«
\8d\9e\82Ý
\82Ü
\82·
\82©
\81H';
2482 Result := MsgBox(Handle, MSG_FUSIANA, '
\8fî
\95ñ',
2483 MB_YESNO or MB_ICONQUESTION);
2486 \brief
\98A
\93\8a\83\82\81[
\83hON/OFF
\90Ø
\82è
\91Ö
\82¦
2488 procedure TEditorForm.ContinueModeActionExecute(Sender: TObject);
2490 ContinueModeAction.Checked := not ContinueModeAction.Checked;
2493 \brief
\98A
\93\8a\83\82\81[
\83h
\8dX
\90V
\8f\88\97\9d
2495 procedure TEditorForm.ContinueModeActionUpdate(Sender: TObject);
2497 //
\83X
\83\8c\82½
\82Ä
\82Ì
\82Æ
\82«
\82Í
\96³
\8cø
2498 ContinueModeAction.Enabled := FThreadItem <> nil;
2501 \brief
\8f\91\82«
\8d\9e\82Þ
\94Â/
\83X
\83\8c\83b
\83h
\82ð
\95\
\8e¦
\82·
\82é
2503 procedure TEditorForm.OpenSendTargetActionExecute(Sender: TObject);
2505 if (FThreadItem <> nil) then begin
2506 //
\83\81\83C
\83\93\82ð
\8dX
\90V
\82µ
\82Ä
\82µ
\82Ü
\82¤
\82Ì
\82Å
\89æ
\96Ê
\82ª
\83p
\83^
\83p
\83^
\90Ø
\82è
\91Ö
\82í
\82é
\82Ì
\82ð
\96h
\82®
\82½
\82ß
\82É
2507 //
\91O
\96Ê
\82Å
\8cÅ
\92è
\82·
\82é
2508 if not (fsShowing in Self.FormState) then begin
2509 //
\83X
\83e
\83C
\8fó
\91Ô
\82É
\90Ý
\92è
2510 SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
2513 //
\83X
\83\8c\83b
\83h
2514 GikoForm.InsertBrowserTab(FThreadItem, True);
2516 if not TopAction.Checked then begin //
\83X
\83e
\83C
\8fó
\91Ô
\89ð
\8f\9c
2517 SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
2523 GikoForm.SelectTreeNode(
2527 procedure TEditorForm.ReloadTargetActionExecute(Sender: TObject);
2529 if (FThreadItem <> nil) then begin
2530 //
\83X
\83\8c\83b
\83h
2531 //
\83\81\83C
\83\93\82ð
\8dX
\90V
\82µ
\82Ä
\82µ
\82Ü
\82¤
\82Ì
\82Å
\89æ
\96Ê
\82ª
\83p
\83^
\83p
\83^
\90Ø
\82è
\91Ö
\82í
\82é
\82Ì
\82ð
\96h
\82®
\82½
\82ß
\82É
2532 //
\91O
\96Ê
\82Å
\8cÅ
\92è
\82·
\82é(
\83_
\83E
\83\93\83\8d\81[
\83h
\82ª
\94
\90¶
\82·
\82é
\82Æ
\90Ø
\82è
\91Ö
\82í
\82Á
\82Ä
\82µ
\82Ü
\82¤
\82ª
\82 \82«
\82ç
\82ß
\82é)
2533 if not (fsShowing in Self.FormState) then begin
2534 //
\83X
\83e
\83C
\8fó
\91Ô
\82É
\90Ý
\92è
2535 SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
2538 GikoForm.DownloadContent(FThreadItem);
2540 if not TopAction.Checked then begin //
\83X
\83e
\83C
\8fó
\91Ô
\89ð
\8f\9c
2541 SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
2547 GikoForm.DownloadList(GetBoard);