Ignore:
Timestamp:
Apr 19, 2010, 5:24:20 PM (14 years ago)
Author:
Kevin Toppenberg
Message:

Fixed Text Object Parameters

File:
1 edited

Legend:

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

    r612 r738  
    2222    DKLanguageController1: TDKLanguageController;
    2323    btnClear: TBitBtn;
     24    lblStoredCallsNum: TLabel;
     25    cboJumpTo: TComboBox;
    2426    procedure cmdPrevClick(Sender: TObject);
    2527    procedure cmdNextClick(Sender: TObject);
     
    3133    procedure btnRLTClick(Sender: TObject);
    3234    procedure btnClearClick(Sender: TObject);
     35    procedure cboJumpToDropDown(Sender: TObject);
     36    procedure cboJumpToChange(Sender: TObject);
    3337  private
    3438    { Private declarations }
    3539    FRetained: Integer;
    3640    FCurrent: Integer;
     41    procedure UpdateDisplay; //kt added
    3742  public
    3843    { Public declarations }
     
    5661      FRetained := RetainedRPCCount - 1;
    5762      FCurrent := FRetained;
     63      UpdateDisplay; //kt
     64      { //kt moved to UpdateDisplay
    5865      LoadRPCData(memData.Lines, FCurrent);
    5966      memData.SelStart := 0;
    6067//    lblCallID.Caption := 'Last Call Minus: ' + IntToStr(FRetained - FCurrent);  <-- original line.  //kt 8/7/2007
    61       lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(FRetained - FCurrent); //kt added 8/7/2007
     68      lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(HigherOf(FRetained - FCurrent,0)); //kt added 8/7/2007
     69      lblStoredCallsNum.Caption := DKLangConstW('fxBroker_Stored_Calls') + IntToStr(RetainedRPCCount); //kt added 4/15/10
     70      }
    6271      ShowModal;
    6372    end;
     
    7079begin
    7180  FCurrent := HigherOf(FCurrent - 1, 0);
     81  UpdateDisplay; //kt
     82  { //kt moved to UpdateDisplay
    7283  LoadRPCData(memData.Lines, FCurrent);
    7384  memData.SelStart := 0;
    7485//lblCallID.Caption := 'Last Call Minus: ' + IntToStr(FRetained - FCurrent);  <-- original line.  //kt 8/7/2007
    75   lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(FRetained - FCurrent); //kt added 8/7/2007
     86  lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(HigherOf(FRetained - FCurrent,0)); //kt added 8/7/2007
     87  lblStoredCallsNum.Caption := DKLangConstW('fxBroker_Stored_Calls') + IntToStr(RetainedRPCCount); //kt added 4/15/10
     88  }
    7689end;
    7790
    7891procedure TfrmBroker.cmdNextClick(Sender: TObject);
    7992begin
     93  FRetained := RetainedRPCCount - 1;  //kt added line 4/15/10
    8094  FCurrent := LowerOf(FCurrent + 1, FRetained);
     95  UpdateDisplay; //kt
     96  { //kt moved to UpdateDisplay
    8197  LoadRPCData(memData.Lines, FCurrent);
    8298  memData.SelStart := 0;
    8399//lblCallID.Caption := 'Last Call Minus: ' + IntToStr(FRetained - FCurrent);  <-- original line.  //kt 8/7/2007
    84   lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(FRetained - FCurrent); //kt added 8/7/2007
    85 end;
     100  lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(HigherOf(FRetained - FCurrent,0)); //kt added 8/7/2007
     101  lblStoredCallsNum.Caption := DKLangConstW('fxBroker_Stored_Calls') + IntToStr(RetainedRPCCount); //kt added 4/15/10
     102  }
     103end;
     104
     105procedure TfrmBroker.UpdateDisplay; //kt added
     106begin
     107  FRetained := RetainedRPCCount - 1;  //kt added line 4/15/10
     108  LoadRPCData(memData.Lines, FCurrent);
     109  memData.SelStart := 0;
     110//lblCallID.Caption := 'Last Call Minus: ' + IntToStr(FRetained - FCurrent);  <-- original line.  //kt 8/7/2007
     111  lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(HigherOf(FRetained - FCurrent,0)); //kt added 8/7/2007
     112  lblStoredCallsNum.Caption := DKLangConstW('fxBroker_Stored_Calls') + IntToStr(RetainedRPCCount); //kt added 4/15/10
     113end;
     114
     115procedure TfrmBroker.cboJumpToDropDown(Sender: TObject);
     116//kt added entire function
     117var i : integer;
     118    s : string;
     119    Info : TStringList;   //Not owned here...
     120begin
     121  cboJumpTo.Items.Clear;
     122  for i := 0 to RetainedRPCCount - 1 do begin
     123    Info := AccessRPCData(i);
     124    if Info.Count < 2 then continue;
     125    s := Info.Strings[1];
     126    s := piece(s,'Called at: ',2);
     127    s := s + ':  ' + Info.Strings[0];
     128    cboJumpTo.Items.Insert(0,s);
     129  end;
     130end;
     131
     132procedure TfrmBroker.cboJumpToChange(Sender: TObject);
     133//kt added function
     134begin
     135  if cboJumpTo.Items.count > 0 then begin
     136    FCurrent := (cboJumpTo.Items.count-1) - cboJumpTo.ItemIndex;
     137    UpdateDisplay; //kt
     138  end;
     139end;
     140
    86141
    87142procedure TfrmBroker.FormClose(Sender: TObject; var Action: TCloseAction);
     
    138193
    139194procedure TfrmBroker.btnClearClick(Sender: TObject);
    140   //kt added endtire function
     195  //kt added entire function
    141196begin
    142197  ORNet.RPCCallsClear;
     198  memData.Lines.Clear; //kt 4/15/10
     199  cboJumpTo.Text := '-- Select a call to jump to --';
    143200  FCurrent := 0;
    144201  FRetained := RetainedRPCCount - 1;
     
    146203end;
    147204
     205
    148206end.
Note: See TracChangeset for help on using the changeset viewer.