OSDN Git Service

TBottleSstp.ResendSleep implemented
authornaru <bottle@mikage.to>
Thu, 6 Mar 2003 21:03:19 +0000 (21:03 +0000)
committernaru <bottle@mikage.to>
Thu, 6 Mar 2003 21:03:19 +0000 (21:03 +0000)
bottleclient/BottleSstp.pas
bottleclient/MainForm.pas

index 6d62e26..3b66f07 100755 (executable)
@@ -39,10 +39,12 @@ type
     FOnResendTrying: TBottleSstpResendEvent;
     FOnResendEnd: TBottleSstpResendEvent;
     FLastTickCount: Int64;
+    FResendSleep: boolean;
     function GetCueCount: integer;
     procedure SetOnResendCountChange(const Value: TNotifyEvent);
     procedure SetOnResendEnd(const Value: TBottleSstpResendEvent);
     procedure SetOnResendTrying(const Value: TBottleSstpResendEvent);
+    procedure SetResendSleep(const Value: boolean);
   protected
     function ConnectSstp(Source: TStrings): TBottleSstpResult;
     procedure WndProc(var Msg: TMessage);
@@ -59,6 +61,7 @@ type
     procedure Push(Bottle: TLogItem); //\8dÄ\91\97\83o\83b\83t\83@\82Ì\8dÅ\8cã\82É\92Ç\89Á(\95\81\92Ê)
     procedure Unshift(Bottle: TLogItem); //\8dÄ\91\97\83o\83b\83t\83@\82Ì\90æ\93ª\82É\92Ç\89Á
     procedure Clear; //\8dÄ\91\97\83o\83b\83t\83@\82ð\83N\83\8a\83A
+    property ResendSleep: boolean read FResendSleep write SetResendSleep;
     property CueCount: integer read GetCueCount;
     property OnResendCountChange: TNotifyEvent read FOnResendCountChange write SetOnResendCountChange;
     property OnResendEnd: TBottleSstpResendEvent read FOnResendEnd write SetOnResendEnd;
@@ -197,6 +200,7 @@ begin
   inherited;
   while not Terminated do begin
     sleep(100);
+    if ResendSleep then Continue;
     if (GetTickCount - FLastTickCount < 2000) and (GetTickCount > FLastTickCount) then
       Continue;
     FLastTickCount := GetTickCount;
@@ -323,6 +327,11 @@ begin
   FOnResendTrying := Value;
 end;
 
+procedure TBottleSstp.SetResendSleep(const Value: boolean);
+begin
+  FResendSleep := Value;
+end;
+
 procedure TBottleSstp.Unshift(Bottle: TLogItem);
 var Item: TLogItem;
 begin
index 9bf8fbf..028dc69 100755 (executable)
@@ -1389,7 +1389,7 @@ end;
 procedure TfrmSender.SetSleeping(const Value: boolean);
 begin
   FSleeping := Value;
-  DirectSstp.Sleep := Value;
+  FBottleSstp.ResendSleep := Value;
   ChangeTaskIcon;
 end;