Ignore:
Timestamp:
Jul 3, 2010, 4:43:42 PM (14 years ago)
Author:
Kevin Toppenberg
Message:

Allow retry on login

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/tmg-cprs/CPRS-Chart/fFrame.pas

    r793 r820  
    753753  tempPosition : TTabPosition; //kt
    754754  ImagesEnabled : boolean; //kt
     755  Connected : boolean; //kt 6/3/10
     756  RetryConnect : integer; //kt 6/3/10
    755757begin
    756758  //kt 6/29/07  Begin modification -------------------
     
    809811{$ENDIF}
    810812
     813{ //kt Original block
     814  if not ConnectToServer(TX_OPTION) then
     815  begin
     816    if Assigned(RPCBrokerV) then
     817      InfoBox(RPCBrokerV.RPCBError, 'Error', MB_OK or MB_ICONERROR);
     818    Close;
     819    Exit;
     820  end;  }
     821
     822  //kt begin mod 6/3/10 --------------
    811823  TMGAbort := False;  //kt 3/25/09
    812   if not ConnectToServer(TX_OPTION) then
    813   begin
    814     if Assigned(RPCBrokerV) then
    815 //    InfoBox(RPCBrokerV.RPCBError, 'Error', MB_OK or MB_ICONERROR);  <-- original line.  //kt 7/17/2007
    816       InfoBox(RPCBrokerV.RPCBError, DKLangConstW('fFrame_Error'), MB_OK or MB_ICONERROR); //kt added 7/17/2007
    817     Close;
    818     TMGAbort := True;   //kt 3/25/09
    819     Exit;
    820   end;
     824  repeat
     825    Connected := ConnectToServer(TX_OPTION);
     826    if not Connected then begin
     827      RetryConnect := mrCancel;
     828      if Assigned(RPCBrokerV) then begin
     829        RetryConnect := MessageDlg(RPCBrokerV.RPCBError, mtError, [mbRetry, mbCancel], 0);
     830      end;
     831      if RetryConnect <> mrRetry then begin
     832        Close;
     833        TMGAbort := True;   //kt 3/25/09
     834        Exit;
     835      end;
     836    end
     837  until Connected;   //Exit command above will also abort loop
     838  //kt end mod ----------
    821839
    822840  if ctxContextor <> nil then
Note: See TracChangeset for help on using the changeset viewer.