IdAntiFreezeBase, IdAntiFreeze, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdHTTP, ActnList, StdActns, IdIntercept,
IdLogBase, IdLogDebug, IdException, DateUtils, bmRegExp,
- Gesture, AppEvnts, SambaTimer;
+ Gesture, AppEvnts, SambaTimer, IdCookieManager, WideMemo;
type
// TSetLayeredWindowAttributes = function(wnd: HWND; crKey: DWORD; bAlpha: BYTE; dwFlag: DWORD): Boolean; stdcall;
//\8f\91\82«\8d\9e\82Ý\96ß\82è\92l\83^\83C\83v
- TGikoResultType = (grtOK, grtCookie, grtCheck, grtError);
+ TGikoResultType = (grtOK, grtCookie, grtCheck, grtError, grtNinpou, grtNinpouErr, grtSuiton);
TEditorForm = class(TForm)
MainMenu: TMainMenu;
N7: TMenuItem;
InputAssistAction: TAction;
InputAssistPopupMenu: TPopupMenu;
- BodyEdit: TMemo;
ApplicationEvents1: TApplicationEvents;
ToolButton8: TToolButton;
ToolButton9: TToolButton;
ShowInputAssistForm: TAction;
ReleaseCookieAction: TAction;
Cookie1: TMenuItem;
+ ContinueModeAction: TAction;
+ ToolButton10: TToolButton;
+ ToolButton11: TToolButton;
+ OpenSendTargetAction: TAction;
+ ReloadTargetAction: TAction;
+ N8: TMenuItem;
+ N9: TMenuItem;
+ N10: TMenuItem;
+ UCInfoPanel: TPanel;
+ BodyEdit: TMemo;
procedure EditorPageChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure ReleaseCookieActionExecute(Sender: TObject);
procedure GetSETTINGTXTActionUpdate(Sender: TObject);
procedure GetHeadTXTActionUpdate(Sender: TObject);
+ procedure ContinueModeActionExecute(Sender: TObject);
+ procedure ContinueModeActionUpdate(Sender: TObject);
+ procedure OpenSendTargetActionExecute(Sender: TObject);
+ procedure ReloadTargetActionExecute(Sender: TObject);
private
FThreadItem: TThreadItem;
FBoard: TBoard;
FDebugStrReceive: string;
FDebugStrSend: string;
FNow: TDateTime;
- FGestures : TMouseGesture;
FInputAssistKey: String; ///< \93ü\97Í\83A\83V\83X\83g\82Ì\83L\81[
FResistWords: TStringList; ///< \93ü\97Í\83A\83V\83X\83g\82Ì\8e«\8f\91\82©\82ç\82Ì\8c\9f\8dõ\8c\8b\89Ê
FSambaTimer: TSambaTimer; ///< Samba\91Î\8dô\82Ì\83^\83C\83}\81[
+ FCookieDomain: string; ///< \94E\96@\92\9f\83h\83\81\83C\83\93
+ FUseUC: Boolean;
+ BodyEditUC: TWideMemo;
procedure Preview;
function Check: Boolean;
procedure SetNameList(sName, sMail: string);
//HEAD.TXT\8e©\93®\95\\8e¦
procedure ShowBoardHead(ABoard: TBoard; AMemo: TMemo);
//LocalFusianaTrapAlart
- function LFusianaGet(s: String): Boolean;
+ function LFusianaGet(const s: String): Boolean;
// Cookie\82Ì\8eæ\93¾
- procedure GetCookie(Rawtext: String; ABoard: TBoard);
+ procedure GetCookie(CookieMng: TIdCookieManager; ABoard: TBoard);
+ // hidden\83f\81[\83^\8eæ\93¾
+ procedure GetHiddenParameter(Rawtext: String; ABoard: TBoard);
//! \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
procedure InputAssistMenuClick(Sender: TObject);
//! TMemo\82Ì\83J\81[\83\\83\8b\88Ê\92u\82É\95¶\8e\9a\97ñ\91}\93ü
procedure SetExtraTab;
//! \94Â\8eæ\93¾
function GetBoard : TBoard;
- //! URL\82Ì\83f\81[\83^\82ðstream\82É\8eæ\82è\8d\9e\82Þ
+ //! URL\82Ì\83f\81[\83^\82ðstream\82É\8eæ\82è\8d\9e\82Þ
procedure GetWebData(const URL: string; const RefURL: string;
Modified: TDateTime; stream: TStream);
//! GikoForm\82É\90V\92\85\83\81\83b\83Z\81[\83W\82ð\92Ç\89Á\82·\82é
procedure AddFormMessageNew(icon: TGikoMessageIcon);
//! \83\8d\81[\83J\83\8bfusiana\83g\83\89\83b\83v
- function isLocalFusianaTrap(const MSG: string): Boolean;
+ function isLocalFusianaTrap: Boolean;
//! \83\8d\81[\83J\83\8bfusiana\83g\83\89\83b\83v
- function isRemoteFusianaTrap(const MSG: string): Boolean;
+ function isRemoteFusianaTrap: Boolean;
//! Header\95¶\8e\9a\97ñ\8eæ\93¾
function getHeaderStr(const ACOOKIE: string; const SPID : string;
- const PON : string; Board : TBoard) : string;
+ const PON : string; const HAP : string; Board : TBoard) : string;
+ //! fusiana\8cx\8d\90\83_\83C\83A\83\8d\83O
+ function FusianaMsgBox: Integer;
+ //! sent.ini\83t\83@\83C\83\8b\82Ì\90¶\90¬
+ function CreateSentIniFile: TMemIniFile;
+ //! \8cë\94\9a\83`\83F\83b\83N
+ function isGobaku: Boolean;
protected
procedure CreateParams(var Params: TCreateParams); override;
public
procedure SetThreadItem(Item: TThreadItem);
procedure SetBoard(Item: TBoard);
procedure UpdateSambaStatus;
+ procedure SetFocusEdit;
+ procedure SetTextEdit(TextSrc: String);
property BBSID: string read FBBSID write FBBSID;
end;
uses
Giko, ItemDownload, MojuUtils, IdGlobal, GikoMessage, Imm,
- InputAssistDataModule, InputAssist, HTMLCreate;
+ InputAssistDataModule, InputAssist, HTMLCreate, IdCookie, GikoDataModule,
+ Belib;
const
CAPTION_NAME_NEW: string = '\83M\83R\83i\83r \83X\83\8c\97§\82Ä\83G\83f\83B\83^';
CAPTION_NAME_RES: string = '\83M\83R\83i\83r \83\8c\83X\83G\83f\83B\83^';
procedure TEditorForm.FormCreate(Sender: TObject);
begin
+ FUseUC := GikoSys.Setting.UseUnicode;
+
+ BodyEditUC := TWideMemo.Create(Self);
+ BodyEditUC.Parent := EditorTab;
+ BodyEditUC.Align := alClient;
+ BodyEditUC.ScrollBars := ssBoth;
+
+ if (FUseUC = True) then begin
+ BodyEditUC.Visible := True;
+ BodyEdit.Visible := False;
+ EditorTab.Caption := EditorTab.Caption + '(Unicode\83\82\81[\83h)';
+ end else begin
+ BodyEditUC.Visible := False;
+ BodyEdit.Visible := True;
+ EditorTab.Caption := EditorTab.Caption + '(Shift-JIS\83\82\81[\83h)';
+ end;
+
FWork := False;
FSambaTimer := TSambaTimer.Create(Self);
FSambaTimer.Interval := 0;
Browser.Navigate('about:blank');
TitlePictureBrowser.Navigate('about:blank');
+ WebBrowser1.Navigate('about:blank');
FBoard := nil;
FThreadItem := nil;
- //\83E\83B\83\93\83h\83E\82Ì\88Ê\92u\90Ý\92è
- SetWindowRect;
+ if (Owner <> nil) and (Owner.ClassNameIs('TKeySettingForm') = False) then
+ //\83E\83B\83\93\83h\83E\82Ì\88Ê\92u\90Ý\92è
+ SetWindowRect;
EditorPage.ActivePage := EditorTab;
FNameComboEdit := GetWindow(NameComboBox.Handle, GW_CHILD);
// \83L\81[\90Ý\92è\82Ì\93Ç\82Ý\8d\9e\82Ý
GikoSys.LoadKeySetting(ActionList, GikoSys.GetEditorKeyFileName);
- // \83}\83E\83X\83W\83F\83X\83`\83\83\81[\82Ì\83C\83\93\83X\83g\81[\83\8b
- if GikoSys.Setting.GestureEnabled then begin
- MouseGesture.UnHook;
- FGestures := TMouseGesture.Create;
- GikoSys.Setting.Gestures.ClearGesture;
-
- GikoSys.Setting.Gestures.LoadGesture(
- GikoSys.Setting.GetGestureFileName, ActionList );
- MouseGesture.OnGestureStart := OnGestureStart;
- MouseGesture.OnGestureMove := OnGestureMove;
- MouseGesture.OnGestureEnd := OnGestureEnd;
- MouseGesture.SetHook( Handle );
- end;
SaveNameMailAction.Checked := True;
end;
procedure TEditorForm.SetBoard(Item: TBoard);
TAB_LENGTH = 4;
begin
- body := BodyEdit.Text;
+ if (FUseUC = True) then
+ body := BodyEditUC.EncodeText
+ else
+ body := BodyEdit.Text;
+
if AmpToCharRefAction.Checked then
// & \82Ì\92u\8a·\82Í\88ê\94Ô\8dÅ\8f\89\82É\82â\82é\82±\82Æ
body := CustomStringReplace( body, '&', '&' );
procedure TEditorForm.SetFont;
begin
- BodyEdit.Font.Name := GikoSys.Setting.EditorFontName;
- BodyEdit.Font.Size := GikoSys.Setting.EditorFontSize;
- BodyEdit.Font.Color := GikoSys.Setting.EditorFontColor;
- BodyEdit.Color := GikoSys.Setting.EditorBackColor;
+ if (FUseUC = True) then begin
+ BodyEditUC.Font.Name := GikoSys.Setting.EditorFontName;
+ BodyEditUC.Font.Size := GikoSys.Setting.EditorFontSize;
+ BodyEditUC.Font.Color := GikoSys.Setting.EditorFontColor;
+ BodyEditUC.Color := GikoSys.Setting.EditorBackColor;
+ end else begin
+ BodyEdit.Font.Name := GikoSys.Setting.EditorFontName;
+ BodyEdit.Font.Size := GikoSys.Setting.EditorFontSize;
+ BodyEdit.Font.Color := GikoSys.Setting.EditorFontColor;
+ BodyEdit.Color := GikoSys.Setting.EditorBackColor;
+ end;
end;
procedure TEditorForm.Preview;
Msg: string;
rc: Integer;
Board: TBoard;
+ BodyLen: Integer;
begin
Result := True;
Board := GetBoard;
+ if (FUseUC = True) then
+ BodyLen := Length(BodyEditUC.EncodeText)
+ else
+ BodyLen := Length(BodyEdit.Text);
+
if (not GikoSys.Setting.UseMachineTime) and
((Board.LastGetTime = 0) or
(Board.LastGetTime = ZERO_DATE)) then begin
+ '\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¢';
MsgBox(Handle, Msg, ERROR, MB_OK or MB_ICONSTOP);
Result := False;
- end else if BodyEdit.Text = '' then begin
+ end else if BodyLen = 0 then begin
Msg := '\96{\95¶' + REQUIRED;
MsgBox(Handle, Msg, ERROR, MB_OK or MB_ICONSTOP);
Result := False;
procedure TEditorForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
- FSambaTimer.Free;
end;
procedure TEditorForm.FormDestroy(Sender: TObject);
var
wp: TWindowPlacement;
begin
- //\8dÅ\91å\89»\81E\83E\83B\83\93\83h\83E\88Ê\92u\95Û\91¶
- wp.length := sizeof(wp);
- GetWindowPlacement(Handle, @wp);
-
- GikoSys.Setting.EditWindowTop := wp.rcNormalPosition.Top;
- GikoSys.Setting.EditWindowLeft := wp.rcNormalPosition.Left;
- GikoSys.Setting.EditWindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
- GikoSys.Setting.EditWindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
- GikoSys.Setting.EditWindowMax := WindowState = wsMaximized;
- //GikoSys.Setting.EditWindowStay := FormStyle = fsStayOnTop; // \83X\83e\83C\8fó\91Ô\82Ì\95Û\91¶
- GikoSys.Setting.EditWindowTranslucent := TransAction.Checked; // \94¼\93§\96¾\8fó\91Ô\82Ì\95Û\91¶
+ FSambaTimer.Free;
- FGestures.Free;
+ if (Owner <> nil) and (Owner.ClassNameIs('TKeySettingForm') = False) then begin
+ //\8dÅ\91å\89»\81E\83E\83B\83\93\83h\83E\88Ê\92u\95Û\91¶
+ wp.length := sizeof(wp);
+ GetWindowPlacement(Handle, @wp);
+
+ GikoSys.Setting.EditWindowTop := wp.rcNormalPosition.Top;
+ GikoSys.Setting.EditWindowLeft := wp.rcNormalPosition.Left;
+ GikoSys.Setting.EditWindowHeight := wp.rcNormalPosition.Bottom - wp.rcNormalPosition.Top;
+ GikoSys.Setting.EditWindowWidth := wp.rcNormalPosition.Right - wp.rcNormalPosition.Left;
+ GikoSys.Setting.EditWindowMax := WindowState = wsMaximized;
+ //GikoSys.Setting.EditWindowStay := FormStyle = fsStayOnTop; // \83X\83e\83C\8fó\91Ô\82Ì\95Û\91¶
+ GikoSys.Setting.EditWindowTranslucent := TransAction.Checked; // \94¼\93§\96¾\8fó\91Ô\82Ì\95Û\91¶
+ end;
+ BodyEditUC.Free;
end;
procedure TEditorForm.SetNameList(sName, sMail: string);
Result := FNameComboEdit
else if ActiveControl = MailComboBox then
Result := FMailComboEdit
+ else if ActiveControl = BodyEditUC then
+ Result := BodyEditUC.Handle
else if ActiveControl = BodyEdit then
Result := BodyEdit.Handle
else if ActiveControl = TitleEdit then
procedure TEditorForm.SetContent(Content: string; ABrowser: TWebBrowser);
var
- doc: Variant;
+ doc: OleVariant;
begin
- if ABrowser.Document <> nil then begin
- doc := Idispatch( olevariant(ABrowser.ControlInterface).Document) as IHTMLDocument2;
+ if Assigned(ABrowser.ControlInterface.Document) then begin
+ doc := OleVariant(ABrowser.Document);
doc.Clear;
doc.open;
doc.charset := 'Shift_JIS';
http.ProxyParams.ProxyUsername := '';
http.ProxyParams.ProxyPassword := '';
end;
- Indy.Request.UserAgent := GikoSys.GetUserAgent;
- Indy.Request.AcceptEncoding := '';
+ http.Request.UserAgent := GikoSys.GetUserAgent;
+ http.Request.AcceptEncoding := '';
+ http.AllowCookies := True;
+ http.ReadTimeout := GikoSys.Setting.ReadTimeOut;
+ http.ConnectTimeout := GikoSys.Setting.ReadTimeOut;
end;
//! \91\97\90M\92\86\8e~\82Ì\82½\82ß\82Ì\83\81\83j\83\85\81[\82Ì\8dÄ\90¶
procedure TEditorForm.CancelSend(ABoard: TBoard; ASysMenu: HMENU);
procedure TEditorForm.Send( const ACOOKIE: string; const SPID: string;
const PON: string; FirstWriting: Boolean);
-const
- 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 +
- '\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' +
- #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';
var
TextStream: TStringStream;
Source: TStringStream;
MsgResult: Integer;
Board: TBoard;
sysMenu : HMENU;
+ ExpMsg: String;
{Protocol,Host, Path, Document, Port, Bookmark : String;}
begin
FAbort := False;
State := gdsError;
Board := GetBoard;
-
InitIdHTTP(Indy);
if FThreadItem = nil then begin
URL := FBoard.GetSendURL;
URL := FThreadItem.GetSendURL;
Indy.Request.Referer := FThreadItem.URL;
end;
-
sysMenu := GetSystemMenu( Handle, false );
EnableMenuItem( sysMenu, SC_CLOSE, MF_GRAYED );
{
Indy.Request.AcceptLanguage := 'ja';
Indy.Request.Accept := 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*';
Indy.Request.ContentType := 'application/x-www-form-urlencoded';
- Indy.Request.CustomHeaders.Add(getHeaderStr(ACOOKIE, SPID, PON, Board));
+ Indy.Request.CustomHeaders.Add(getHeaderStr(ACOOKIE, SPID, PON, GikoSys.GetBouken(URL, FCookieDomain), Board));
TextStream := TStringStream.Create('');
Source := TStringStream.Create('');
try
if (FirstWriting) then begin
//\83t\83V\83A\83i\83g\83\89\83b\83v\8cx\8d\90(LocalMode) by \92è\8aú\95Ö
- if (isLocalFusianaTrap(MSG_FUSIANA)) then begin
+ if (isLocalFusianaTrap) then begin
CancelSend( Board, SysMenu );
Exit;
end;
//\83t\83V\83A\83i\83g\83\89\83b\83v\8cx\8d\90(Remote)
- if (isRemoteFusianaTrap(MSG_FUSIANA)) then begin
+ if (isRemoteFusianaTrap) then begin
+ CancelSend( Board, SysMenu );
+ Exit;
+ end;
+ // \8cë\94\9a\83`\83F\83b\83N
+ if (isGobaku) then begin
CancelSend( Board, SysMenu );
Exit;
end;
begin
FSambaTimer.WriteSambaTime(Now());
end;
+ GetCookie(Indy.CookieManager, Board);
State := gdsComplete;
end else if ResultType = grtCookie then begin
//\83\8b\81[\83v\96h\8e~
MB_YESNO or MB_ICONQUESTION);
if MsgResult = IDYES then begin
- GetCookie(Indy.Response.RawHeaders.Text, Board);
+ GetCookie(Indy.CookieManager, Board);
+ if (Board.Is2ch) then begin
+ GetHiddenParameter(ResponseText, Board);
+ end;
if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then
raise Exception.Create('');
-
//\82à\82¤\88ê\89ñ\82±\82Ì\83\81\83\\83b\83h
Send(Board.Cookie, Board.SPID, Board.PON, False);
Exit;
MB_YESNO or MB_ICONQUESTION);
if MsgResult = IDYES then begin
- GetCookie(Indy.Response.RawHeaders.Text, Board);
+ GetCookie(Indy.CookieManager, Board);
+ if (Board.Is2ch) then begin
+ GetHiddenParameter(ResponseText, Board);
+ end;
if (Board.SPID = '') and (Board.PON = '') and (Board.Cookie = '') then
raise Exception.Create('');
+
Send(Board.Cookie, Board.SPID, Board.PON, False);
Exit;
end else begin
CancelSend( Board, SysMenu );
Exit;
end;
+ end else if ResultType = grtNinpou then begin
+ MsgBox( Handle,
+ '\8bM\95û\82Ì\94E\96@\92\9f\82ð\8dì\90¬\92\86\82Å\82·\81B\88ø\82«\95Ô\82·\82È\82ç\82¢\82Ü\82¾\81B(\82Q\95ª\82Ù\82Ç\82©\82©\82è\82Ü\82·)' + #13#10
+ , '\8am\94F',
+ MB_OK or MB_ICONINFORMATION);
+ if (GikoSys.Setting.UseSamba) and (FSambaTimer.Enabled) then
+ begin
+ FSambaTimer.WriteSambaTime(Now());
+ end;
+ Board.PON := '';
+ Board.SPID := '';
+ Board.Cookie := '';
+ GetCookie(Indy.CookieManager, Board);
+ Exit;
+ end else if ResultType = grtSuiton then begin
+ MsgBox( Handle,
+ '\8bM\95û\82Ì\94E\96@\92\9f\82Í\8fÄ\82©\82ê\82Ü\82µ\82½\81B' + #13#10 +
+ '\94E\96@\92\9f\82ð\8dí\8f\9c\82µ\82Ü\82µ\82½\81A\8dÄ\91\97\90M\82µ\82Ä\82\82¾\82³\82¢\81B'
+ , '\8am\94F',
+ MB_OK or MB_ICONINFORMATION);
+ // \94E\96@\92\9f\8aª\95¨\82ð\8fÁ\82·
+ GikoSys.DelBoukenCookie(FCookieDomain);
+ GikoSys.Setting.WriteBoukenSettingFile;
+ Board.PON := '';
+ Board.SPID := '';
+ Board.Cookie := '';
+ Exit;
end else begin
if (GikoSys.Setting.UseSamba) and (FSambaTimer.Enabled) then
begin
FSambaTimer.WriteSambaTime(Now());
end;
-
+ // \94E\96@\92\9f\8aª\95¨\83G\83\89\81[\82ÍCookie\82ð\8dX\90V\82·\82é
+ if ResultType = grtNinpouErr then begin
+ GetCookie(Indy.CookieManager, Board);
+ end;
State := gdsError;
raise Exception.Create('');
end;
except
+ on E: EIdSocketError do begin
+ State := gdsError;
+ ResponseText := '<html><body>'
+ + '<div>\90Ú\91±\82ª\8e¸\94s\82µ\82Ü\82µ\82½<br>'
+ + '\89ñ\90ü\82Ì\8fó\91Ô\82ð\92²\82×\82Ä\82\82¾\82³\82¢<br></div>'
+ + '<br><br><div>' + E.Message + '</div>'
+ + '</body></html>';
+ end;
on E: EIdConnectException do begin
State := gdsError;
ResponseText := '<html><body>'
FDebugStrReceive := AnsiReplaceText(FDebugStrReceive, '>', '>');
FDebugStrSend := AnsiReplaceText(FDebugStrSend, '<', '<');
FDebugStrSend := AnsiReplaceText(FDebugStrSend, '>', '>');
+ ExpMsg := AnsiReplaceText(E.Message, '<', '<');
+ ExpMsg := AnsiReplaceText(ExpMsg, '>', '>');
ResponseText := '<html><body>' + TextStream.DataString;
ResponseText := AnsiReplaceText(ResponseText, '</body>', '');
ResponseText := AnsiReplaceText(ResponseText, '</html>', '');
ResponseText := ResponseText + '<hr><div align="left"><pre>';
ResponseText := ResponseText + '<b>\82±\82±\82©\82ç\83M\83R\83i\83r\82Ì\8fî\95ñ</b>'#13#10;
+ ResponseText := ResponseText + #13#10'\81\9c\97á\8aO'#13#10;
+ ResponseText := ResponseText + ExpMsg;
ResponseText := ResponseText + #13#10'\81\9c\91\97\90M'#13#10;
ResponseText := ResponseText + FDebugStrSend;
ResponseText := ResponseText + #13#10'\81\9c\8eó\90M'#13#10;
finally
Source.Free;
TextStream.Free;
+ if ( Indy.CookieManager <> nil ) then begin
+ Indy.CookieManager.CookieCollection.Clear;
+ end;
//sysMenu := GetSystemMenu( Handle, true );
EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
DrawMenuBar(Handle);
GikoForm.PlaySound('ResEnd');
SaveSendFile;
AddFormMessageNew( gmiOK );
- Close;
- Exit;
+ if (not ContinueModeAction.Enabled) or (not ContinueModeAction.Checked) then begin
+ Close;
+ Exit;
+ end;
end;
if State = gdsComplete then begin
GikoForm.PlaySound('ResEnd');
SaveSendFile;
AddFormMessageNew( gmiOK );
- Close;
+ if (not ContinueModeAction.Enabled) or (not ContinueModeAction.Checked) then begin
+ Close;
+ end;
end else if State = gdsError then begin
AddFormMessageNew( gmiOK );
EditorPage.ActivePage := PreviewTab;
begin
if AnsiPos('\8f\91\82«\82±\82Ý\82ª\8fI\82í\82è\82Ü\82µ\82½', ResponseText) <> 0 then
Result := grtOK
- else if (AnsiPos('\83N\83b\83L\81[\82ª\82È\82¢\82©\8aú\8cÀ\90Ø\82ê\82Å\82·', ResponseText) > 0) or
+ else if ( (AnsiPos('<b>\82æ\82¤\82±\82»\81F\8bM\95û\82Ì\94E\96@\92\9f\82ð\8dì\90¬\82µ\82Ü\82·\81B\82Q\95ª\8cã\82É\8dÄ\93x\8f\91\82«\8d\9e\82Þ\82©\81A\82¨\8bA\82è\82\82¾\82³\82¢', ResponseText) > 0) or
+ (AnsiPos('\82d\82q\82q\82n\82q\81F\8bM\95û\82Ì\96`\8c¯\82Ì\8f\91\82ð\8dì\90¬\92\86\82Å\82·', ResponseText) > 0) )
+ and (AnsiPos(RES2CH_COOKIE, ResponseText) > 0) then
+ Result := grtNinpou
+ else if ( (AnsiPos('\82d\82q\82q\82n\82q\81F\8fC\8ds\82ª\91«\82è\82Ü\82¹\82ñ', ResponseText) > 0) or // \83G\83\89\81[\88µ\82¢
+ (AnsiPos('\82d\82q\82q\82n\82q\81FLv\82ª\91«\82è\82È\82\82Ä\83X\83\8c\83b\83h\97§\82Ä', ResponseText) > 0) ) // \83G\83\89\81[\88µ\82¢
+ and (AnsiPos(RES2CH_COOKIE, ResponseText) > 0) then
+ Result := grtNinpouErr
+ else if( AnsiPos('<b>\82â\82ç\82ê\82½\82Å\82²\82´\82é\81FLv=0 <br>\82³\82Ä\8e©\97Í\82Å\95\9c\8a\88\82Å\82«\82é\82©\82È?', ResponseText) > 0)
+ and (AnsiPos(RES2CH_COOKIE, ResponseText) > 0) then
+ Result := grtSuiton
+ else if ( AnsiPos('\83N\83b\83L\81[\82ª\82È\82¢\82©\8aú\8cÀ\90Ø\82ê\82Å\82·', ResponseText) > 0) or
(AnsiPos('<title>\83N\83b\83L\81[\8am\94F\81I</title>', ResponseText) > 0) or
- (AnsiPos('<title>\81¡\83N\83b\83L\81[\8am\94F\81I\81¡</title>', ResponseText) > 0) or
- //(AnsiPos('\83N\83b\83L\81[\8am\94F', ResponseText) > 0) or
- (AnsiPos(RES2CH_COOKIE, ResponseText) > 0) then
+ (AnsiPos('<title>\81¡\83N\83b\83L\81[\8am\94F\81I\81¡</title>', ResponseText) > 0) or
+ (AnsiPos(RES2CH_COOKIE, ResponseText) > 0) then
Result := grtCookie
else if (AnsiPos('<font size=+2 color=#FF0000>\8f\91\82«\8d\9e\82Ý\83`\83F\83b\83N\81I </font>', ResponseText) > 0) or
(AnsiPos('<title>\81¡ \8f\91\82«\8d\9e\82Ý\8am\94F\82µ\82Ü\82· \81¡</title>', ResponseText) > 0) or
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
(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
Result := grtCookie
- else
- Result := grtError;
+ else if (AnsiPos('\8f\91\82«\82±\82Ý\81\95\83N\83b\83L\81[\8am\94F', ResponseText) > 0) or
+ (AnsiPos('(cookie\82ð\90Ý\92è\82·\82é\82Æ\82±\82Ì\89æ\96Ê\82Í\82Å\82È\82\82È\82è\82Ü\82·\81B)', ResponseText) > 0) then
+ Result := grtCookie
+ else
+ Result := grtError;
end;
var
sDate: string;
ini: TMemIniFile;
-begin
- ini := TMemIniFile.Create(GikoSys.GetSentFileName);
- try
- sDate := IntToStr(GikoSys.DateTimeToInt(Now));
-
- ini.WriteString(sDate, 'Name', NameComboBox.Text);
- ini.WriteString(sDate, 'EMail', MailComboBox.Text);
- ini.WriteString(sDate, 'Body', HttpEncode(BodyEdit.Text));
- ini.WriteInteger(sDate, 'Status', FStatusCode);
- ini.WriteDateTime(sDate, 'Date', Now);
- if FThreadItem = nil then begin
- ini.WriteString(sDate, 'Title', MojuUtils.Sanitize(TitleEdit.Text));
- ini.WriteString(sDate, 'BBS', FBoard.BBSID);
- ini.WriteInteger(sDate, 'NewThread', 1);
- end else begin
- ini.WriteString(sDate, 'Title', FThreadItem.Title);
- ini.WriteString(sDate, 'BBS', FThreadItem.ParentBoard.BBSID);
- ini.WriteString(sDate, 'Key', ChangeFileExt(FThreadItem.FileName, ''));
- end;
+ Body: String;
+begin
+ ini := CreateSentIniFile;
+ if (ini <> nil) then begin
+ try
+ sDate := IntToStr(GikoSys.DateTimeToInt(Now));
+ if (FUseUC = True) then
+ Body := BodyEditUC.EncodeText
+ else
+ Body := BodyEdit.Text;
+
+ ini.WriteString(sDate, 'Name', NameComboBox.Text);
+ ini.WriteString(sDate, 'EMail', MailComboBox.Text);
+ ini.WriteString(sDate, 'Body', HttpEncode(Body));
+ ini.WriteInteger(sDate, 'Status', FStatusCode);
+ ini.WriteDateTime(sDate, 'Date', Now);
+ if FThreadItem = nil then begin
+ ini.WriteString(sDate, 'Title', MojuUtils.Sanitize(TitleEdit.Text));
+ //ini.WriteString(sDate, 'BBS', FBoard.BBSID);
+ ini.WriteString(sDate, 'URL', FBoard.URL);
+ ini.WriteInteger(sDate, 'NewThread', 1);
+ end else begin
+ ini.WriteString(sDate, 'Title', FThreadItem.Title);
+ //ini.WriteString(sDate, 'BBS', FThreadItem.ParentBoard.BBSID);
+ ini.WriteString(sDate, 'URL', FThreadItem.URL);
+ ini.WriteString(sDate, 'Key', ChangeFileExt(FThreadItem.FileName, ''));
+ end;
- ini.UpdateFile;
- finally
- ini.Free;
- end;
+ ini.UpdateFile;
+ finally
+ ini.Free;
+ end;
+ end;
+end;
+function TEditorForm.CreateSentIniFile: TMemIniFile;
+var
+ maxSize, fileSize, i: Integer;
+ newName: String;
+begin
+ Result := nil;
+ // MB -> bytes
+ maxSize := GikoSys.Setting.SentIniFileSize * 1024 * 1024;
+ // \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·
+ if (maxSize > 0) then begin
+ fileSize := GikoSys.GetFileSize(GikoSys.Setting.GetSentFileName);
+ // \8dÅ\91å\83T\83C\83Y\82ð\92´\82¦\82Ä\82¢\82½\8fê\8d\87\82Í\83\8a\83l\81[\83\80\82·\82é
+ if (fileSize >= maxSize) then begin
+ i := 0;
+ // \8d¡\82Ì\8e\9e\8d\8f\82ð\83t\83@\83C\83\8b\96¼\82Ì\8cã\82ë\82É\82Â\82¯\82é
+ repeat
+ // 10\89ñ\88È\8fã\8e¸\94s\82µ\82½\82ç\82 \82«\82ç\82ß\82é
+ if (i > 10) then break;
+ DateTimeToString(newName, 'yyhhnnsszzz', Now());
+ Inc(i);
+ until RenameFile(GikoSys.Setting.GetSentFileName,
+ GikoSys.Setting.GetSentFileName + '.' + newName);
+ end;
+ Result := TMemIniFile.Create(GikoSys.Setting.GetSentFileName);
+ end;
end;
-
procedure TEditorForm.SendActionExecute(Sender: TObject);
const
TITLE_SAMBA : string = 'Samba24\8cx\8d\90';
SaveSendFile;
GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmNewSure), nil, gmiOK);
FWork := False;
- Close;
+ if (not ContinueModeAction.Enabled) or (not ContinueModeAction.Checked) then
+ Close;
end else if State = gdsError then begin
GikoForm.AddMessageList(FBoard.Title + ' ' + GikoSys.GetGikoMessage(gmSureError), nil, gmiNG);
end else if State = gdsAbort then begin
SaveSendFile;
GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmNewRes), nil, gmiOK);
FWork := False;
- Close;
+ if (not ContinueModeAction.Enabled) or (not ContinueModeAction.Checked) then
+ Close;
end else if State = gdsError then begin
GikoForm.AddMessageList(FThreadItem.Title + ' ' + GikoSys.GetGikoMessage(gmResError), nil, gmiOK);
end else if State = gdsAbort then begin
Board.SPID := '';
Board.PON := '';
end;
+ // \96`\8c¯\82Ì\8f\91\83\8c\83x\83\8b\96ß\82é\96â\91è\91Î\89\9e
+ if (Board.Is2ch) and (AnsiPos('HAP=', Board.Cookie)>0) then begin
+ Board.Cookie := '';
+ end;
Send(Board.Cookie, Board.SPID, Board.PON, True);
end else begin
if not FSambaTimer.CheckSambaTime(Now()) then begin
Board.SPID := '';
Board.PON := '';
end;
+ // \96`\8c¯\82Ì\8f\91\83\8c\83x\83\8b\96ß\82é\96â\91è\91Î\89\9e
+ if (Board.Is2ch) and (AnsiPos('HAP=', Board.Cookie)>0) then begin
+ Board.Cookie := '';
+ end;
Send(Board.Cookie, Board.SPID, Board.PON, True);
end;
end;
begin
quote := GikoSys.GetOEIndentChar;
- s := TStringList.Create;
- try
- s.Text := Clipboard.AsText;
- for i := s.Count - 1 downto 0 do
- s[ i ] := quote + s[ i ];
+ if (FUseUC = True) then begin
+ BodyEditUC.QuotePaste(quote);
+ end else begin
+ s := TStringList.Create;
+ try
+ s.Text := Clipboard.AsText;
- BodyEdit.SelText := s.Text;
- finally
- s.Free;
- end;
+ for i := s.Count - 1 downto 0 do
+ s[ i ] := quote + s[ i ];
+ BodyEdit.SelText := s.Text;
+ finally
+ s.Free;
+ end;
+ end;
end;
procedure TEditorForm.SpaceToNBSPActionExecute(Sender: TObject);
procedure TEditorForm.BoardTopClick(Sender: TObject);
var
- ini: TIniFile;
+ ini: TMemIniFile;
begin
- ini := TIniFile.Create(GikoSys.Setting.GetFileName);
+ ini := TMemIniFile.Create(GikoSys.Setting.GetFileName);
try
BoardtopTab.TabVisible := BoardTop.Checked;
ini.WriteBool('EditorForm', 'BoardTopTab', BoardtopTab.TabVisible);
+ ini.UpdateFile;
finally
ini.Free;
end;
procedure TEditorForm.ShowBoardInformation(ABoard: TBoard; AMemo: TMemo);
var
body: TStringList;
+ UCType: Integer; // 0:\95s\96¾\81A1:\91Î\89\9e\81A-1:\94ñ\91Î\89\9e
begin
+ UCType := 0;
AMemo.Clear;
AMemo.Lines.Add('[SETTING.TXT]');
if ABoard.IsSETTINGTXT then begin
finally
body.Free;
end;
+ if (Pos('BBS_UNICODE=pass', AMemo.Text) > 0) then
+ UCType := 1
+ else if (Pos('BBS_UNICODE=', AMemo.Text) > 0) then
+ UCType := -1;
end else begin
ABoard.IsSETTINGTXT := false;
ABoard.SETTINGTXTTime := ZERO_DATE;
AMemo.Lines.Add('SETTING.TXT\82ð\8eæ\93¾\82µ\82Ä\82¢\82Ü\82¹\82ñ\81B');
AMemo.Lines.Add('\83\81\83j\83\85\81[\82æ\82è\8eæ\93¾\82µ\82Ä\82\82¾\82³\82¢\81B');
end;
+
+ case UCType of
+ -1: begin
+ UCInfoPanel.Caption := 'Unicode\94ñ\91Î\89\9e\94Â';
+ UCInfoPanel.Color := clRed;
+ UCInfoPanel.Hint := '\82±\82Ì\94Â\82ÍUnicode\82Å\82Ì\83\8c\83X\82É\91Î\89\9e\82µ\82Ä\82¢\82Ü\82¹\82ñ\81B';
+ end;
+ 0: begin
+ UCInfoPanel.Caption := 'Unicode\91Î\89\9e\95s\96¾';
+ UCInfoPanel.Color := clBtnFace;
+ UCInfoPanel.Hint := '\94Â\8fî\95ñ\82ð\8eæ\93¾\82µ\82Ä\82\82¾\82³\82¢\81B';
+ end;
+ 1: begin
+ UCInfoPanel.Caption := 'Unicode\91Î\89\9e\94Â';
+ UCInfoPanel.Color := clLime;
+ UCInfoPanel.Hint := '\82±\82Ì\94Â\82ÍUnicode\82Å\82Ì\83\8c\83X\82É\91Î\89\9e\82µ\82Ä\82¢\82Ü\82·\81B';
+ end;
+ end;
end;
function TEditorForm.GetTitlePictureURL(body: TStringList; ABoard: TBoard): string;
//BBS_TITLE_PICTURE=
procedure TEditorForm.FormDeactivate(Sender: TObject);
begin
- if GikoSys.Setting.GestureEnabled then begin
- MouseGesture.UnHook;
- //MouseGesture.SetHook( GikoForm.Handle );
- end;
-
+ if GikoSys.Setting.GestureEnabled then begin
+ GikoSys.Setting.Gestures.ClearGesture;
+ MouseGesture.UnHook;
+ MouseGesture.OnGestureStart := nil;
+ MouseGesture.OnGestureMove := nil;
+ MouseGesture.OnGestureEnd := nil;
+ end;
end;
procedure TEditorForm.OnGestureStart(Sender: TObject);
Action: TAction;
begin
s := MouseGesture.GetGestureStr;
+ MouseGesture.Clear;
Action := GikoSys.Setting.Gestures.GetGestureAction(s);
if Action <> nil then
Action.Execute;
procedure TEditorForm.ShowBoardHead(ABoard: TBoard; AMemo: TMemo);
var
- wDoc, WTex, le: OLEVariant;
-begin
- //\8eQ\8dl\8c³
- //http://www.campus.ne.jp/~ishigami/CREATION/TECHNIC/WEBAP-2.htm
- WebBrowser1.Navigate(ABoard.GETHEADTXTFileName,le,le,le,le);
- //\83\8c\83^\83\8a\83\93\83O\82ª\92x\82·\82¬\82ÄTXT\82É\88Ú\82¹\82È\82¢\81B\82Ê\82é\82Ûorz
- //\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
- //\82±\82ê\82Å\82¢\82¯\82Ü\82µ\82½\81B\82 \82è\82ª\82Æ\82¤\82²\82´\82¢\82Ü\82µ\82½\81B
- while (WebBrowser1.ReadyState <> READYSTATE_COMPLETE) and
- (WebBrowser1.ReadyState <> READYSTATE_INTERACTIVE) do begin
- Application.ProcessMessages;
- end;
- wDoc := WebBrowser1.Document;
- wTex := wDoc.body.createTextRange;
- LocalEdit.Text := wTex.text;
+ range: OleVariant;
+begin
+ //\8eQ\8dl\8c³
+ //http://www.campus.ne.jp/~ishigami/CREATION/TECHNIC/WEBAP-2.htm
+ WebBrowser1.Navigate(ABoard.GETHEADTXTFileName);
+ //\83\8c\83^\83\8a\83\93\83O\82ª\92x\82·\82¬\82ÄTXT\82É\88Ú\82¹\82È\82¢\81B\82Ê\82é\82Ûorz
+ //\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
+ //\82±\82ê\82Å\82¢\82¯\82Ü\82µ\82½\81B\82 \82è\82ª\82Æ\82¤\82²\82´\82¢\82Ü\82µ\82½\81B
+ while (WebBrowser1.ReadyState <> READYSTATE_COMPLETE) and
+ (WebBrowser1.ReadyState <> READYSTATE_INTERACTIVE) do begin
+ Application.ProcessMessages;
+ end;
+
+ try
+ ;
+ range := OleVariant(WebBrowser1.Document).body.createTextRange;
+ LocalEdit.Text := range.text;
+ except
+ end;
end;
procedure TEditorForm.LocalRuleBrowseClick(Sender: TObject);
var
- URL: String;
- ABoard: TBoard;
+ URL: String;
+ ABoard: TBoard;
begin
ABoard := GetBoard;
- if ABoard = nil then Exit;
+ if ABoard = nil
+ then Exit;
- URL := ABoard.GETHEADTXTFileName;
- GikoSys.OpenBrowser(URL, gbtAuto);
+ URL := ABoard.GETHEADTXTFileName;
+ GikoSys.OpenBrowser(URL, gbtAuto);
end;
procedure TEditorForm.SaveNameMailActionExecute(Sender: TObject);
KotehanCheckBox.Enabled := SaveNameMailAction.Checked;
end;
-function TEditorForm.LFusianaGet(s: String): Boolean;
+function TEditorForm.LFusianaGet(const s: String): Boolean;
+const
+ FUSIANA = 'fusianasan';
var
i: Integer;
begin
- i := AnsiPos('fusianasan', s);
- if (i > 0) then Result := True else Result := False;
+ i := AnsiPos(FUSIANA, s);
+ Result := (i > 0);
end;
procedure TEditorForm.BeLogInOutEActionExecute(Sender: TObject);
begin
- GikoSys.Setting.BeLogin := not GikoSys.Setting.BeLogin;
+ GikoDM.BeLogInOutAction.Execute;
end;
procedure TEditorForm.BeLogInOutEActionUpdate(Sender: TObject);
begin
- if (GikoSys.Setting.BeUserID <> '') and (GikoSys.Setting.BeCode <> '') then begin
- if (GikoSys.Setting.BeLogin) then BeLogInOutEAction.Checked := true
- else BeLogInOutEAction.Checked := false;
- BeLogInOutEAction.Enabled := true
- end else
- BeLogInOutEAction.Enabled := false;
-
+ BeLogInOutEAction.Checked := GikoDM.BeLogInOutAction.Checked;
+ BeLogInOutEAction.Enabled := GikoDM.BeLogInOutAction.Enabled;
end;
// Cookie\82Ì\8eæ\93¾
-procedure TEditorForm.GetCookie(Rawtext: String; ABoard: TBoard);
+procedure TEditorForm.GetCookie(CookieMng: TIdCookieManager; ABoard: TBoard);
const
- COOKIE_MARK = 'Set-Cookie:';
- VAL_SPID = 'SPID=';
- VAL_PON = 'PON=';
- EXPIRES_MARK = 'expires=';
+ VAL_SPID = 'SPID';
+ VAL_PON = 'PON';
+ VAL_HAP = 'HAP';
var
-// i: Integer;
- tmp : string;
- val : string;
-begin
+ i : Integer;
+ Cookie : TIdCookieRFC2109;
+ curCookies : TStringList;
+begin
+ // 2008.12.14 \96³\8fð\8c\8f\83N\83\8a\83A\82µ\82Ä\82Í\82¢\82¯\82È\82¢ by \82à\82¶\82ã
+ curCookies := TStringList.Create;
+ curCookies.Delimiter := ';';
+ curCookies.DelimitedText := ABoard.Cookie;
+ curCookies.Sort;
+ curCookies.Duplicates := dupIgnore;
ABoard.Cookie := '';
- while (AnsiPos(COOKIE_MARK, Rawtext) > 0 ) do begin
- //i := 0;
- tmp := Copy(Rawtext, AnsiPos(COOKIE_MARK, Rawtext) + Length(COOKIE_MARK), Length(Rawtext));
- Delete(Rawtext, 1, AnsiPos('Set-Cookie', Rawtext)+ Length(COOKIE_MARK));
- //Cookie\82ð\90Ø\82è\8fo\82·
- val := Trim(GikoSys.GetTokenIndex(tmp, ';', 0));
- if( AnsiPos(VAL_SPID, val) > 0 ) then begin
- ABoard.SPID := Copy(val, AnsiPos(VAL_SPID, val) + Length(VAL_SPID), Length(val));
- end else if( AnsiPos(VAL_PON, val) > 0 ) then begin
- ABoard.PON := Copy(val, AnsiPos(VAL_PON, val) + Length(VAL_PON), Length(val));
- end else begin
- ABoard.Cookie := ABoard.Cookie + val + '; ';
- end;
- //expires\82ð\90Ø\82è\8fo\82·
- val := Trim(GikoSys.GetTokenIndex(tmp, ';', 1));
- if( AnsiPos(EXPIRES_MARK, val) > 0) then begin
- Delete(val, 1, AnsiPos(EXPIRES_MARK, val) + Length(EXPIRES_MARK) - 1);
- ABoard.Expires := GMTToLocalDateTime(val);
- end;
- end;
+ try
+ for i := 0 to CookieMng.CookieCollection.Count - 1 do begin
+ Cookie := CookieMng.CookieCollection.Items[i];
+ if ( Cookie.CookieName = VAL_PON ) then begin
+ ABoard.PON := Cookie.Value;
+ ABoard.Expires := GMTToLocalDateTime(Cookie.Expires);
+ end else if ( Cookie.CookieName = VAL_SPID ) then begin
+ ABoard.SPID := Cookie.Value;
+ ABoard.Expires := GMTToLocalDateTime(Cookie.Expires);
+ end else if ( Cookie.CookieName = VAL_HAP ) then begin
+ // HAP\8dí\8f\9c\97p\82ÌCookie\82ª\94z\95z\82³\82ê\82é\82Ì\82Å\81A\97L\8cø\8aú\8cÀ\82ð\83`\83F\83b\83N\82·\82é
+ if CompareDateTime(GMTToLocalDateTime(Cookie.Expires) ,Now) > 0 then begin
+ GikoSys.SetBoukenCookie(Cookie.Value, Cookie.Domain);
+ // \96`\8c¯\82Ì\8f\91\82Ì\95Û\91¶
+ GikoSys.Setting.WriteBoukenSettingFile;
+ end;
+ end else begin
+ if Length( curCookies.Values[ Cookie.CookieName ] ) > 0 then begin
+ // \8aù\91¶\92l\82Ì\95t\82¯\91Ö\82¦
+ curCookies[curCookies.IndexOfName(Cookie.CookieName)] :=
+ Cookie.ClientCookie;
+ end else begin
+ // \92Ç\89Á
+ curCookies.Add(Cookie.ClientCookie);
+ end;
+ end;
+ end;
+ for i := 0 to curCookies.Count - 1 do begin
+ if (curCookies[i] <> '') then begin
+ ABoard.Cookie := ABoard.Cookie + curCookies[i] + '; ';
+ end;
+ end;
+ finally
+ CookieMng.CookieCollection.Clear;
+ curCookies.Free;
+ end;
end;
+//! hidden\83f\81[\83^\8eæ\93¾
+procedure TEditorForm.GetHiddenParameter(Rawtext: String; ABoard: TBoard);
+const
+ INPUT_MARK = '<input type=hidden' ; // \91å\95¶\8e\9a\8f¬\95¶\8e\9a\82Î\82ç\82Î\82ç\82È\82±\82Æ\82É\92\8d\88Ó
+ VALUE_MARK = 'value=' ; // \91å\95¶\8e\9a\8f¬\95¶\8e\9a\82Î\82ç\82Î\82ç\82È\82±\82Æ\82É\92\8d\88Ó
+ NAME_MARK = 'name=' ; // \91å\95¶\8e\9a\8f¬\95¶\8e\9a\82Î\82ç\82Î\82ç\82È\82±\82Æ\82É\92\8d\88Ó
+ IGNORE_NAMES : array[0..6] of String =
+ ('subject', 'from', 'mail', 'message', 'bbs', 'time', 'key');
+var
+ tmp, line, name, value, lname : String;
+ pos, pose, i : Integer;
+begin
+ tmp := AnsiLowerCase(Rawtext);
+ pos := AnsiPos(INPUT_MARK, tmp);
+ while (pos > 0 ) do begin
+ tmp := Copy(Rawtext, pos + Length(INPUT_MARK), Length(tmp));
+ Delete(Rawtext, 1, pos+ Length(INPUT_MARK) - 1);
+ pose := AnsiPos('>', tmp);
+ // name=xxx value=yyy \82ª\90Ø\82è\8fo\82³\82ê\82é
+ line := Copy(tmp, 1, pose - 1);
+ name := '';
+ value := '';
+ pos := AnsiPos(NAME_MARK, tmp);
+ if (pos > 0) then begin
+ name := Copy(Rawtext, pos + Length(NAME_MARK), Length(line));
+ //\94¼\8ap"\82Å\8en\82Ü\82Á\82Ä\82¢\82é\82©
+ if AnsiPos('"', name) = 1 then begin
+ // \94¼\8ap"\82Ü\82Å\82ð\83R\83s\81[
+ Delete(name, 1, 1);
+ pose := AnsiPos('"', name);
+ if (pose > 0) then begin
+ Delete(name, pose, Length(name));
+ end else begin
+ pose := AnsiPos(' ', name);
+ if (pose > 0) then begin
+ Delete(name, pose, Length(name));
+ end;
+ end;
+ end else begin
+ pose := AnsiPos(' ', name);
+ if (pose > 0) then begin
+ Delete(name, pose, Length(name));
+ end;
+ end;
+ end;
+ lname := AnsiLowerCase(name);
+ for i := 0 to Length(IGNORE_NAMES) do begin
+ if lname = IGNORE_NAMES[i] then begin
+ name := '';
+ break;
+ end;
+ end;
+ pos := AnsiPos(VALUE_MARK, tmp);
+ if (name <> '') and (pos > 0) then begin
+ value := Copy(Rawtext, pos + Length(VALUE_MARK), Length(line));
+ //\94¼\8ap"\82Å\8en\82Ü\82Á\82Ä\82¢\82é\82©
+ if AnsiPos('"', value) = 1 then begin
+ // \94¼\8ap"\82Ü\82Å\82ð\83R\83s\81[
+ Delete(value, 1, 1);
+ pose := AnsiPos('"', value);
+ if (pose > 0) then begin
+ Delete(value, pose, Length(value));
+ end else begin
+ pose := AnsiPos(' ', value);
+ if (pose > 0) then begin
+ Delete(value, pose, Length(value));
+ end;
+ end;
+ end else begin
+ pose := AnsiPos(' ', value);
+ if (pose > 0) then begin
+ Delete(value, pose, Length(name));
+ end;
+ end;
+ end;
+ if (name <> '') then begin
+ ABoard.Cookie := ABoard.Cookie + name + '=' + value + '; ';
+ end;
+ Delete(tmp, 1, Length(line));
+ Delete(Rawtext, 1, Length(line));
+ pos := AnsiPos(INPUT_MARK, tmp);
+ end;
+end;
//! \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
procedure TEditorForm.UpdateSambaActionUpdate(Sender: TObject);
item : TMenuItem;
point: TPoint;
Bitmap : TBitmap;
- TextWidth, ItemWidth, tmpWidth: Integer;
+ TextWidth, ItemWidth, tmpWidth, EditW, EditT: Integer;
begin
if FInputAssistKey = '' then Exit;
end;
Bitmap := TBitmap.Create;
try
- Bitmap.Canvas.Font.Assign(BodyEdit.Font);
+ if (FUseUC = True) then
+ Bitmap.Canvas.Font.Assign(BodyEditUC.Font)
+ else
+ Bitmap.Canvas.Font.Assign(BodyEdit.Font);
// \83}\81[\83W\83\935px
TextWidth := Bitmap.Canvas.TextWidth(FInputAssistKey) + 5;
ItemWidth := 0;
end;
if (count > 0) then begin
+ if (FUseUC = True) then begin
+ EditW := BodyEditUC.Width;
+ EditT := BodyEditUC.Top;
+ end else begin
+ EditW := BodyEdit.Width;
+ EditT := BodyEdit.Top;
+ end;
GetCaretpos(point);
- point.X := point.X + Self.Left + (Self.Width - BodyEdit.Width) div 2;
+ point.X := point.X + Self.Left + (Self.Width - EditW) div 2;
point.Y := point.Y + Self.Top + (Self.Height - Self.ClientHeight);
if Screen.DesktopWidth >
(point.X + TextWidth + ItemWidth) then begin
InputAssistPopupMenu.Popup(
point.X + TextWidth,
- point.Y + EditorPage.Top + EditorPage.TabHeight + BodyEdit.Top);
+ point.Y + EditorPage.Top + EditorPage.TabHeight + EditT);
end else begin
InputAssistPopupMenu.Popup(
point.X - TextWidth - ItemWidth,
- point.Y + EditorPage.Top + EditorPage.TabHeight + BodyEdit.Top);
+ point.Y + EditorPage.Top + EditorPage.TabHeight + EditT);
end;
end;
end;
var
text : String;
IMC: HIMC;
+ EditHandle: HWND;
begin
if not (Sender is TMenuItem) then Exit;
if (FResistWords <> nil) then begin
+ if (FUseUC = True) then
+ EditHandle := BodyEditUC.Handle
+ else
+ EditHandle := BodyEdit.Handle;
try
text :=
TResistWord(FResistWords.Objects[TMenuItem(Sender).Tag]).GetText;
except
text := '';
end;
- IMC := ImmGetContext(BodyEdit.Handle); //\83R\83\93\83e\83L\83X\83g\8eæ\93¾
+ IMC := ImmGetContext(EditHandle); //\83R\83\93\83e\83L\83X\83g\8eæ\93¾
try
ImmNotifyIME(IMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
finally
- ImmReleaseContext(BodyEdit.Handle, IMC); //\83R\83\93\83e\83L\83X\83g\89ð\95ú
+ ImmReleaseContext(EditHandle, IMC); //\83R\83\93\83e\83L\83X\83g\89ð\95ú
end;
FResistWords.Clear;
FInputAssistKey := '';
end;
- InsertText(BodyEdit, text);
+ if (FUseUC = True) then
+ BodyEditUC.InsertText(text)
+ else
+ InsertText(BodyEdit, text);
end;
//! TMemo\82Ì\83J\81[\83\\83\8b\88Ê\92u\82É\95¶\8e\9a\97ñ\91}\93ü
IMC: HIMC;
Len: integer;
Str: string;
+ EditHandle: HWND;
begin
if (Self.Active) then begin
case Msg.message of
wmMsg.CharCode := Word(Msg.wParam);
wmMsg.KeyData := Msg.lParam;
if (wmMsg.CharCode = 229) and (wmMsg.KeyData = 3735553) then begin
- IMC := ImmGetContext(BodyEdit.Handle); //\83R\83\93\83e\83L\83X\83g\8eæ\93¾
+ if (FUseUC = True) then
+ EditHandle := BodyEditUC.Handle
+ else
+ EditHandle := BodyEdit.Handle;
+ IMC := ImmGetContext(EditHandle); //\83R\83\93\83e\83L\83X\83g\8eæ\93¾
Len := ImmGetCompositionString(IMC, GCS_COMPSTR, nil, 0); //\82Ü\82¸\92·\82³\82ð\8eæ\93¾
if (Len > 0) then begin
SetLength(Str, Len + 1); //Buffer\82Ì\83\81\83\82\83\8a\82ð\90Ý\92è
InputAssistActionExecute(nil);
Handled := True;
end;
- ImmReleaseContext(BodyEdit.Handle, IMC); //\83R\83\93\83e\83L\83X\83g\89ð\95ú
+ ImmReleaseContext(EditHandle, IMC); //\83R\83\93\83e\83L\83X\83g\89ð\95ú
end;
end;
end;
end;
form.SetUpFromEditor;
if (form.ShowModal = mrOk) then begin
- InsertText(BodyEdit, form.GetInsertText);
+ if (FUseUC = True) then
+ BodyEditUC.InsertText(form.GetInsertText)
+ else
+ InsertText(BodyEdit, form.GetInsertText);
end;
finally
form.Release;
procedure TEditorForm.SetWindowRect;
var
wp: TWindowPlacement;
+ MonCnt: Integer;
+ MonOk: Boolean;
+ MonR: Integer;
+ MonB: Integer;
+ Right: Integer;
+ Bottom: Integer;
begin
//\83E\83B\83\93\83h\83E\82Ì\88Ê\92u\90Ý\92è
wp.length := sizeof(wp);
end;
//\83E\83B\83\93\83h\83E\82ª\89æ\96Ê\8aO\82È\82ç\89æ\96Ê\93à\82É\88Ú\93®\82·\82é
- if (Left + Width) > Screen.Width then begin
- Left := 0;
- end;
- if (Top + Height) > Screen.Height then begin
- Top := 0;
- end;
- if Left < 0 then begin
- Left := 0;
+ Right := Left + Width;
+ Bottom := Top + Height;
+ MonOk := False;
+ MonCnt := 0;
+ while (MonCnt < Screen.MonitorCount) do begin
+ MonR := Screen.Monitors[MonCnt].Left + Screen.Monitors[MonCnt].Width;
+ MonB := Screen.Monitors[MonCnt].Top + Screen.Monitors[MonCnt].Height;
+
+ if ((Left >= Screen.Monitors[MonCnt].Left) and (Left < MonR) and
+ (Top >= Screen.Monitors[MonCnt].Top) and (Top < MonB) and
+ (Right > Screen.Monitors[MonCnt].Left) and (Right <= MonR) and
+ (Bottom > Screen.Monitors[MonCnt].Top) and (Bottom <= MonB)) then begin
+ MonOk := True;
+ Break;
+ end;
+
+ MonCnt := MonCnt + 1;
end;
- if Top < 0 then begin
- Top := 0;
+
+ if (MonOk = False) then begin
+ Left := 0;
+ Top := 0;
end;
//\8c»\8dÝ\82Ì\83E\83B\83\93\83h\83E\82Ì\88Ê\92u\82ð\95Û\91¶
end;
{
\brief \83\8d\81[\83J\83\8bfusiana\83g\83\89\83b\83v
-\param MSG \83\81\83b\83Z\81[\83W\83_\83C\83A\83\8d\83O\82Ì\83\81\83b\83Z\81[\83W
\return true:\91\97\90M\92\86\8e~ false:\91\97\90M
}
-function TEditorForm.isLocalFusianaTrap(const MSG: string): Boolean;
+function TEditorForm.isLocalFusianaTrap: Boolean;
var
- MsgResult : Integer;
Namae : string;
begin
Result := False;
if GikoSys.Setting.LocalTrapAtt then begin
Namae := THTMLCreate.RepHtml(NameComboBox.Text);
- if (LFusianaGet(Namae))
- or ((Namae = '\8eR\8dè\8fÂ') or (Namae = 'fusianasan')) then begin
- MsgResult := MsgBox( Handle, MSG, '\8fî\95ñ',
- MB_YESNO or MB_ICONQUESTION);
- if MsgResult = IDNO then begin
+ if (LFusianaGet(Namae)) or (Namae = '\8eR\8dè\8fÂ') then begin
+ if FusianaMsgBox = IDNO then begin
Result := True;
end;
end;
end;
end;
{
-\brief \83\8d\81[\83J\83\8bfusiana\83g\83\89\83b\83v
-\param MSG \83\81\83b\83Z\81[\83W\83_\83C\83A\83\8d\83O\82Ì\83\81\83b\83Z\81[\83W
+\brief \83\8a\83\82\81[\83gfusiana\83g\83\89\83b\83v
\return true:\91\97\90M\92\86\8e~ false:\91\97\90M
}
-function TEditorForm.isRemoteFusianaTrap(const MSG: string): Boolean;
+function TEditorForm.isRemoteFusianaTrap: Boolean;
var
Namae : string;
Board : TBoard;
Remote: string;
body : TStringList;
- MsgResult : Integer;
begin
Result := False;
Namae := THTMLCreate.RepHtml(NameComboBox.Text);
end;
end;
- if (Remote = 'fusianasan') then begin
- MsgResult := MsgBox(
- Handle, MSG, '\8fî\95ñ',
- MB_YESNO or MB_ICONQUESTION);
- if MsgResult = IDNO then begin
+ if LFusianaGet(Remote) then begin
+ if FusianaMsgBox = IDNO then begin
Result := True;
end;
end;
\param ACOOKIE Cookie
\param SPID SPID
\param PON PON
+\param HAP HAP
\param Board \94Â
\return Header\95¶\8e\9a\97ñ
}
function TEditorForm.getHeaderStr(const ACOOKIE: string; const SPID : string;
- const PON : string; Board : TBoard) : string;
+ const PON : string; const HAP : string; Board : TBoard) : string;
begin
- Result := ACOOKIE;
+ Result := ACOOKIE;
+
if SPID <> '' then
Result := Result + 'SPID=' + SPID + '; ';
if PON <> '' then
// \83z\83X\83g\82ª2ch\82Ì\8fê\8d\87\81C\8cÅ\92è\82Ì\83N\83b\83L\81[\82ð\90H\82í\82¹\82é
Result := Result + GikoSys.Setting.FixedCookie + '; ';
end;
- if (GikoSys.Setting.BeLogin) then begin
- Result := Result + 'MDMD=' + GikoSys.Setting.BeCode + '; '
- + 'DMDM=' + GikoSys.Setting.BeUserID + '; ';
+ if (GikoSys.Belib.Connected) then begin
+ Result := Result + 'MDMD=' + GikoSys.Belib.MDMD + '; '
+ + 'DMDM=' + GikoSys.Belib.DMDM + '; ';
end;
-
- end;
+ end;
Result := 'Cookie: ' + Result + 'NAME=' + NameComboBox.Text + '; MAIL=' + MailComboBox.Text;
+ if HAP <> '' then
+ Result := Result + '; HAP=' + HAP + '; ';
+
+end;
+
+{
+\brief fusiana\8cx\8d\90\83_\83C\83A\83\8d\83O
+\return IDYES \8f\91\82«\8d\9e\82Þ IDNO \92\86\8e~
+}
+function TEditorForm.FusianaMsgBox: Integer;
+const
+ 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 +
+ '\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' +
+ #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';
+begin
+ Result := MsgBox(Handle, MSG_FUSIANA, '\8fî\95ñ',
+ MB_YESNO or MB_ICONQUESTION);
+end;
+{
+\brief \98A\93\8a\83\82\81[\83hON/OFF\90Ø\82è\91Ö\82¦
+}
+procedure TEditorForm.ContinueModeActionExecute(Sender: TObject);
+begin
+ ContinueModeAction.Checked := not ContinueModeAction.Checked;
+end;
+{
+\brief \98A\93\8a\83\82\81[\83h\8dX\90V\8f\88\97\9d
+}
+procedure TEditorForm.ContinueModeActionUpdate(Sender: TObject);
+begin
+ // \83X\83\8c\82½\82Ä\82Ì\82Æ\82«\82Í\96³\8cø
+ ContinueModeAction.Enabled := FThreadItem <> nil;
+end;
+{
+\brief \8f\91\82«\8d\9e\82Þ\94Â/\83X\83\8c\83b\83h\82ð\95\\8e¦\82·\82é
+}
+procedure TEditorForm.OpenSendTargetActionExecute(Sender: TObject);
+begin
+ if (FThreadItem <> nil) then begin
+ // \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É
+ // \91O\96Ê\82Å\8cÅ\92è\82·\82é
+ if not (fsShowing in Self.FormState) then begin
+ // \83X\83e\83C\8fó\91Ô\82É\90Ý\92è
+ SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
+ end;
+ try
+ // \83X\83\8c\83b\83h
+ GikoForm.InsertBrowserTab(FThreadItem, True);
+ finally
+ if not TopAction.Checked then begin // \83X\83e\83C\8fó\91Ô\89ð\8f\9c
+ SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
+ end;
+ end;
+ Self.SetFocus;
+ end else begin
+ // \94Â
+ GikoForm.SelectTreeNode(
+ GetBoard, True );
+ end;
+end;
+procedure TEditorForm.ReloadTargetActionExecute(Sender: TObject);
+begin
+ if (FThreadItem <> nil) then begin
+ // \83X\83\8c\83b\83h
+ // \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É
+ // \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é)
+ if not (fsShowing in Self.FormState) then begin
+ // \83X\83e\83C\8fó\91Ô\82É\90Ý\92è
+ SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
+ end;
+ try
+ GikoForm.DownloadContent(FThreadItem);
+ finally
+ if not TopAction.Checked then begin // \83X\83e\83C\8fó\91Ô\89ð\8f\9c
+ SetWindowPos(Handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
+ end;
+ end;
+ Self.SetFocus;
+ end else begin
+ // \94Â
+ GikoForm.DownloadList(GetBoard);
+ end;
+end;
+//! \8cë\94\9a\83`\83F\83b\83N
+function TEditorForm.isGobaku: Boolean;
+const
+ MSG_GOBAKU : string =
+ '\95\\8e¦\82µ\82Ä\82¢\82é%s\82Æ\93\8a\8de\90æ\82Ì%s\82ª\88Ù\82È\82è\82Ü\82·\81B'#13#10 +
+ '\82±\82Ì\82Ü\82Ü\8f\91\82«\8d\9e\82Ý\82Ü\82·\82©\81H';
+var
+ ThreadItem : TThreadItem;
+ msg : String;
+
+begin
+ Result := False;
+ // \83I\83v\83V\83\87\83\93\97L\8cø\82©\82Â\83\8c\83X\91\97\90M\82Å\82Ì\82Ý\97L\8cø
+ if (GikoSys.Setting.UseGobakuCheck) then begin
+ // \83\8c\83X\91\97\90M
+ if (FThreadItem <> nil) then begin
+ ThreadItem := GikoForm.GetActiveContent(False);
+ if (ThreadItem <> nil) then begin
+ if (FThreadItem <> ThreadItem) then begin
+ msg := Format(MSG_GOBAKU, ['\83X\83\8c\83b\83h', '\83X\83\8c\83b\83h']);
+ Result := MsgBox(Handle, msg, '\8fî\95ñ', MB_YESNO or MB_ICONQUESTION) = IDNO;
+ end;
+ end else begin
+ if GikoForm.ActiveList is TBBS then begin
+ if TBBS(GikoForm.ActiveList) <> FThreadItem.ParentBoard.ParentCategory.ParenTBBS then begin
+ msg := Format(MSG_GOBAKU, ['BBS', '\83X\83\8c\83b\83h\82Ì\8f\8a\91®\82·\82éBBS']);
+ Result := MsgBox(Handle, msg, '\8fî\95ñ', MB_YESNO or MB_ICONQUESTION) = IDNO;
+ end;
+ end else if GikoForm.ActiveList is TCategory then begin
+ if TCategory(GikoForm.ActiveList).FindThreadFromURL(FThreadItem.URL) = nil then begin
+ msg := Format(MSG_GOBAKU, ['\83J\83e\83S\83\8a', '\83X\83\8c\83b\83h\82Ì\8f\8a\91®\82·\82é\83J\83e\83S\83\8a']);
+ Result := MsgBox(Handle, msg, '\8fî\95ñ', MB_YESNO or MB_ICONQUESTION) = IDNO;
+ end;
+ end else if GikoForm.ActiveList is TBoard then begin
+ if TBoard(GikoForm.ActiveList) <> FThreadItem.ParentBoard then begin
+ msg := Format(MSG_GOBAKU, ['\94Â', '\83X\83\8c\83b\83h\82Ì\8f\8a\91®\82·\82é\94Â']);
+ Result := MsgBox(Handle, msg, '\8fî\95ñ', MB_YESNO or MB_ICONQUESTION) = IDNO;
+ end;
+ end;
+ end;
+ end else begin
+ // \83X\83\8c\82½\82Ä
+ if GikoForm.ActiveList is TBBS then begin
+ if TBBS(GikoForm.ActiveList) <> FBoard.ParentCategory.ParenTBBS then begin
+ msg := Format(MSG_GOBAKU, ['BBS', '\94Â\82Ì\8f\8a\91®\82·\82éBBS']);
+ Result := MsgBox(Handle, msg, '\8fî\95ñ', MB_YESNO or MB_ICONQUESTION) = IDNO;
+ end;
+ end else if GikoForm.ActiveList is TCategory then begin
+ if TCategory(GikoForm.ActiveList).FindBoardFromURL(FBoard.URL) = nil then begin
+ msg := Format(MSG_GOBAKU, ['\83J\83e\83S\83\8a', '\94Â\82Ì\8f\8a\91®\82·\82é\83J\83e\83S\83\8a']);
+ Result := MsgBox(Handle, msg, '\8fî\95ñ', MB_YESNO or MB_ICONQUESTION) = IDNO;
+ end;
+ end else if GikoForm.ActiveList is TBoard then begin
+ if TBoard(GikoForm.ActiveList) <> FBoard then begin
+ msg := Format(MSG_GOBAKU, ['\94Â', '\94Â']);
+ Result := MsgBox(Handle, msg, '\8fî\95ñ', MB_YESNO or MB_ICONQUESTION) = IDNO;
+ end;
+ end;
+ end;
+ end;
+end;
+
+procedure TEditorForm.SetFocusEdit;
+begin
+ if (FUseUC = True) then
+ BodyEditUC.SetFocus
+ else
+ BodyEdit.SetFocus;
+end;
+
+procedure TEditorForm.SetTextEdit(TextSrc: String);
+begin
+ if (FUseUC = True) then
+ BodyEditUC.Text := TextSrc
+ else
+ BodyEdit.Text := TextSrc;
end;
end.