Changeset 738 for cprs/branches/tmg-cprs/CPRS-Chart/fxBroker.pas
- Timestamp:
- Apr 19, 2010, 5:24:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/tmg-cprs/CPRS-Chart/fxBroker.pas
r612 r738 22 22 DKLanguageController1: TDKLanguageController; 23 23 btnClear: TBitBtn; 24 lblStoredCallsNum: TLabel; 25 cboJumpTo: TComboBox; 24 26 procedure cmdPrevClick(Sender: TObject); 25 27 procedure cmdNextClick(Sender: TObject); … … 31 33 procedure btnRLTClick(Sender: TObject); 32 34 procedure btnClearClick(Sender: TObject); 35 procedure cboJumpToDropDown(Sender: TObject); 36 procedure cboJumpToChange(Sender: TObject); 33 37 private 34 38 { Private declarations } 35 39 FRetained: Integer; 36 40 FCurrent: Integer; 41 procedure UpdateDisplay; //kt added 37 42 public 38 43 { Public declarations } … … 56 61 FRetained := RetainedRPCCount - 1; 57 62 FCurrent := FRetained; 63 UpdateDisplay; //kt 64 { //kt moved to UpdateDisplay 58 65 LoadRPCData(memData.Lines, FCurrent); 59 66 memData.SelStart := 0; 60 67 // 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 } 62 71 ShowModal; 63 72 end; … … 70 79 begin 71 80 FCurrent := HigherOf(FCurrent - 1, 0); 81 UpdateDisplay; //kt 82 { //kt moved to UpdateDisplay 72 83 LoadRPCData(memData.Lines, FCurrent); 73 84 memData.SelStart := 0; 74 85 //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 } 76 89 end; 77 90 78 91 procedure TfrmBroker.cmdNextClick(Sender: TObject); 79 92 begin 93 FRetained := RetainedRPCCount - 1; //kt added line 4/15/10 80 94 FCurrent := LowerOf(FCurrent + 1, FRetained); 95 UpdateDisplay; //kt 96 { //kt moved to UpdateDisplay 81 97 LoadRPCData(memData.Lines, FCurrent); 82 98 memData.SelStart := 0; 83 99 //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 } 103 end; 104 105 procedure TfrmBroker.UpdateDisplay; //kt added 106 begin 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 113 end; 114 115 procedure TfrmBroker.cboJumpToDropDown(Sender: TObject); 116 //kt added entire function 117 var i : integer; 118 s : string; 119 Info : TStringList; //Not owned here... 120 begin 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; 130 end; 131 132 procedure TfrmBroker.cboJumpToChange(Sender: TObject); 133 //kt added function 134 begin 135 if cboJumpTo.Items.count > 0 then begin 136 FCurrent := (cboJumpTo.Items.count-1) - cboJumpTo.ItemIndex; 137 UpdateDisplay; //kt 138 end; 139 end; 140 86 141 87 142 procedure TfrmBroker.FormClose(Sender: TObject; var Action: TCloseAction); … … 138 193 139 194 procedure TfrmBroker.btnClearClick(Sender: TObject); 140 //kt added en dtire function195 //kt added entire function 141 196 begin 142 197 ORNet.RPCCallsClear; 198 memData.Lines.Clear; //kt 4/15/10 199 cboJumpTo.Text := '-- Select a call to jump to --'; 143 200 FCurrent := 0; 144 201 FRetained := RetainedRPCCount - 1; … … 146 203 end; 147 204 205 148 206 end.
Note:
See TracChangeset
for help on using the changeset viewer.