From: <jfu...@us...> - 2008-02-21 23:17:17
|
Revision: 11743 http://jvcl.svn.sourceforge.net/jvcl/?rev=11743&view=rev Author: jfudickar Date: 2008-02-21 15:17:13 -0800 (Thu, 21 Feb 2008) Log Message: ----------- Enhanced Work to show detail informations to all properties in the PropertyStoreEditor. Have a look again at the JvProgramVersionCheck Example, where you can see the editor in action. Modified Paths: -------------- trunk/jvcl/run/JvDynControlEngineDevExpCx.pas trunk/jvcl/run/JvDynControlEngineIntf.pas trunk/jvcl/run/JvDynControlEngineJVCLInspector.pas trunk/jvcl/run/JvProgramVersionCheck.pas trunk/jvcl/run/JvPropertyStore.pas trunk/jvcl/run/JvPropertyStoreEditor.pas trunk/jvcl/run/JvPropertyStoreEditorIntf.pas trunk/jvcl/run/JvResources.pas Modified: trunk/jvcl/run/JvDynControlEngineDevExpCx.pas =================================================================== --- trunk/jvcl/run/JvDynControlEngineDevExpCx.pas 2008-02-21 19:03:41 UTC (rev 11742) +++ trunk/jvcl/run/JvDynControlEngineDevExpCx.pas 2008-02-21 23:17:13 UTC (rev 11743) @@ -47,7 +47,7 @@ cxEdit, cxCalc, cxSpinEdit, cxTimeEdit, cxCheckListBox, cxGroupBox, cxRichEdit, cxProgressBar, cxPC, cxColorComboBox, {$IFDEF USE_3RDPARTY_DEVEXPRESS_CXVERTICALGRID} - cxOi, + cxOi, cxVGrid, {$ENDIF} JvDynControlEngine, JvDynControlEngineIntf; @@ -887,11 +887,15 @@ TJvDynControlCxRTTIInspectorControl = class(TcxRTTIInspector, IUnknown, IJvDynControl, IJvDynControlRTTIInspectorControl, IJvDynControlDevExpCx) private + fControlOnPropertyChange: TJvDynControlInspectorControlOnPropertyChangeEvent; fOnDisplayProperty: TJvDynControlInspectorControlOnDisplayPropertyEvent; fOnTranslatePropertyName: TJvDynControlInspectorControlOnTranslatePropertyNameEvent; + OldPropertyName: string; procedure InspectorOnFilterProperty(Sender: TObject; const PropertyName: string; var Accept: Boolean); + procedure InspectorOnItemChanged(Sender: TObject; AOldRow: TcxCustomRow; + AOldCellIndex: Integer); protected //IJvDynControlRTTIInspectorControl function ControlGetOnDisplayProperty: @@ -922,6 +926,10 @@ // IJvDynControlDevExpCx procedure ControlSetCxProperties(Value: TCxDynControlWrapper); + function GetControlOnPropertyChange: + TJvDynControlInspectorControlOnPropertyChangeEvent; + procedure SetControlOnPropertyChange(const Value: + TJvDynControlInspectorControlOnPropertyChangeEvent); end; TJvDynControlCxColorComboBox = class(TcxColorComboBox, IUnknown, IJvDynControl, @@ -3796,6 +3804,7 @@ procedure TJvDynControlCxRTTIInspectorControl.ControlSetDefaultProperties; begin OnFilterProperty := InspectorOnFilterProperty; + OnItemChanged := InspectorOnItemChanged; end; procedure TJvDynControlCxRTTIInspectorControl.ControlSetCaption(const Value: string); @@ -3900,6 +3909,26 @@ fOnTranslatePropertyName := Value; end; +procedure TJvDynControlCxRTTIInspectorControl.InspectorOnItemChanged(Sender: + TObject; AOldRow: TcxCustomRow; AOldCellIndex: Integer); +var + NewPropertyName: string; +begin + if Assigned (FocusedRow) then + NewPropertyName := TcxPropertyRow(FocusedRow).PropertyEditor.GetName + else + NewPropertyName := ''; + if Assigned(fControlOnPropertyChange) then + fControlOnPropertyChange(OldPropertyName, NewPropertyName); + OldPropertyName := NewPropertyName; +end; + +function TJvDynControlCxRTTIInspectorControl.GetControlOnPropertyChange: + TJvDynControlInspectorControlOnPropertyChangeEvent; +begin + Result := fControlOnPropertyChange; +end; + procedure TJvDynControlCxRTTIInspectorControl.InspectorOnFilterProperty(Sender: TObject; const PropertyName: string; var Accept: Boolean); begin @@ -3907,10 +3936,14 @@ Accept := fOnDisplayProperty(PropertyName) and ControlIsPropertySupported(PropertyName); end; +procedure TJvDynControlCxRTTIInspectorControl.SetControlOnPropertyChange(const + Value: TJvDynControlInspectorControlOnPropertyChangeEvent); +begin + fControlOnPropertyChange := Value; +end; + function TJvDynControlCxColorComboBox.ControlGetColorName(AColor: TColor): string; -var - i: Integer; begin Result := ''; end; Modified: trunk/jvcl/run/JvDynControlEngineIntf.pas =================================================================== --- trunk/jvcl/run/JvDynControlEngineIntf.pas 2008-02-21 19:03:41 UTC (rev 11742) +++ trunk/jvcl/run/JvDynControlEngineIntf.pas 2008-02-21 23:17:13 UTC (rev 11743) @@ -313,6 +313,7 @@ TJvDynControlInspectorControlOnTranslatePropertyNameEvent = function(const aPropertyName : String) : string of object; TJvDynControlInspectorControlOnDisplayPropertyEvent = function(const aPropertyName : String): boolean of object; + TJvDynControlInspectorControlOnPropertyChangeEvent = procedure(var OldPropertyName, NewPropertyName : string) of object; IJvDynControlRTTIInspectorControl = interface ['{D7C445BF-1ED9-467B-BD01-7D40513016B4}'] @@ -328,12 +329,19 @@ procedure ControlSetOnDisplayProperty(const Value: TJvDynControlInspectorControlOnDisplayPropertyEvent); procedure ControlSetOnTranslatePropertyName(const Value: - TJvDynControlInspectorControlOnTranslatePropertyNameEvent); + TJvDynControlInspectorControlOnTranslatePropertyNameEvent); + function GetControlOnPropertyChange: + TJvDynControlInspectorControlOnPropertyChangeEvent; + procedure SetControlOnPropertyChange(const Value: + TJvDynControlInspectorControlOnPropertyChangeEvent); property ControlInspectedObject: TObject read ControlGetInspectedObject write ControlSetInspectedObject; property ControlOnDisplayProperty: TJvDynControlInspectorControlOnDisplayPropertyEvent read ControlGetOnDisplayProperty write ControlSetOnDisplayProperty; + property ControlOnPropertyChange: + TJvDynControlInspectorControlOnPropertyChangeEvent read + GetControlOnPropertyChange write SetControlOnPropertyChange; property ControlOnTranslatePropertyName: TJvDynControlInspectorControlOnTranslatePropertyNameEvent read ControlGetOnTranslatePropertyName write ControlSetOnTranslatePropertyName; Modified: trunk/jvcl/run/JvDynControlEngineJVCLInspector.pas =================================================================== --- trunk/jvcl/run/JvDynControlEngineJVCLInspector.pas 2008-02-21 19:03:41 UTC (rev 11742) +++ trunk/jvcl/run/JvDynControlEngineJVCLInspector.pas 2008-02-21 23:17:13 UTC (rev 11743) @@ -41,13 +41,16 @@ TJvDynControlRTTIInspectorControl = class(TJvInspector, IUnknown, IJvDynControl, IJvDynControlRTTIInspectorControl) private + fControlOnPropertyChange: TJvDynControlInspectorControlOnPropertyChangeEvent; fOnDisplayProperty: TJvDynControlInspectorControlOnDisplayPropertyEvent; fOnTranslatePropertyName: TJvDynControlInspectorControlOnTranslatePropertyNameEvent; + OldPropertyName: string; procedure JvInspectorAfterItemCreate(Sender: TObject; Item: TJvCustomInspectorItem); procedure JvInspectorBeforeItemCreate(Sender: TObject; Data: TJvCustomInspectorData; var ItemClass: TJvInspectorItemClass); + procedure JvInspectorControlOnItemSelected(Sender: TObject); protected //IJvDynControlRTTIInspectorControl function ControlGetOnDisplayProperty: @@ -59,6 +62,7 @@ procedure ControlSetOnTranslatePropertyName(const Value: TJvDynControlInspectorControlOnTranslatePropertyNameEvent); public + constructor Create(AOwner: TComponent); override; procedure ControlSetDefaultProperties; procedure ControlSetCaption(const Value: string); procedure ControlSetTabOrder(Value: Integer); @@ -75,9 +79,14 @@ procedure ControlSaveEditorValues; procedure ControlSetInspectedObject(const Value: TObject); function ControlIsPropertySupported(const aPropertyName : string): Boolean; + function GetControlOnPropertyChange: + TJvDynControlInspectorControlOnPropertyChangeEvent; + procedure SetControlOnPropertyChange(const Value: + TJvDynControlInspectorControlOnPropertyChangeEvent); end; -procedure RgisterJvDynControlRTTIInspectorControl (iEngine : TJvCustomDynControlEngine); +procedure RegisterJvDynControlRTTIInspectorControl(iEngine : + TJvCustomDynControlEngine); {$IFDEF UNITVERSIONING} const @@ -101,10 +110,17 @@ //=== { TJvDynControlRTTIInspectorControl } ======================================== +constructor TJvDynControlRTTIInspectorControl.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + OldPropertyName := ''; +end; + procedure TJvDynControlRTTIInspectorControl.ControlSetDefaultProperties; begin AfterItemCreate := JvInspectorAfterItemCreate; BeforeItemCreate := JvInspectorBeforeItemCreate; + OnItemSelected := JvInspectorControlOnItemSelected; end; procedure TJvDynControlRTTIInspectorControl.ControlSetCaption(const Value: string); @@ -214,8 +230,35 @@ fOnTranslatePropertyName := Value; end; -procedure RgisterJvDynControlRTTIInspectorControl (iEngine : TJvCustomDynControlEngine); +function TJvDynControlRTTIInspectorControl.GetControlOnPropertyChange: + TJvDynControlInspectorControlOnPropertyChangeEvent; begin + Result := fControlOnPropertyChange; +end; + +procedure TJvDynControlRTTIInspectorControl.JvInspectorControlOnItemSelected( + Sender: TObject); +var + NewPropertyName: string; +begin + if Assigned (Selected) then + NewPropertyName := Selected.Name + else + NewPropertyName := ''; + if Assigned(fControlOnPropertyChange) then + fControlOnPropertyChange(OldPropertyName, NewPropertyName); + OldPropertyName := NewPropertyName; +end; + +procedure TJvDynControlRTTIInspectorControl.SetControlOnPropertyChange(const + Value: TJvDynControlInspectorControlOnPropertyChangeEvent); +begin + fControlOnPropertyChange := Value; +end; + +procedure RegisterJvDynControlRTTIInspectorControl(iEngine : + TJvCustomDynControlEngine); +begin iEngine.RegisterControlType(jctRTTIInspector, TJvDynControlRTTIInspectorControl); end; Modified: trunk/jvcl/run/JvProgramVersionCheck.pas =================================================================== --- trunk/jvcl/run/JvProgramVersionCheck.pas 2008-02-21 19:03:41 UTC (rev 11742) +++ trunk/jvcl/run/JvProgramVersionCheck.pas 2008-02-21 23:17:13 UTC (rev 11743) @@ -73,6 +73,8 @@ destructor Destroy; override; procedure Assign(Source: TPersistent); override; procedure Clear; override; + function EditIntf_GetObjectHint: string; override; + function EditIntf_GetPropertyHint(const PropertyName: string): string; override; //IJvPropertyEditorHandler = interface function EditIntf_GetVisibleObjectName: string; override; { Combination of ProgramVersion and ReleaseType } @@ -80,8 +82,9 @@ function ProgramSizeString: string; function ProgramVersionInfo: string; published + //1 Flag to define whether a password is required for the download or not property DownloadPasswordRequired: Boolean read FDownloadPasswordRequired write - FDownloadPasswordRequired default False; + FDownloadPasswordRequired default False; { List of parameters for the execution of the installer file } property LocalInstallerParams: string read FLocalInstallerParams write FLocalInstallerParams; @@ -134,15 +137,21 @@ procedure RecalculateCurrentProgramVersions; function AllowedCurrentProgramVersion(AAllowedReleaseType: TJvProgramReleaseType): TJvProgramVersionInfo; procedure Assign(Source: TPersistent); override; - //IJvPropertyEditorHandler = interface + function EditIntf_GetObjectHint: string; override; + function EditIntf_GetPropertyHint(const PropertyName: string): string; override; function EditIntf_GetVisibleObjectName: string; override; function GetVersionsDescription(const AFromVersion, AToVersion: string): string; property CurrentProgramVersion[Index: TJvProgramReleaseType]: TJvProgramVersionInfo read GetCurrentProgramVersion; published - property CurrentProductionProgramVersion: string - read GetCurrentProductionProgramVersion write FCurrentProductionVersion; - property CurrentBetaProgramVersion: string read GetCurrentBetaProgramVersion write FCurrentBetaVersion; - property CurrentAlphaProgramVersion: string read GetCurrentAlphaProgramVersion write FCurrentAlphaVersion; + //1 Auto calculated version number of the highest production version + property CurrentProductionProgramVersion: string read + GetCurrentProductionProgramVersion write FCurrentProductionVersion; + //1 Auto calculated version number of the highest beta version + property CurrentBetaProgramVersion: string read GetCurrentBetaProgramVersion + write FCurrentBetaVersion; + //1 Auto calculated version number of the highest alpha version + property CurrentAlphaProgramVersion: string read GetCurrentAlphaProgramVersion + write FCurrentAlphaVersion; end; { Base class for all location @@ -564,9 +573,6 @@ JclBase, JclFileUtils, JclShell, JvDSADialogs, JvParameterListParameter, JvResources, Windows, Messages; -resourcestring - SProgramVersionHistory = 'Program Version History'; - const SParamNameVersionButtonInfo = 'VersionButtonInfo'; SParamNameMemo = 'Memo'; @@ -719,6 +725,37 @@ FProgramReleaseType := prtProduction; end; +function TJvProgramVersionInfo.EditIntf_GetObjectHint: string; +begin + Result := RSProgramVersionInfo_ObjectHint; +end; + +function TJvProgramVersionInfo.EditIntf_GetPropertyHint(const PropertyName: + string): string; +begin + Result := ''; + if PropertyName = 'DownloadPasswordRequired' then + Result := RSProgramVersionInfo_PropertyHint_DownloadPassword + else if PropertyName = 'LocalInstallerParams' then + Result := RSProgramVersionInfo_PropertyHint_LocalInstallerParams + else if PropertyName = 'ProgramLocationPath' then + Result := RSProgramVersionInfo_PropertyHint_ProgramLocationPath + else if PropertyName = 'ProgramLocationFileName' then + Result := RSProgramVersionInfo_PropertyHint_ProgramLocationFileName + else if PropertyName = 'ProgramVersion' then + Result := RSProgramVersionInfo_PropertyHint_ProgramVersion + else if PropertyName = 'VersionDescription' then + Result := RSProgramVersionInfo_PropertyHint_VersionDescription + else if PropertyName = 'ProgramReleaseType' then + Result := RSProgramVersionInfo_PropertyHint_ProgramReleaseType + else if PropertyName = 'ProgramSize' then + Result := RSProgramVersionInfo_PropertyHint_ProgramSize + else if PropertyName = 'ProgramReleaseDate' then + Result := RSProgramVersionInfo_PropertyHint_ProgramReleaseDate + else + Result := ''; +end; + function TJvProgramVersionInfo.EditIntf_GetVisibleObjectName: string; begin Result := ProgramVersionInfo; @@ -868,9 +905,28 @@ Result := TJvProgramVersionsStringList.Create; end; +function TJvProgramVersionHistory.EditIntf_GetObjectHint: string; +begin + Result := RSProgramVersionHistory_ObjectHint; +end; + +function TJvProgramVersionHistory.EditIntf_GetPropertyHint(const PropertyName: + string): string; +begin + Result := ''; + if PropertyName = 'CurrentProductionProgramVersion' then + Result := RSProgramVersionHistory_PropertyHint_Production + else if PropertyName = 'CurrentBetaProgramVersion' then + Result := RSProgramVersionHistory_PropertyHint_beta + else if PropertyName = 'CurrentAlphaProgramVersion' then + Result := RSProgramVersionHistory_PropertyHint_alpha + else + Result := Inherited EditIntf_GetPropertyHint(PropertyName); +end; + function TJvProgramVersionHistory.EditIntf_GetVisibleObjectName: string; begin - Result := SProgramVersionHistory; + Result := RSProgramVersionHistory; end; function TJvProgramVersionHistory.GetCurrentProductionProgramVersion: string; Modified: trunk/jvcl/run/JvPropertyStore.pas =================================================================== --- trunk/jvcl/run/JvPropertyStore.pas 2008-02-21 19:03:41 UTC (rev 11742) +++ trunk/jvcl/run/JvPropertyStore.pas 2008-02-21 23:17:13 UTC (rev 11743) @@ -143,6 +143,7 @@ function EditIntf_TranslatePropertyName(const PropertyName: string): string; virtual; function EditIntf_DisplayProperty(const PropertyName: string): Boolean; virtual; + function EditIntf_GetObjectHint: string; virtual; function EditIntf_GetPropertyHint(const PropertyName: string): string; virtual; function EditIntf_IsPropertySimple(const PropertyName: string): Boolean; @@ -580,6 +581,11 @@ Result := not (IgnoreProperty(PropertyName)); end; +function TJvCustomPropertyStore.EditIntf_GetObjectHint: string; +begin + Result := ''; +end; + function TJvCustomPropertyStore.EditIntf_GetPropertyHint(const PropertyName: string): string; begin Modified: trunk/jvcl/run/JvPropertyStoreEditor.pas =================================================================== --- trunk/jvcl/run/JvPropertyStoreEditor.pas 2008-02-21 19:03:41 UTC (rev 11742) +++ trunk/jvcl/run/JvPropertyStoreEditor.pas 2008-02-21 23:17:13 UTC (rev 11743) @@ -60,6 +60,9 @@ FInspectedObjectEditorHandler: IJvPropertyEditorHandler; FInspectedObjectListEditorHandler: IJvPropertyListEditorHandler; FPropertyStore: TComponent; + InfoGroupBoxDynControl: IJvDynControl; + InfoMemoDynControlData: IJvDynControlData; + InfoPanel: TWinControl; Inspector: TWinControl; InspectorPanel: TWinControl; ListBoxControlItems: IJvDynControlItems; @@ -86,7 +89,9 @@ procedure FillTreeViewByComponent(TreeNodes: TTreeNodes; Parent: TTreeNode; aPropertyStore: TPersistent); function OnDisplayProperty(const aPropertyName : String): Boolean; + procedure OnPropertyChange(var OldPropertyName, NewPropertyName : string); function OnTranslatePropertyName(const aPropertyName : String): string; + procedure SetInformation(const iCaption, iInfo: string); public procedure GotoEditObject(EditObject: TPersistent); property InspectedObjectListEditorHandler: IJvPropertyListEditorHandler read @@ -112,19 +117,9 @@ {$IFDEF HAS_UNIT_RTLCONSTS} RTLConsts, {$ENDIF HAS_UNIT_RTLCONSTS} + JvResources, TypInfo, JvDynControlEngine; -resourcestring - RSDialogButtonOk = '&Ok'; - RSDialogButtonCancel = '&Cancel'; - RSListButtonInsert = '&Insert'; - RSListButtonCopy = '&Copy'; - RSListButtonEdit = '&Edit'; - RSListButtonDelete = '&Delete'; - RSListButtonUp = '&Up'; - RSListButtonDown = 'Do&wn'; - RSDialogCaptionEditProperties = 'Edit Properties'; - {$R *.dfm} @@ -160,6 +155,8 @@ // end; +type tAccessCustomPanel = class(tCustomPanel); + procedure TJvPropertyStoreEditorForm.CreateFormControls; var BottomPanel, BottomButtonPanel : TWinControl; Button: TButton; @@ -170,6 +167,11 @@ DynControlDblClick : IJvDynControlDblClick; ListButtonPanel: TWinControl; ListBox: TWinControl; + InfoGroupBox: TWinControl; + InfoMemoPanel: TWinControl; + InfoMemo: TWinControl; + DynControlMemo: IJvDynControlMemo; + DynControlReadOnly: IJvDynControlReadOnly; begin BottomPanel := DefaultDynControlEngine.CreatePanelControl(Self, Self, 'BottomPanel', '', alBottom); BottomPanel.Height := 34; @@ -180,13 +182,13 @@ BottomButtonPanel.Width := 166; if BottomButtonPanel is TPanel then TPanel(BottomButtonPanel).BevelOuter := bvNone; - Button := DefaultDynControlEngine.CreateButton(Self, BottomButtonPanel, 'OKButton', RSDialogButtonOk, '', OkButtonClick); + Button := DefaultDynControlEngine.CreateButton(Self, BottomButtonPanel, 'OKButton', RSPropertyStoreEditorDialogButtonOk, '', OkButtonClick); Button.Left := 4; Button.Top := 6; Button.Width := 75; Button.Height := 25; Button.ModalResult := mrOk; - Button := DefaultDynControlEngine.CreateButton(Self, BottomButtonPanel, 'CancelButton', RSDialogButtonCancel, '', CancelButtonClick); + Button := DefaultDynControlEngine.CreateButton(Self, BottomButtonPanel, 'CancelButton', RSPropertyStoreEditorDialogButtonCancel, '', CancelButtonClick); Button.Left := 85; Button.Top := 6; Button.Width := 75; @@ -194,10 +196,10 @@ Button.ModalResult := mrCancel; TreePanel := DefaultDynControlEngine.CreatePanelControl(Self, Self, 'TreePanel', '', alLeft); TreePanel.Width := 200; - if TreePanel is TPanel then + if TreePanel is TCustomPanel then begin - TPanel(TreePanel).BevelOuter := bvNone; - TPanel(TreePanel).BorderWidth := 3; + tAccessCustomPanel(TreePanel).BevelOuter := bvNone; + tAccessCustomPanel(TreePanel).BorderWidth := 3; end; TreeView := DefaultDynControlEngine.CreateTreeViewControl(Self, TreePanel, 'PropertyStoreTreeView'); Supports(TreeView, IJvDynControlTreeView, PropertyStoreTreeView); @@ -215,6 +217,29 @@ TPanel(EditPanel).BevelOuter := bvNone; TPanel(EditPanel).BorderWidth := 3; end; + InfoPanel := DefaultDynControlEngine.CreatePanelControl(Self, EditPanel, 'InfoPanel', '', alBottom); + if InfoPanel is TCustomPanel then + begin + tAccessCustomPanel(InfoPanel).BevelOuter := bvNone; +// tAccessCustomPanel(InfoPanel).BorderWidth := 3; + end; + InfoPanel.Height := 100; + InfoGroupBox := DefaultDynControlEngine.CreateGroupBoxControl(Self, InfoPanel, 'InfoGroupBox', 'Info'); + InfoGroupBox.Align := alClient; + Supports(InfoGroupBox, IJvDynControl, InfoGroupBoxDynControl); + InfoMemoPanel := DefaultDynControlEngine.CreatePanelControl(Self, InfoGroupBox, 'InfoMemoPanel', '', alClient); + if InfoMemoPanel is TCustomPanel then + begin + tAccessCustomPanel(InfoMemoPanel).BevelOuter := bvNone; + tAccessCustomPanel(InfoMemoPanel).BorderWidth := 3; + end; + InfoMemo := DefaultDynControlEngine.CreateMemoControl(Self, InfoMemoPanel, 'InfoMemo'); + InfoMemo.Align := alClient; + if Supports(InfoMemo, IJvDynControlMemo, DynControlMemo) then + DynControlMemo.ControlSetWordWrap(True); + if Supports(InfoMemo, IJvDynControlReadOnly, DynControlReadOnly) then + DynControlReadOnly.ControlSetReadOnly(True); + Supports(InfoMemo, IJvDynControlData, InfomemoDynControlData); ListPanel := DefaultDynControlEngine.CreatePanelControl(Self, EditPanel, 'ListPanel', '', alClient); if ListPanel is TPanel then TPanel(ListPanel).BevelOuter := bvNone; @@ -230,22 +255,22 @@ ListButtonPanel.Height := 25; if ListButtonPanel is TPanel then TPanel(ListButtonPanel).BevelOuter := bvNone; - Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListInsertButton', RSListButtonInsert, '', ListInsertButtonClick); + Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListInsertButton', RSPropertyStoreEditorListButtonInsert, '', ListInsertButtonClick); Button.Left := 0; Button.Width := 40; - Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListCopyButton', RSListButtonCopy, '', ListCopyButtonClick); + Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListCopyButton', RSPropertyStoreEditorListButtonCopy, '', ListCopyButtonClick); Button.Left := 40; Button.Width := 40; - Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListEditButton', RSListButtonEdit, '', ListEditButtonClick); + Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListEditButton', RSPropertyStoreEditorListButtonEdit, '', ListEditButtonClick); Button.Left := 80; Button.Width := 40; - Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListDeleteButton', RSListButtonDelete, '', ListDeleteButtonClick); + Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListDeleteButton', RSPropertyStoreEditorListButtonDelete, '', ListDeleteButtonClick); Button.Left := 120; Button.Width := 40; - Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListUpButton', RSListButtonUp, '', ListUpButtonClick); + Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListUpButton', RSPropertyStoreEditorListButtonUp, '', ListUpButtonClick); Button.Left := 165; Button.Width := 40; - Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListDownButton', RSListButtonDown, '', ListDownButtonClick); + Button := DefaultDynControlEngine.CreateButton(Self, ListButtonPanel, 'ListDownButton', RSPropertyStoreEditorListButtonDown, '', ListDownButtonClick); Button.Left := 205; Button.Width := 40; ListBox := DefaultDynControlEngine.CreateListBoxControl(Self, ListPanel, 'ListBox', Nil); @@ -255,16 +280,18 @@ if Supports(ListBox, IJvDynControlDblClick, DynControlDblClick) then DynControlDblClick.ControlSetOnDblClick(ListEditButtonClick); InspectorPanel := DefaultDynControlEngine.CreatePanelControl(Self, EditPanel, 'InspectorPanel', '', alClient); - if InspectorPanel is TPanel then - TPanel(InspectorPanel).BevelOuter := bvNone; + if InspectorPanel is TCustomPanel then + tAccessCustomPanel(InspectorPanel).BevelOuter := bvNone; Inspector := DefaultDynControlEngine.CreateRTTIInspectorControl(self, InspectorPanel, 'Inspector', OnDisplayProperty, OnTranslatePropertyName); Supports (Inspector, IJvDynControlRTTIInspectorControl, RTTIInspectorControl); + RTTIInspectorControl.ControlOnPropertyChange := OnPropertyChange; Inspector.Align := alClient; - Caption := RSDialogCaptionEditProperties; + Caption := RSPropertyStoreEditorDialogCaptionEditProperties; + SetInformation('', ''); end; procedure TJvPropertyStoreEditorForm.FillTreeView(GotoNodeObject: TPersistent = @@ -534,6 +561,14 @@ and InspectedObjectEditorHandler.EditIntf_IsPropertySimple(aPropertyName) ; end; +procedure TJvPropertyStoreEditorForm.OnPropertyChange(var OldPropertyName, + NewPropertyName : string); +begin + if Assigned(InspectedObjectEditorHandler) then + SetInformation (InspectedObjectEditorHandler.EditIntf_TranslatePropertyName(NewPropertyName), + InspectedObjectEditorHandler.EditIntf_GetPropertyHint(NewPropertyName)); +end; + procedure TJvPropertyStoreEditorForm.PropertyStoreTreeViewChange(Sender: TObject; Node: TTreeNode); begin @@ -582,6 +617,8 @@ ListPanel.visible := False; Inspector.Parent := InspectorPanel; end; + if Assigned(InspectedObjectEditorHandler) then + SetInformation (InspectedObjectEditorHandler.EditIntf_GetVisibleObjectName, InspectedObjectEditorHandler.EditIntf_GetObjectHint); end; procedure TJvPropertyStoreEditorForm.SetPropertyStore(const Value: TComponent); @@ -616,6 +653,14 @@ Result := aPropertyName; end; +procedure TJvPropertyStoreEditorForm.SetInformation(const iCaption, iInfo: + string); +begin + InfoMemoDynControlData.ControlValue := iInfo; + InfoGroupBoxDynControl.ControlSetCaption(iCaption); + InfoPanel.Visible := iInfo <> ''; +end; + {$IFDEF UNITVERSIONING} initialization RegisterUnitVersion(HInstance, UnitVersioning); Modified: trunk/jvcl/run/JvPropertyStoreEditorIntf.pas =================================================================== --- trunk/jvcl/run/JvPropertyStoreEditorIntf.pas 2008-02-21 19:03:41 UTC (rev 11742) +++ trunk/jvcl/run/JvPropertyStoreEditorIntf.pas 2008-02-21 23:17:13 UTC (rev 11743) @@ -43,6 +43,7 @@ ['{7DD4CC1F-335E-44F7-AE90-9DB630BF5B31}'] function EditIntf_GetVisibleObjectName : string; function EditIntf_TranslatePropertyName (const PropertyName : string) : string; + function EditIntf_GetObjectHint : string; function EditIntf_GetPropertyHint(const PropertyName : string) : string; function EditIntf_DisplayProperty (const PropertyName : string) : Boolean; function EditIntf_IsPropertySimple (const PropertyName : string) : Boolean; Modified: trunk/jvcl/run/JvResources.pas =================================================================== --- trunk/jvcl/run/JvResources.pas 2008-02-21 19:03:41 UTC (rev 11742) +++ trunk/jvcl/run/JvResources.pas 2008-02-21 23:17:13 UTC (rev 11743) @@ -1752,6 +1752,26 @@ 'The file download was successful.' + sLineBreak + 'Do you want to close and install?'; RsPVInfoButtonCaption = 'Info'; + RSProgramVersionInfo_PropertyHint_ProgramReleaseDate = 'Date of Release '; + RSProgramVersionInfo_PropertyHint_ProgramSize = 'Size of the installer in bytes '; + RSProgramVersionInfo_PropertyHint_ProgramReleaseType = 'Release type of the version.'#13#10+ + 'In the update dialog there are only the highest version numbers for each type visible.'#13#10+ + 'The type must be higher then AllowedReleaseType property of the TJvProgramVersionCheck component'; + RSProgramVersionInfo_PropertyHint_VersionDescription = 'This is a description field which could be shown in the update dialog via the version info button.'; + RSProgramVersionInfo_PropertyHint_ProgramVersion = 'Program version in the format <main>.<sub>.<release>.<build> This property is compared with the fileversion properties of the current application.'; + RSProgramVersionInfo_PropertyHint_ProgramLocationFileName = 'File name of the installer file '; + RSProgramVersionInfo_PropertyHint_ProgramLocationPath = 'Path where the installer of the version could be found. This could be a absolute path or a relative path to the location of the version list'; + RSProgramVersionInfo_PropertyHint_LocalInstallerParams = 'List of parameters for the execution of the installer file'; + RSProgramVersionInfo_PropertyHint_DownloadPassword = 'Flag to define whether a password is required for the download or not'; + RSProgramVersionInfo_ObjectHint = 'Class to collect all informations about a program version'#13#10+ + 'These informations will be stored in a file on the remote site'; + RSProgramVersionHistory_PropertyHint_alpha = 'Auto calculated version number of the highest alpha version'; + RSProgramVersionHistory_PropertyHint_beta = 'Auto calculated version number of the highest beta version'; + RSProgramVersionHistory_PropertyHint_Production = 'Auto calculated version number of the highest production version'; + RSProgramVersionHistory_ObjectHint = 'Class to define a list of program version informations. This class is used '+ + 'to detect which versions are available. Allso the informations will be used '+ + 'in the version info dialog'; + RSProgramVersionHistory = 'Program Version History'; //=== JvPropertyStore.pas ==================================================== resourcestring @@ -1759,6 +1779,18 @@ RsJvPropertyStoreMutexLoadPropertiesProcedureName = 'TJvCustomPropertyStore.LoadProperties:'; RsJvPropertyStoreEnterMutexTimeout = '%s: Mutex Timeout'; +//=== JvPropertyStoreEditor.pas ==================================================== +resourcestring + RSPropertyStoreEditorDialogButtonOk = '&Ok'; + RSPropertyStoreEditorDialogButtonCancel = '&Cancel'; + RSPropertyStoreEditorListButtonInsert = '&Insert'; + RSPropertyStoreEditorListButtonCopy = '&Copy'; + RSPropertyStoreEditorListButtonEdit = '&Edit'; + RSPropertyStoreEditorListButtonDelete = '&Delete'; + RSPropertyStoreEditorListButtonUp = '&Up'; + RSPropertyStoreEditorListButtonDown = 'Do&wn'; + RSPropertyStoreEditorDialogCaptionEditProperties = 'Edit Properties'; + //=== JvPrvwRender.pas ======================================================= resourcestring RsEAPrintPreviewComponentMustBeAssigne = 'A PrintPreview component must be assigned in CreatePreview!'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |