View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003580 | JEDI VCL | 99 Other | public | 2006-03-14 15:29 | 2006-04-14 03:45 |
Reporter | Grzegorz Skoczylas | Assigned To | obones | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Platform | N/A | OS | N/A | OS Version | N/A |
Product Version | |||||
Target Version | Fixed in Version | 3.30 | |||
Summary | 0003580: Improved DSA dialog | ||||
Description | Two improvements in JEDI DSA dialogs: 1. More readable message when timeout is 60 seconds or longer. 2. Possibility to implement advanced timeout formatting. | ||||
Additional Information | Point 0000001: Simple improvement in formatting timeout message when timeout is one minute or longer. Point #2: Defaut behaviour is the same as so far. But, when needed, it is possible to implement more advanced timeout formatting. For example in Polish standard formatting is not good enough. For proper formatting timeout message we can use following functions: function Odmiana(nCnt: integer; const sInf1, sInf2: string; const sInf5: string = '') : string; begin nCnt := Abs(nCnt); if nCnt = 1 then Result := sInf1 else if (sInf5 = '') or (((nCnt mod 10) in [2..4]) and not((nCnt mod 100) in [12..14])) then Result := sInf2 else Result := sInf5 end; function DSATimeFmt(nSecs: Integer) : string; var nMins: Integer; begin { DSATimeFmt } nMins := nSecs div 60; nSecs := nSecs mod 60; if nMins <> 0 then Result := Format(RsCntdownTextMin, [nMins, Odmiana(nMins, 'minutę', 'minuty', 'minut'), nSecs, Odmiana(nSecs, 'sekundę', 'sekundy', 'sekund')]) else Result := Format(RsCntdownTextSec, [nSecs, Odmiana(nSecs, 'sekundę', 'sekundy', 'sekund')]) end ; initialization SetDSATimeFmt(DSATimeFmt); | ||||
Tags | No tags attached. | ||||
2006-03-14 15:29
|
JEDI DSA improved.zip (42,010 bytes) |
|
Well, thanks for providing this, but I have no idea what you changed and what for. Please provide detailed explanations on where the changes occured. |
|
Changes in "JvResources.pas": - Constant "RsCntdownText" replaced with "RsCntdownTextMin" and "RsCntdownTextSec". - Added constants "RsCntdownMinText" and "RsCntdownMinsText". Reason: Constants used for formatting more readable countdown message in DSA dialogs, when countdown time is 60 seconds or longer. Changes in "JvDSADialogs.pas": - Changed protected method TimeoutUnit (added second parameter). - Defined procedural type "TJvDSATimeFmt". - New procedure "SetDSATimeFmt" allow to replace standard function for formatting countdown message with another one. - New function "StdDSATimeFmt" - it is now default function for formatting countdown message in DSA dialogs. - Implementation variable "FunctionTimeFmt" remember current function used for formatting countdown message. - Small modyfication of implementation of "TimerEvent" method. Reasons: 1. More readable standard countdown message in DSA dialogs when countdown time is 60 seconds or longer. 2. Possibility to replace standard function for formatting countdown message with function defined by application, e.g. for formmatting countdown message according to Polish rules. |
|
Ok thanks. This is now in CVS, but has been adpated to be slightly more flexible. Basically, the RsCntdownText is still there, but has only one parameter which is the string representing the time. The standard formatter will do what it was doing in your modifications. The names have also been expanded (TimeFormatter instead of TimeFmt) to make them clearer. Finally, note that to do translation, we recommend you use DxGetText. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-03-14 15:29 | Grzegorz Skoczylas | New Issue | |
2006-03-14 15:29 | Grzegorz Skoczylas | File Added: JEDI DSA improved.zip | |
2006-04-07 06:56 | obones | Note Added: 0009023 | |
2006-04-07 06:56 | obones | Status | new => feedback |
2006-04-11 15:37 | Grzegorz Skoczylas | Note Added: 0009065 | |
2006-04-12 01:07 | obones | Status | feedback => acknowledged |
2006-04-14 03:45 | obones | Status | acknowledged => resolved |
2006-04-14 03:45 | obones | Resolution | open => fixed |
2006-04-14 03:45 | obones | Assigned To | => obones |
2006-04-14 03:45 | obones | Note Added: 0009104 |