?? wwintl.pas
字號:
property MatchAnyLabel: string read FMatchAnyLabel write FMatchAnyLabel;
property FieldsLabel: string read FFieldsLabel write FFieldsLabel;
property BtnFirst: string read FButtonFirst write FButtonFirst;
property BtnNext: string read FButtonNext write FButtonNext;
property BtnCancel: string read FButtonCancel write FButtonCancel;
property BtnClose: string read FButtonClose write FButtonClose;
property FieldValueHint: string read FFieldValueHint write FFieldValueHint;
property CaseSensitiveHint: string read FCaseSensitiveHint write FCaseSensitiveHint;
property MatchExactHint: string read FMatchExactHint write FMatchExactHint;
property MatchStartHint: string read FMatchStartHint write FMatchStartHint;
property MatchAnyHint: string read FMatchAnyHint write FMatchAnyHint;
property BtnFirstHint: string read FButtonFirstHint write FButtonFirstHint;
property BtnNextHint: string read FButtonNextHint write FButtonNextHint;
property FieldNameHint: string read FFieldNameHint write FFieldNameHint;
end;
TwwDBNavigatorIntlHints = class(TPersistent)
private
FFirstHint: string;
FPriorHint: string;
FNextHint: string;
FLastHint: string;
FInsertHint: string;
FDeleteHint: string;
FEditHint: string;
FPostHint: string;
FCancelHint: string;
FRefreshHint: string;
FPriorPageHint: string;
FNextPageHint: string;
FSaveBookmarkHint: string;
FRestoreBookmarkHint: string;
FRecordViewDialogHint: string;
FLocateDialogHint: string;
FFilterDialogHint: string;
FSearchDialogHint: string;
public
constructor Create;
published
property FirstHint: string read FFirstHint write FFirstHint;
property PriorHint: string read FPriorHint write FPriorHint;
property NextHint: string read FNextHint write FNextHint;
property LastHint: string read FLastHint write FLastHint;
property InsertHint: string read FInsertHint write FInsertHint;
property DeleteHint: string read FDeleteHint write FDeleteHint;
property EditHint: string read FEditHint write FEditHint;
property PostHint: string read FPostHint write FPostHint;
property CancelHint: string read FCancelHint write FCancelHint;
property RefreshHint: string read FRefreshHint write FRefreshHint;
property PriorPageHint: string read FPriorPageHint write FPriorPageHint;
property NextPageHint: string read FNextPageHint write FNextPageHint;
property SaveBookmarkHint: string read FSaveBookmarkHint write FSaveBookmarkHint;
property RestoreBookmarkHint: string read FRestoreBookmarkHint write FRestoreBookmarkHint;
property RecordViewDialogHint: string read FRecordViewDialogHint write FRecordViewDialogHint;
property LocateDialogHint: string read FLocateDialogHint write FLocateDialogHint;
property FilterDialogHint: string read FFilterDialogHint write FFilterDialogHint;
property SearchDialogHint: string read FSearchDialogHint write FSearchDialogHint;
end;
TwwADOIntl = class(TPersistent)
private
FUseLocateWhenFindingValue: boolean;
published
property UseLocateWhenFindingValue: boolean read
FUseLocateWhenFindingValue write FUseLocateWhenFindingValue default True;
end;
TwwDBNavigatorIntl = class(TPersistent)
private
FConfirmDeleteMessage: string;
FHints: TwwDBNavigatorIntlHints;
public
constructor Create;
destructor Destroy; override;
published
property ConfirmDeleteMessage: string read FConfirmDeleteMessage write FConfirmDeleteMessage;
property Hints: TwwDBNavigatorIntlHints read FHints write FHints;
end;
TwwCheckBoxInGridStyle = (cbStyleAuto, cbStyleCheckmark, cbStyleXmark,
cbStyleCheckmarkFlat);
TwwGridPaintStyle = (gpsBitmapCanvas, gpsDynamicDeviceContext);
TwwIntl = class(TComponent)
private
FADO: TwwADOIntl;
FNavigator: TwwDBNavigatorIntl;
FSearchDialog: TwwSearchDialogIntl;
FLocateDialog: TwwLocateDialogIntl;
FMonthCalendar: TwwMonthCalendarIntl;
FOKCancelBitmapped: boolean;
FDialogFontStyle: TFontStyles;
FBtnOKCaption: string;
FBtnCancelCaption: string;
FConnected: Boolean;
FUserMessages: TwwUserMessagesIntl;
FFilterDialog: TwwFilterDialogIntl;
FRichEdit: TwwDBRichEditIntl;
FIPVersion: string;
FIniFileName: string;
FRegistrationNo: string;
FFastSQLCancelRange: boolean;
FCheckBoxInGridStyle: TwwCheckBoxInGridStyle;
FGridPaintStyle : TwwGridPaintStyle;
FUseLocateMethodForSearch: boolean;
// FUseLocateMethodForFind: boolean;
FDefaultEpochYear: Integer;
FFilterMemoSize: integer;
FOnValidationErrorUsingMask: TwwPictureValidationError;
Procedure SetConnected(val: boolean);
Procedure SetIPVersion(val: string);
{$ifdef NEWIPSETUP}
Procedure SetRegistrationNo(val: string);
{$endif}
Procedure SetCheckboxInGridStyle(val: TwwCheckboxInGridStyle);
Procedure SetGridPaintStyle(val: TwwGridPaintStyle);
protected
Procedure Loaded; override;
Procedure Connect;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure ValidationErrorUsingMask(Component: TComponent; Field: TField); virtual;
property FastSQLCancelRange: boolean read FFastSQLCancelRange write FFastSQLCancelRange;
{$ifndef wwDelphi3Up}
property UseLocateMethodForSearch: boolean read FUseLocateMethodForSearch write FUseLocateMethodForSearch default True;
{$ENDIF}
published
property ADO: TwwADOIntl read FADO write FADO;
property Navigator: TwwDBNavigatorIntl read FNavigator write FNavigator;
property SearchDialog: TwwSearchDialogIntl read FSearchDialog write FSearchDialog;
property LocateDialog: TwwLocateDialogIntl read FLocateDialog write FLocateDialog;
property MonthCalendar: TwwMonthCalendarIntl read FMonthCalendar write FMonthCalendar;
property FilterDialog: TwwFilterDialogIntl read FFilterDialog write FFilterDialog;
property RichEdit: TwwDBRichEditIntl read FRichEdit write FRichEdit;
property UserMessages: TwwUserMessagesIntl read FUserMessages write FUserMessages;
property OKCancelBitmapped: boolean read FOKCancelBitmapped write FOKCancelBitmapped;
property BtnOKCaption: string read FBtnOKCaption write FBtnOKCaption;
property BtnCancelCaption: string read FBtnCancelCaption write FBtnCancelCaption;
property CheckBoxInGridStyle: TwwCheckBoxInGridStyle read FCheckBoxInGridStyle write SetCheckboxInGridStyle;
property GridPaintStyle: TwwGridPaintStyle read FGridPaintStyle write SetGridPaintStyle default gpsDynamicDeviceContext;
property VersionInfoPower: string read FIPVersion write SetIPVersion;
property FilterMemoSize: integer read FFilterMemoSize write FFilterMemoSize;
property IniFileName: string read FIniFileName write FIniFileName;
{$ifdef wwDelphi3Up}
property UseLocateMethodForSearch: boolean read FUseLocateMethodForSearch write FUseLocateMethodForSearch default True;
{$ENDIF}
property DialogFontStyle: TFontStyles read FDialogFontStyle write FDialogFontStyle;
{$IFDEF WIN32}
property DefaultEpochYear: integer read FDefaultEpochYear write FDefaultEpochYear default 1950;
{$ENDIF}
{$ifdef NEWIPSETUP}
property RegistrationNo: string read FRegistrationNo write SetRegistrationNo;
{$endif}
property OnValidationErrorUsingMask: TwwPictureValidationError read FOnValidationErrorUsingMask write FOnValidationErrorUsingMask;
property Connected: boolean read FConnected write SetConnected;
end;
Function wwCreateCommonButton(AOwner: TForm;
ButtonKind: TBitBtnKind): TComponent;
procedure Register;
var wwInternational: TwwIntl;
implementation
uses StdCtrls;
constructor TwwIntl.Create(AOwner: TComponent);
{$ifdef NEWIPSETUP}
var ipReg: TRegIniFile;
{$endif}
begin
inherited Create(AOwner);
FIPVersion:= '4000.T.C';
{$ifdef NEWIPSETUP}
if csDesigning in ComponentState then begin
ipreg := TRegIniFile.create('');
FRegistrationNo:=
ipreg.ReadString('\Software\Woll2Woll\InfoPower', 'Reg. No.', '');
ipreg.free;
end;
{$endif}
FFastSQLCancelRange:= True;
FUseLocateMethodForSearch:= True;
FDefaultEpochYear := 1950;
FFilterMemoSize:= $10000; { 64k }
FFilterDialog:= TwwFilterDialogIntl.create;
with FFilterDialog do
begin
FBtnViewSummary := 'View Su&mmary';
FBtnViewSummaryHint := 'View summary of current search criteria';
FBtnNewSearch := '&New Search';
FBtnNewSearchHint := 'Start a new search';
FFieldOrderLabel := 'Field Order';
FFieldOrderHint := 'Sort field list alphabetically or in their natural logical order';
FAlphabeticLabel := 'Alpha&betic';
FLogicalLabel := '&Logical';
FAllFieldsLabel := '&All';
FSearchedFieldsLabel := '&Searched';
FStartingRangeLabel := '&Starting Range';
FEndingRangeLabel := 'En&ding Range';
FBtnClearMin := '&Clear';
FBtnClearMax := 'Cl&ear';
FBtnClearFilterValue := '&Clear';
FStartingRangeHint := 'Enter starting range for field';
FEndingRangeHint := 'Enter ending range for field';
FBtnClearMinHint := 'Clear starting range for field';
FBtnClearMaxHint := 'Clear ending range for field';
FBtnClearFilterValueHint:= 'Clear the current field''s search value';
FByValueLabel := 'By &Value';
FByRangeLabel := 'By &Range';
FFieldValueLabel := 'Field &Value';
FFieldValueHint:= 'Enter field''s search value';
FSearchTypeLabel := 'Search Type';
FSearchTypeHint:= 'Specify how the Field Value should be compared';
FMatchExactLabel := '&Exact Match';
FMatchStartLabel := '&Partial Match at Beginning';
FMatchAnyLabel := 'Partial Match Any&where';
FCaseSensitiveLabel := 'Case Sensi&tive';
FCaseSensitiveHint := 'Searching is case-sensitive';
FNonMatchingLabel := 'N&on-matching records';
FNonMatchingHint := 'Show records that do not match the field value criteria';
FSummaryFieldLabel:= 'Field';
FSummarySearchLabel:= 'Search Type';
FSummaryValueLabel := 'Value';
{$ifdef wwdelphi4up}
FSummaryCaption:= ''; { Use default }
{$endif}
FFieldsLabel:= '&Fields';
FValueRangeTabHint := 'Search fields by value or by range';
FAllSearchedTabHint := 'Show all fields or only currently searched fields';
FViewSummaryNotText := 'NOT';
end;
FRichEdit := TwwDBRichEditIntl.create;
with FRichEdit do
begin
FFontNameComboHint := 'Font | Changes the font of the selection';
FFontSizeComboHint := 'Font Size | Changes the font size of the selection';
FNewButtonHint := 'New | Creates a new document';
FLoadButtonHint := 'Load | Load from file';
FSaveAsButtonHint := 'Save As | Save to file';
FPrintButtonHint := 'Print | Prints the active document';
FFindButtonHint := 'Find | Finds the specified text';
FCutButtonHint := 'Cut | Cuts the selection and puts it on the Clipboard';
FCopyButtonHint := 'Copy | Copies the selection and puts it on the Clipboard';
FUndoButtonHint := 'Undo | Reverses the last action';
{$ifdef wwDelphi4Up}
FRedoButtonHint := 'Redo | Reverses the last undo action';
{$endif}
FPasteButtonHint := 'Paste | Inserts Clipboard contents';
FBoldButtonHint := 'Bold | Makes the selection bold (toggle)';
FColorButtonHint := 'Color | Formats the selection with a color';
FUnderlineButtonHint := 'Underline | Formats the selection with a continuous underline (toggle)';
FItalicButtonHint := 'Italic | Makes the selection italic (toggle)';
FLeftButtonHint := 'Align Left | Left-justifies paragraph (toggle)';
FCenterButtonHint := 'Center | Center-justifies paragraph (toggle)';
FRightButtonHint := 'Align Right | Right-justifies paragraph (toggle)';
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -