📄 ucmessages.pas
字号:
constructor Create(AOwner : TComponent);
destructor Destroy; override;
procedure Assign( Source : TPersistent); override;
published
property WindowCaption : String read FWindowCaption write FWindowCaption;
property LabelUser : String read FLabelUser write FLabelUser;
property LabelProfile : String read FLabelProfile write FLabelProfile;
property PageMenu : String read FPageMenu write FPageMenu;
property PageActions : String read FPageActions write FPageActions;
property BtUnlock : String read FBtUnlock write FBtUnlock;
property BtLock : String read FBtLock write FBtLock;
property BtSave : String read FBtGrava write FBtGrava;
property BtCancel : String read FBtCancela write FBtCancela;
end;
TTrocaSenhaFormMSG = class(TPersistent)
private
FWindowCaption, FLabelDescription, FLabelCurrentPassword, FLabelNewPassword, FLabelConfirm, FBtSave, FBtCancel : String;
protected
public
constructor Create(AOwner : TComponent);
destructor Destroy; override;
procedure Assign( Source : TPersistent); override;
published
property WindowCaption : String read FWindowCaption write FWindowCaption;
property LabelDescription : String read FLabelDescription write FLabelDescription;
property LabelCurrentPassword : String read FLabelCurrentPassword write FLabelCurrentPassword;
property LabelNewPassword : String read FLabelNewPassword write FLabelNewPassword;
property LabelConfirm : String read FLabelConfirm write FLabelConfirm;
property BtSave : String read FBtSave write FBtSave;
property BtCancel : String read FBtCancel write FBtCancel;
end;
TResetPassword = class(TPersistent)
private
FWindowCaption, FLabelPassword : String;
protected
public
constructor Create(AOwner : TComponent);
destructor Destroy; override;
procedure Assign( Source : TPersistent); override;
published
property WindowCaption : String read FWindowCaption write FWindowCaption;
property LabelPassword : String read FLabelPassword write FLabelPassword;
end;
TUserSettings = class(TPersistent)
private
FUserCommomMSG : TUserCommonMSG;
FLoginFormMSG : TLoginFormMSG;
FCadUserFormMSG : TCadUserFormMSG;
FAddUserFormMSG : TAddUserFormMSG;
FPermissFormMSG : TPermissFormMSG;
FTrocaSenhaFormMSG : TTrocaSenhaFormMSG;
FResetPassword : TResetPassword;
FProfileUserFormMSG: TProfileUserFormMSG;
FAddProfileFormMSG: TAddProfileFormMSG;
FLogControlFormMSG: TLogControlFormMSG;
FAppMessagesMSG: TAppMessagesMSG;
FUCXPSet: TUCXPSettings;
FXPStyle: Boolean;
FPosition: TPosition;
procedure SetFResetPassword(const Value: TResetPassword);
procedure SetFProfileUserFormMSG(const Value: TProfileUserFormMSG);
procedure SetFAddProfileFormMSG(const Value: TAddProfileFormMSG);
procedure SetFLogControlFormMSG(const Value: TLogControlFormMSG);
procedure SetAppMessagesMSG(const Value: TAppMessagesMSG);
protected
procedure SetFUserCommonMsg( const Value : TUserCommonMSG);
procedure SetFFormLoginMsg( const Value : TLoginFormMSG);
procedure SetFCadUserFormMSG( const Value : TCadUserFormMSG);
procedure SetFAddUserFormMSG(const Value : TAddUserFormMSG);
procedure SetFPermissFormMSG(const Value : TPermissFormMSG);
procedure SetFTrocaSenhaFormMSG(const Value : TTrocaSenhaFormMSG);
public
constructor Create(AOwner : TComponent);
destructor Destroy; override;
procedure Assign(Source : TPersistent); override;
published
property AppMessages : TAppMessagesMSG read FAppMessagesMSG write SetAppMessagesMSG;
property CommonMessages : TUserCommonMSG read FUserCommomMSG write SetFUserCommonMSg;
property Login : TLoginFormMSG read FLoginFormMSG write SetFFormLoginMsg;
property Log : TLogControlFormMSG read FLogControlFormMSG write SetFLogControlFormMSG;
property UsersForm : TCadUserFormMSG read FCadUserFormMSG write SetFCadUserFormMSG;
property AddChangeUser : TAddUserFormMSG read FAddUserFormMSG write SetFAddUserFormMSG;
property AddChangeProfile : TAddProfileFormMSG read FAddProfileFormMSG write SetFAddProfileFormMSG;
property UsersProfile : TProfileUserFormMSG read FProfileUserFormMSG write SetFProfileUserFormMSG;
property Rights : TPermissFormMSG read FPermissFormMSG write SetFPermissFormMSG;
property ChangePassword : TTrocaSenhaFormMSG read FTrocaSenhaFormMSG write SetFTrocaSenhaFormMSG;
property ResetPassword : TResetPassword read FResetPassword write SetFResetPassword;
property XPStyleSet : TUCXPSettings read FUCXPSet write FUCXPSet;
property XPStyle : Boolean read FXPStyle write FXPStyle;
property WindowsPosition : TPosition read FPosition write FPosition;
end;
implementation
{ TUserSettings }
procedure TUserSettings.Assign(Source: TPersistent);
begin
if Source is TUserSettings then
begin
Self.CommonMessages.Assign(TUserSettings(Source).CommonMessages);
end else inherited;
end;
constructor TUserSettings.Create(AOwner: TComponent);
begin
inherited Create;
FAppMessagesMSG := TAppMessagesMSG.Create(nil);
FLoginFormMSG := TLoginFormMSG.Create(nil);
FUserCommomMSG := TUserCommonMSG.Create(nil);
FCadUserFormMSG := TCadUserFormMSG.Create(nil);
FAddUserFormMSG := TAddUserFormMSG.Create(nil);
FAddProfileFormMSG := TAddProfileFormMSG.Create(nil);
FPermissFormMSG := TPermissFormMSG.Create(nil);
FProfileUserFormMSG := TProfileUserFormMSG.Create(nil);
FTrocaSenhaFormMSG := TTrocaSenhaFormMSG.Create(nil);
FResetPassword := TResetPassword.Create(nil);
FLogControlFormMSG := TLogControlFormMSG.Create(nil);
FUCXPSet := TUCXPSettings.Create(nil);
FPosition := poDesktopCenter;
end;
destructor TUserSettings.Destroy;
begin
// QmD 19/04/2005
FreeAndNil(FAppMessagesMSG);
FreeAndNil(FLoginFormMSG);
FreeAndNil(FUserCommomMSG);
FreeAndNil(FCadUserFormMSG);
FreeAndNil(FAddUserFormMSG);
FreeAndNil(FAddProfileFormMSG);
FreeAndNil(FPermissFormMSG);
FreeAndNil(FProfileUserFormMSG);
FreeAndNil(FTrocaSenhaFormMSG);
FreeAndNil(FResetPassword);
FreeAndNil(FLogControlFormMSG);
FreeAndNil(FUCXPSet);
inherited;
end;
procedure TUserSettings.SetAppMessagesMSG(const Value: TAppMessagesMSG);
begin
FAppMessagesMSG := Value;
end;
procedure TUserSettings.SetFAddProfileFormMSG(
const Value: TAddProfileFormMSG);
begin
FAddProfileFormMSG := Value;
end;
procedure TUserSettings.SetFAddUserFormMSG(const Value: TAddUserFormMSG);
begin
AddChangeUser := Value;
end;
procedure TUserSettings.SetFCadUserFormMSG(const Value: TCadUserFormMSG);
begin
UsersForm := Value;
end;
procedure TUserSettings.SetFFormLoginMsg(const Value: TLoginFormMSG);
begin
Login := Value;
end;
procedure TUserSettings.SetFLogControlFormMSG(
const Value: TLogControlFormMSG);
begin
FLogControlFormMSG := Value;
end;
procedure TUserSettings.SetFPermissFormMSG(const Value: TPermissFormMSG);
begin
Rights := Value;
end;
procedure TUserSettings.SetFProfileUserFormMSG(
const Value: TProfileUserFormMSG);
begin
FProfileUserFormMSG := Value;
end;
procedure TUserSettings.SetFResetPassword(const Value: TResetPassword);
begin
FResetPassword := Value;
end;
procedure TUserSettings.SetFTrocaSenhaFormMSG(
const Value: TTrocaSenhaFormMSG);
begin
ChangePassword := Value;
end;
procedure TUserSettings.SetFUserCommonMsg(const value: TUserCommonMSG);
begin
CommonMessages := Value;
end;
{ TUserCommonMSG }
procedure TUserCommonMSG.Assign(Source: TPersistent);
begin
if Source is TUserCommonMSG then begin
Self.BlankPassword := TUserCommonMSG(Source).BlankPassword;
Self.PasswordChanged := TUserCommonMSG(Source).PasswordChanged;
Self.InitialMessage := TUserCommonMSG(Source).InitialMessage;
Self.InvalidLogin := TUserCommonMSG(Source).InvalidLogin;
Self.MaxLoginAttemptsError := TUserCommonMSG(Source).MaxLoginAttemptsError;
Self.ChangePasswordError := TUserCommonMSG(Source).ChangePasswordError;
end else inherited;
end;
constructor TUserCommonMSG.Create(Aowner: TComponent);
begin
inherited Create;
ChangePasswordError := TChangePassError.Create(nil);
FFirstMSG := TStringList.Create;
end;
destructor TUserCommonMSG.Destroy;
begin
FreeAndNil(FChangePasswordError);
FreeAndNil(FFirstMSG);
inherited;
end;
procedure TUserCommonMSG.SetFErroTrocaSenha(const Value: TChangePassError);
begin
FChangePasswordError := Value;
end;
procedure TUserCommonMSG.SetFFirstMSG(const Value: TStrings);
begin
FFirstMSG.Assign(Value);
end;
{ TLoginFormMSG }
procedure TLoginFormMSG.Assign(Source: TPersistent);
begin
if Source is TLoginFormMSG then begin
with Source as TLoginFormMSG do begin
Self.WindowCaption := WindowCaption;
Self.LabelUser := LabelUser;
Self.LabelPassword := LabelPassword;
Self.BtOk := BtOK;
Self.BtCancel := BtCancel;
end;
end else inherited;
end;
constructor TLoginFormMSG.Create(AOwner: TComponent);
begin
inherited Create;
FTopImage := TPicture.Create;
FLeftImage := TPicture.Create;
FBottomImage := TPicture.Create;
end;
destructor TLoginFormMSG.Destroy;
begin
FreeAndNil(FTopImage);
FreeAndNil(FLeftImage);
FreeAndNil(FBottomImage);
inherited;
end;
procedure TLoginFormMSG.SetFBottomImage(const Value: TPicture);
begin
FBottomImage.Assign(Value);
end;
procedure TLoginFormMSG.SetFLeftImage(const Value: TPicture);
begin
FLeftImage.Assign(Value);
end;
procedure TLoginFormMSG.SetFTopImage(const Value: TPicture);
begin
FTopImage.Assign(Value);
end;
{ TCadUserFormMSG }
procedure TCadUserFormMSG.Assign(Source: TPersistent);
begin
if Source is TCadUserFormMSG then begin
with Source as TCadUserFormMSG do begin
Self.WindowCaption := WindowCaption;
Self.LabelDescription := LabelDescription;
Self.ColName := ColName;
Self.ColLogin := ColLogin;
Self.ColEmail := ColEmail;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -