OSDN Git Service

Beのログインに対応
authorh677 <h677>
Tue, 22 Feb 2011 13:37:51 +0000 (13:37 +0000)
committerh677 <h677>
Tue, 22 Feb 2011 13:37:51 +0000 (13:37 +0000)
Folder.iniに冒険の書が記録されている場合削除する処理を追加

12 files changed:
Belib.pas [new file with mode: 0644]
Editor.pas
Giko.pas
GikoDataModule.dfm
GikoDataModule.pas
GikoMessage.pas
GikoSystem.pas
Option.dfm
Option.pas
Setting.pas
gikoNavi.dpr
gikoNavi.res

diff --git a/Belib.pas b/Belib.pas
new file mode 100644 (file)
index 0000000..bbf3cda
--- /dev/null
+++ b/Belib.pas
@@ -0,0 +1,232 @@
+{ Dolib\82ð\83R\83s\81[\82µ\82ÄBE\83\8d\83O\83C\83\93\83Z\83b\83V\83\87\83\93\8aÇ\97\9d\82ð\8dì\90¬ }
+unit Belib;
+
+{$IOCHECKS ON}
+
+interface
+
+uses
+       Windows, SysUtils, WinInet, YofUtils, Y_TextConverter;
+
+type
+       TBelibSession = class(TObject)
+       private
+               FMDMD: string;
+               FDMDM: string;
+               FErrorCode: Integer;
+               FErrorString: string;
+       public
+               property MDMD: string read FMDMD write FMDMD;
+        property DMDM: string read FDMDM write FDMDM;
+               property ErrorCode: Integer read FErrorCode write FErrorCode;
+               property ErrorString: string read FErrorString write FErrorString;
+       end;
+
+       TBelib  = class(TObject)
+       private
+               FSession : TBelibSession;
+               FConnected: boolean;
+               FProxyPort: integer;
+               FUserName: string;
+               FPassword: string;
+               FProxyAddress: string;
+               FClientUA: string;
+               function GetMDMD : string;
+               function GetDMDM : string;
+               function GetErrorCode: integer;
+               function GetErrorMsg: string;
+               procedure MakeError(Session: TBelibSession; Error: DWORD);
+               procedure BELIB_LOGIN(Proxy: string; Port: Integer; ID: string; Pass: string);
+       public
+               constructor Create;
+               destructor  Destroy; override;
+               function  Connect: boolean;
+               function  Disconnect: boolean;
+               property  ProxyAddress: string  read  FProxyAddress write FProxyAddress;
+               property  ProxyPort: integer  read  FProxyPort  write FProxyPort;
+               property  UserName: string  read  FUserName write FUserName;
+               property  Password: string  read  FPassword write FPassword;
+               property  ClientUA: string  read  FClientUA write FClientUA;
+               property  Connected: boolean  read  FConnected;
+               property  MDMD: string read  GetMDMD;
+               property  DMDM: string read  GetDMDM;
+               property  ErrorCode: integer read  GetErrorCode;
+               property  ErrorMsg: string  read  GetErrorMsg;
+       end;
+
+implementation
+const
+       BELIB_LOGIN_UA      = 'BELIB/1.00';
+       BELIB_LOGIN_HOST    = 'be.2ch.net';
+       BELIB_LOGIN_URL     = '/test/login.php';
+       BELIB_2CH_UA        = 'X-2ch-UA:';
+       BELIB_ENOMEM_STRING = '\83\81\83\82\83\8a\82ª\91«\82è\82Ü\82¹\82ñ\81B';
+       BELIB_LOGIN_ERROR   = 'ERROR:';
+// http:///\81@
+
+{ TBelib }
+
+constructor TBelib.Create;
+begin
+       FSession   := nil;
+       FConnected := False;
+end;
+
+destructor TBelib.Destroy;
+begin
+       if Connected then
+               Disconnect;
+       inherited;
+end;
+
+function TBelib.Connect: boolean;
+begin
+       Result := False;
+       if not Connected then begin
+               BELIB_LOGIN(FProxyAddress, FProxyPort, FUserName, FPassword);
+               FConnected  :=  True;
+               if (Length(MDMD)=0) and (Length(DMDM)=0) then  begin
+                       Disconnect;
+                       Result      :=  False;
+               end else if ErrorCode <> 0 then begin
+                       Disconnect;
+                       Result := False;
+               end else begin
+                       Result := True;
+//                     Result      :=  (ErrorCode = 0);
+               end;
+       end;
+end;
+
+function TBelib.Disconnect: boolean;
+begin
+       Result := True;
+  if FSession <> nil then
+    FreeAndNil(FSession);
+  FConnected := False;
+end;
+
+function TBelib.GetMDMD : string;
+begin
+       if Connected then
+               Result := FSession.FMDMD
+       else
+               Result := '';
+end;
+
+function TBelib.GetDMDM : string;
+begin
+       if Connected then
+               Result := FSession.FDMDM
+       else
+               Result := '';
+end;
+
+
+function TBelib.GetErrorMsg: string;
+begin
+       if Connected then
+               Result := FSession.FErrorString
+       else
+    Result  :=  'Error: \83\81\81[\83\8b\83A\83h\83\8c\83X\82©\83p\83X\83\8f\81[\83h\82ª\90³\82µ\82­\82 \82è\82Ü\82¹\82ñ\81B'; 
+end;
+
+function TBelib.GetErrorCode: integer;
+begin
+       if Connected then
+               Result := FSession.ErrorCode
+       else
+               Result := 0;
+end;
+
+procedure TBelib.MakeError(Session: TBelibSession; Error: DWORD);
+var
+       Buf: array[0..4096] of Char;
+begin
+       Session.ErrorCode := Error;
+       if Error = ERROR_NOT_ENOUGH_MEMORY then
+               Session.ErrorString := BELIB_ENOMEM_STRING
+       else begin
+               FillChar(Buf, SizeOf(Buf), #0);
+               FormatMessage({FORMAT_MESSAGE_ALLOCATE_BUFFER or}
+                       FORMAT_MESSAGE_IGNORE_INSERTS or
+                       FORMAT_MESSAGE_FROM_SYSTEM or
+                       FORMAT_MESSAGE_FROM_HMODULE,
+                       Pointer(GetModuleHandle('wininet')), Error,
+                       (((Word(SUBLANG_DEFAULT)) shl 10) or Word(LANG_NEUTRAL)),       //Delphi\82ÉMAKELANGID\83}\83N\83\8d\82ª\96³\82©\82Á\82½\82Ì\81B(\81\83Ö¥`)¼®ÎÞ°Ý
+//                     MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                       Buf, SizeOf(Buf), nil);
+               Session.ErrorString := Buf;
+       end;
+end;
+
+{DOLIB\82ð\8eQ\8dl\82É\82µ\82Ä\82Ü\82·
+}
+procedure TBelib.BELIB_LOGIN(Proxy: string; Port: Integer; ID: string; Pass: string);
+var
+       hSession: HINTERNET;
+       hConnect: HINTERNET;
+       hRequest: HINTERNET;
+       ProxyHostPort: string;
+       Buf: array[0..4096] of Char;
+       UserInfo: string;
+       UserAgent: string;
+    Header: string;
+       cb: DWORD;
+       Delim: Integer;
+    body: string;
+begin
+       FSession := TBelibSession.Create;
+
+       if Proxy <> '' then begin
+               ProxyHostPort := Format('%s:%d', [Proxy, Port]);
+               hSession := InternetOpen(BELIB_LOGIN_UA, INTERNET_OPEN_TYPE_PROXY, PChar(ProxyHostPort), '', 0);
+       end else begin
+               hSession := InternetOpen(BELIB_LOGIN_UA, INTERNET_OPEN_TYPE_DIRECT, nil, nil, 0);
+       end;
+
+       if not Assigned(hSession) then
+               MakeError(FSession, GetLastError())
+       else begin
+               hConnect := InternetConnect(hSession, BELIB_LOGIN_HOST,
+                       INTERNET_DEFAULT_HTTP_PORT, nil, nil,
+                       INTERNET_SERVICE_HTTP, 0, 0);
+               if not Assigned(hConnect) then
+                       MakeError(FSession, GetLastError())
+               else begin
+                       hRequest := HttpOpenRequest(hConnect, 'POST', BELIB_LOGIN_URL,
+                               nil, nil, nil,
+                               INTERNET_FLAG_NO_CACHE_WRITE or INTERNET_FLAG_NO_COOKIES or
+                               INTERNET_FLAG_NO_UI, 0);
+                       if not Assigned(hRequest) then
+                               MakeError(FSession, GetLastError())
+                       else begin
+                               UserInfo := Format('m=%s&p=%s&submit=%s', [HttpEncode(ID), HttpEncode(Pass), HttpEncode(SJIStoEUC('\93o\98^'))]);
+                Header := 'Content-Type: application/x-www-form-urlencoded'#13#10;
+                               UserAgent := Format('%s %s', [BELIB_2CH_UA, ClientUA]) + #13#10;
+                Header := Header + UserAgent;
+                               if not HttpSendRequest(hRequest, PChar(Header), DWORD(-1), PChar(UserInfo), Length(UserInfo)) then
+                                       MakeError(FSession, GetLastError())
+                               else begin
+                                       if not InternetReadFile(hRequest, @Buf, SizeOf(Buf), cb) then
+                                               MakeError(FSession, GetLastError())
+                                       else if (Pos('cookie', Buf) = 0) or (Pos('"DMDM=', Buf) = 0)
+                     or (Pos('"MDMD=', Buf) = 0) then
+                                               MakeError(FSession, ERROR_INVALID_DATA)
+                                       else begin
+                        body := Buf;
+                        FSession.FDMDM := Copy(body, Pos('"DMDM=', body) + 6, Length(body));
+                        FSession.FDMDM := Copy(FSession.FDMDM, 1, Pos(';', FSession.FDMDM) - 1);
+                        FSession.FMDMD := Copy(body, Pos('"MDMD=', body) + 6, Length(body));
+                        FSession.FMDMD := Copy(FSession.FMDMD, 1, Pos(';', FSession.FMDMD) - 1);
+                                       end;
+                               end;
+                               InternetCloseHandle(hRequest);
+                       end;
+                       InternetCloseHandle(hConnect);
+               end;
+               InternetCloseHandle(hSession);
+       end;
+end;
+end.
+
index ea1a362..7102345 100644 (file)
@@ -298,7 +298,8 @@ implementation
 
 uses
        Giko, ItemDownload, MojuUtils, IdGlobal, GikoMessage,  Imm,
-  InputAssistDataModule, InputAssist, HTMLCreate, IdCookie;
+  InputAssistDataModule, InputAssist, HTMLCreate, IdCookie, GikoDataModule,
+  Belib;
 const
        CAPTION_NAME_NEW: string = '\83M\83R\83i\83\83X\83\8c\97§\82Ä\83G\83f\83B\83^';
        CAPTION_NAME_RES: string = '\83M\83R\83i\83\83\8c\83X\83G\83f\83B\83^';
@@ -1888,18 +1889,13 @@ 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(CookieMng: TIdCookieManager; ABoard: TBoard);
@@ -1943,7 +1939,9 @@ begin
         end;
         for i := 0 to curCookies.Count - 1 do begin
             if (curCookies.Strings[i] <> '') then begin
-                ABoard.Cookie := ABoard.Cookie + curCookies.Strings[i] + '; ';
+                if (AnsiPos(VAL_HAP + '=', curCookies.Strings[i]) <> 1 ) then begin
+                    ABoard.Cookie := ABoard.Cookie + curCookies.Strings[i] + '; ';
+                end;
             end;
         end;
     finally
@@ -2458,7 +2456,6 @@ end;
 }
 function TEditorForm.getHeaderStr(const ACOOKIE: string; const SPID : string;
     const PON : string; const HAP : string; Board : TBoard) : string;
-
 begin
        Result := ACOOKIE;
        if SPID <> '' then
@@ -2475,9 +2472,9 @@ begin
                        // \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;
 
@@ -2487,6 +2484,7 @@ begin
        Result := Result + #13#10'Cookie: 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~
index aa24b80..c57e798 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -1335,7 +1335,8 @@ begin
        if GikoSys.Setting.AutoLogin then
                GikoDM.LoginAction.Execute;
 
-       GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
+    if GikoSys.Setting.BeAutoLogin then
+        GikoDM.BeLogInOutAction.Execute;
 
        //\83L\83\83\83v\83V\83\87\83\93\82ª\8fã\8f\91\82«\82³\82ê\82Ä\82µ\82Ü\82¤\82Ì\82Å\81A\82±\82±\82Å\8dÄ\90Ý\92è
        FavoriteAddToolButton.Caption := '\92Ç\89Á...';
index 6db5d14..e8c19c5 100644 (file)
@@ -1199,11 +1199,11 @@ object GikoDM: TGikoDM
     end
     object BeLogInOutAction: TAction
       Category = #12501#12449#12452#12523
+      AutoCheck = True
       Caption = 'Be2ch'#12395#12525#12464#12452#12531'/'#12525#12464#12450#12454#12488#12377#12427
       Hint = 'Be2ch'#12395#12525#12464#12452#12531'/'#12525#12464#12450#12454#12488#12377#12427
       ImageIndex = 53
       OnExecute = BeLogInOutActionExecute
-      OnUpdate = BeLogInOutActionUpdate
     end
     object UnSelectedListViewAction: TAction
       Category = #34920#31034
index 54aa449..3bc16ed 100644 (file)
@@ -334,7 +334,6 @@ type
        procedure TabsSaveActionExecute(Sender: TObject);
        procedure TabsOpenActionExecute(Sender: TObject);
        procedure BeLogInOutActionExecute(Sender: TObject);
-       procedure BeLogInOutActionUpdate(Sender: TObject);
        procedure KokomadeActionExecute(Sender: TObject);
        procedure ZenbuActionExecute(Sender: TObject);
        procedure KokoResActionExecute(Sender: TObject);
@@ -2341,20 +2340,41 @@ end;
 //! Be2ch\82É\83\8d\83O\83C\83\93/\83\8d\83O\83A\83E\83g\82·\82é
 // *************************************************************************
 procedure TGikoDM.BeLogInOutActionExecute(Sender: TObject);
+var
+       TmpCursor: TCursor;
+       msg : String;
 begin
-       GikoSys.Setting.BeLogin := not GikoSys.Setting.BeLogin;
-end;
-// *************************************************************************
-//! Be2ch\82É\83\8d\83O\83C\83\93/\83\8d\83O\83A\83E\83g\82·\82é\82ÌUpdate\83C\83x\83\93\83g
-// *************************************************************************
-procedure TGikoDM.BeLogInOutActionUpdate(Sender: TObject);
-begin
-       if (GikoSys.Setting.BeUserID <> '') and (GikoSys.Setting.BeCode <> '') then begin
-               if (GikoSys.Setting.BeLogin) then BeLogInOutAction.Checked := true
-               else BeLogInOutAction.Checked := false;
-               BeLogInOutAction.Enabled := true
-       end else
-               BeLogInOutAction.Enabled := false;
+       if GikoSys.Belib.Connected then begin
+               //\83\8d\83O\83A\83E\83g
+               GikoSys.Belib.Disconnect;
+               BeLogInOutAction.Checked := False;
+               GikoForm.AddMessageList(GikoSys.GetGikoMessage(gmBeLogout), nil, gmiOK);
+       end else begin
+               TmpCursor := GikoForm.ScreenCursor;
+               GikoForm.ScreenCursor := crHourGlass;
+               try
+                       GikoSys.Belib.ClientUA := 'gikoNavi/1.00';
+                       GikoSys.Belib.UserName := GikoSys.Setting.BeUserID;
+                       GikoSys.Belib.Password := GikoSys.Setting.BePassword;
+            if GikoSys.Setting.ReadProxy then begin
+                               GikoSys.Belib.ProxyAddress := GikoSys.Setting.ReadProxyAddress;
+                               GikoSys.Belib.ProxyPort := GikoSys.Setting.ReadProxyPort;
+                       end else begin
+                GikoSys.Belib.ProxyAddress := '';
+                               GikoSys.Belib.ProxyPort := 0;
+            end;
+            if GikoSys.Belib.Connect then begin
+                GikoForm.AddMessageList(GikoSys.GetGikoMessage(gmBeLogin) + GikoSys.Setting.BeUserID, nil, gmiOK);
+                BeLogInOutAction.Checked := True;
+            end else begin
+                GikoForm.AddMessageList(GikoSys.Belib.ErrorMsg, nil, gmiNG);
+                GikoForm.PlaySound('Error');
+                BeLogInOutAction.Checked := False;
+                       end;
+               finally
+                       GikoForm.ScreenCursor := TmpCursor;
+               end;
+       end;
 end;
 ////////////////////////////////\83t\83@\83C\83\8b\82Ü\82Å\82¨\82µ\82Ü\82¢/////////////////////
 // *************************************************************************
index bb674ef..f3ce86c 100644 (file)
@@ -9,7 +9,7 @@ type
        //! MessageList
        TGikoMessageListType = (gmLogout, gmLogin, gmForceLogin, gmSureItiran,
                        gmUnKnown, gmSureSyutoku, gmSureDiff, gmNotMod, gmAbort, gmError,
-                       gmNewRes, gmNewSure, gmResError, gmSureError);
+                       gmNewRes, gmNewSure, gmResError, gmSureError, gmBeLogout, gmBeLogin);
 
        TGikoMessage = class(THashedStringList)
        private
@@ -21,7 +21,7 @@ type
 implementation
 
 const
-       DEF_MESSAGES : array[0..13] of string = (  '\83\8d\83O\83A\83E\83g\82µ\82Ü\82µ\82½',
+       DEF_MESSAGES : array[0..15] of string = (  '\83\8d\83O\83A\83E\83g\82µ\82Ü\82µ\82½',
                                                                                           '\83\8d\83O\83C\83\93\82µ\82Ü\82µ\82½ - ',
                                                                                           '\8b­\90§\83\8d\83O\83C\83\93\82µ\82Ü\82µ\82½ - ',
                                                                                           '[\83X\83\8c\88ê\97\97\8eæ\93¾\8a®\97¹]',
@@ -34,15 +34,18 @@ const
                                                                                           '[\83\8c\83X\91\97\90M\8fI\97¹]',
                                                                                           '[\90V\83X\83\8c\91\97\90M\8fI\97¹]',
                                                                                           '[\83\8c\83X\91\97\90M\8e¸\94s]',
-                                                                                          '[\90V\83X\83\8c\91\97\90M\8e¸\94s]');
+                                                                                          '[\90V\83X\83\8c\91\97\90M\8e¸\94s]',
+                                               'BE\83\8d\83O\83A\83E\83g\82µ\82Ü\82µ\82½',
+                                                                                          'BE\83\8d\83O\83C\83\93\82µ\82Ü\82µ\82½ - ');
 
-       MESSAGE_KEYS : array[0..13] of String = ( 'Logout', 'Login',
+       MESSAGE_KEYS : array[0..15] of String = ( 'Logout', 'Login',
                                                                                        'ForceLogin', 'SureItiran',
                                                                                        'UnKnown', 'SureSyutoku',
                                                                                        'SureDiff', 'NotMod',
                                                                                        'Abort', 'Error',
                                                                                        'NewRes', 'NewSure',
-                                                                                       'ResError', 'SureError');
+                                                                                       'ResError', 'SureError',
+                                            'BELogout', 'BELogin');
 
 constructor TGikoMessage.Create;
 begin
@@ -54,7 +57,7 @@ end;
 function TGikoMessage.GetMessage(MesType: TGikoMessageListType): String;
 begin
        Result := '';
-       if MesType in [gmLogout..gmSureError] then begin
+       if MesType in [gmLogout..gmBeLogin] then begin
                //Key\82Å\8c\9f\8dõ\82µ\82Ä\8c©\82Â\82©\82ê\82Î\82»\82ê\82ð\95Ô\82·
                Result := Self.Values[MESSAGE_KEYS[Ord(MesType)]];
                if Result = '' then begin
index 5e50481..1a0b414 100644 (file)
@@ -15,7 +15,7 @@ uses
        {HttpApp,} URLMon, IdGlobal, IdURI, {Masks,}
        Setting, BoardGroup, gzip, Dolib, bmRegExp, AbonUnit,
        ExternalBoardManager, ExternalBoardPlugInMain,
-       GikoBayesian, GikoMessage;
+       GikoBayesian, GikoMessage, Belib;
 
 type
        TVerResourceKey = (
@@ -112,6 +112,7 @@ type
                FBayesian       : TGikoBayesian;        //!< \83x\83C\83W\83A\83\93\83t\83B\83\8b\83^
                FVersion : String;                    //!< \83t\83@\83C\83\8b\83o\81[\83W\83\87\83\93
                FGikoMessage: TGikoMessage;
+        FBelib: TBelib;
                //! \82 \82é\83Z\83p\83\8c\81[\83^\82Å\8bæ\90Ø\82ç\82ê\82½\95\8e\9a\97ñ\82©\82ç\82\8e\94Ô\96Ú\82Ì\95\8e\9a\97ñ\82ð\8eæ\82è\8fo\82·
                function ChooseString(const Text, Separator: string; Index: integer): string;
         //! \88ê\8e\9e\83t\83@\83C\83\8b\82©\82ç\82Ì\95\9c\8b\8c
@@ -165,6 +166,7 @@ type
                function DivideSubject(Line: string): TSubjectRec;
                property Setting: TSetting read FSetting write FSetting;
                property Dolib: TDolib read FDolib write FDolib;
+               property Belib: TBelib read FBelib write FBelib;
 
                function UrlToID(url: string): string;
                function UrlToServer(url: string): string;
@@ -317,6 +319,7 @@ begin
     Inherited;
        FSetting := TSetting.Create;
        FDolib := TDolib.Create;
+    FBelib := TBelib.Create;
        FAWKStr := TAWKStr.Create(nil);
        if DirectoryExists(GetConfigDir) = false then begin
                CreateDir(GetConfigDir);
@@ -370,6 +373,7 @@ begin
        FreeAndNil(FSelectResFilter);
        FreeAndNil(FAbon);
        FreeAndNil(FAWKStr);
+    FreeAndNil(FBelib);
        FreeAndNil(FDolib);
        FreeAndNil(FSetting);
        inherited;
index 1672d94..50446b9 100644 (file)
@@ -253,7 +253,7 @@ object OptionDialog: TOptionDialog
           Top = 43
           Width = 417
           Height = 20
-          ItemHeight = 0
+          ItemHeight = 12
           TabOrder = 0
           Text = 'BoardURLComboBox'
         end
@@ -1647,28 +1647,30 @@ object OptionDialog: TOptionDialog
         object Label7: TLabel
           Left = 8
           Top = 24
-          Width = 73
+          Width = 90
           Height = 12
-          Caption = #12513#12540#12523#12450#12489#12524#12473
+          Caption = #12513#12540#12523#12450#12489#12524#12473'(&M)'
+          FocusControl = BeUserIDEdit
         end
         object Label8: TLabel
           Left = 18
           Top = 48
-          Width = 54
+          Width = 71
           Height = 12
-          Caption = #35469#35388#12467#12540#12489
+          Caption = #12497#12473#12527#12540#12489'(&W)'
+          FocusControl = BeCodeEdit
         end
         object BeUserIDEdit: TEdit
-          Left = 88
+          Left = 104
           Top = 20
-          Width = 369
+          Width = 353
           Height = 20
           TabOrder = 0
         end
         object BeCodeEdit: TEdit
-          Left = 88
+          Left = 104
           Top = 45
-          Width = 369
+          Width = 353
           Height = 20
           PasswordChar = '*'
           TabOrder = 1
@@ -1678,7 +1680,7 @@ object OptionDialog: TOptionDialog
           Top = 71
           Width = 193
           Height = 17
-          Caption = #36215#21205#26178#12395#33258#21205#12525#12464#12452#12531#12377#12427'(&S)'
+          Caption = #36215#21205#26178#12395#33258#21205#12525#12464#12452#12531#12377#12427'(&T)'
           TabOrder = 2
         end
       end
index 67973ff..1274f05 100644 (file)
@@ -886,7 +886,7 @@ begin
 
        //Be2ch\94F\8fØ
        BeUserIDEdit.Text := GikoSys.Setting.BeUserID;
-       BeCodeEdit.Text := GikoSys.Setting.BeCode;
+       BeCodeEdit.Text := GikoSys.Setting.BePassword;
        BeAutoLoginCheckBox.Checked := GikoSys.Setting.BeAutoLogin;
        //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\90\94
        MaxRecordCountEdit.Text := IntToStr(GikoSys.Setting.MaxRecordCount);
@@ -1189,7 +1189,7 @@ begin
        GikoSys.Setting.UseUndecided := UseUndecidedCheckBox.Checked;
         //Be2ch
         GikoSys.Setting.BeUserID := BeUserIDEdit.Text;
-        GikoSys.Setting.BeCode := BeCodeEdit.Text;
+        GikoSys.Setting.BePassword := BeCodeEdit.Text;
                GikoSys.Setting.BeAutoLogin := BeAutoLoginCheckBox.Checked;
        //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\90\94
        GikoSys.Setting.MaxRecordCount := Max(StrToInt64Def(MaxRecordCountEdit.Text,100),1);
index 8e9b47b..27b66fa 100644 (file)
@@ -414,7 +414,7 @@ type
                                //Be2ch
                 //\94F\8fØ\97p\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h
                FBeUserID: String;
-               FBeCode: String;
+               FBePassword: String;
                FBeAutoLogin: Boolean;
                FBeLogin: Boolean;
                //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
@@ -799,7 +799,7 @@ type
                property UseUndecided: Boolean read FUseUndecided write FUseUndecided;
 
                property BeUserID: string read FBeUserID write FBeUserID;
-               property BeCode: string read FBeCode write FBeCode;
+               property BePassword: string read FBePassword write FBePassword;
                property BeAutoLogin: Boolean read FBeAutoLogin write FBeAutoLogin;
                property BeLogin: Boolean read FBeLogin write FBeLogin;
                property MaxRecordCount : Integer read FMaxRecordCount write FMaxRecordCount;
@@ -1315,7 +1315,7 @@ begin
         //Be2ch
                //\94F\8fØ\97p\83\86\81[\83UID\81E\94F\8fØ\83R\81[\83h
                FBeUserID := ini.ReadString('Be', 'UserID', '');
-               FBeCode := Decrypt(ini.ReadString('Be', 'Code', ''));
+               FBePassword := Decrypt(ini.ReadString('Be', 'Password', ''));
                FBeAutoLogin := ini.ReadBool('Be', 'AutoLogin', False);
                //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
                FMaxRecordCount := Max(ini.ReadInteger('Recode', 'Max', 100), 1);
@@ -1740,7 +1740,7 @@ begin
 
                //\94F\8fØ\97p\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h
                ini.WriteString('Be', 'UserID', FBeUserID);
-               ini.WriteString('Be', 'Code', Encrypt(FBeCode));
+               ini.WriteString('Be', 'Password', Encrypt(FBePassword));
                ini.WriteBool('Be', 'AutoLogin', FBeAutoLogin);
 
                //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91\8c\8f\90\94
index 6a7b0cb..391fa76 100644 (file)
@@ -83,7 +83,8 @@ uses
   UpdateCheck in 'UpdateCheck.pas' {UpdateCheckForm},
   SHA1Unit in 'SHA1Unit.pas',
   PopupMenuUtil in 'PopupMenuUtil.pas',
-  PopupMenuSetting in 'PopupMenuSetting.pas' {PopupMenuSettingDialog};
+  PopupMenuSetting in 'PopupMenuSetting.pas' {PopupMenuSettingDialog},
+  Belib in 'Belib.pas';
 
 {$R *.RES}
 {$R gikoResource.res}
index 62bbcff..23a55ac 100644 (file)
Binary files a/gikoNavi.res and b/gikoNavi.res differ