View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003977 | JEDI VCL | 00 JVCL Components | public | 2006-11-01 03:17 | 2006-11-01 07:03 |
| Reporter | bhenker | Assigned To | obones | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | Daily / GIT | ||||
| Target Version | Fixed in Version | 3.30 | |||
| Summary | 0003977: JvTranslateString: Adding event to control translation | ||||
| Description | Add an event for translation of user defined commands or modify the translation for default commands | ||||
| Tags | No tags attached. | ||||
|
2006-11-01 03:17
|
JvTranslateString.pas.patch (1,703 bytes)
Index: JvTranslateString.pas
===================================================================
--- JvTranslateString.pas (revision 10998)
+++ JvTranslateString.pas (working copy)
@@ -55,6 +55,9 @@
/// PRODUCTVERSION : Product version of the application out of the File-Version-Information
/// SCREENSIZE : Size of the screen in format widthxheight
/// DESKTOPSIZE : Size of the desktop in format widthxheight
+ TProcessCommandEvent = procedure(Sender: TObject; const Command: string;
+ var CommandResult: string; var Changed: Boolean) of object;
+
TJvTranslateString = class(TJvComponent)
private
FAppNameHandled: Boolean;
@@ -70,6 +73,7 @@
FLeftDelimiter: string;
FRightDelimiter: string;
FTimeFormat: string;
+ FOnProcessCommand: TProcessCommandEvent;
function GetFormName: string;
function GetFormCaption: string;
function GetVersionInfoAppName: string;
@@ -90,6 +94,7 @@
property LeftDelimiter: string read FLeftDelimiter write FLeftDelimiter;
property RightDelimiter: string read FRightDelimiter write FRightDelimiter;
property TimeFormat: string read FTimeFormat write FTimeFormat;
+ property OnProcessCommand: TProcessCommandEvent read FOnProcessCommand write FOnProcessCommand;
end;
{$IFDEF UNITVERSIONING}
@@ -353,6 +358,8 @@
CommandResult := Format('%dx%d', [Screen.DesktopWidth, Screen.DesktopHeight])
else
Result := False;
+ if Assigned(FOnProcessCommand) then
+ FOnProcessCommand(Self, UpperCommand, CommandResult, Result);
end;
procedure TJvTranslateString.SetDateTimeFormat(const Value: string);
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2006-11-01 03:17 | bhenker | New Issue | |
| 2006-11-01 03:17 | bhenker | File Added: JvTranslateString.pas.patch | |
| 2006-11-01 07:03 | obones | Status | new => resolved |
| 2006-11-01 07:03 | obones | Fixed in Version | => Daily / SVN |
| 2006-11-01 07:03 | obones | Resolution | open => fixed |
| 2006-11-01 07:03 | obones | Assigned To | => obones |