unit SecureApp; interface uses Tocsg.Obj, System.SysUtils, System.Classes, System.Generics.Collections; type TSecureApp = class(TTgObject) private sName_, sType_, sStatus_, sPath_, sTimeStamp_: String; bIsState_: Boolean; public Constructor Create; overload; Constructor Create(sName, sType, sStatus, sPath, sTimestamp: String; bState: Boolean); overload; Constructor Create(aApp: TSecureApp); overload; procedure SetValue(sName, sType, sStatus, sPath, sTimestamp: String; bState: Boolean); property Name: String read sName_; property AppType: String read sType_; property Status: String read sStatus_; property Path: String read sPath_; property Timestamp: String read sTimeStamp_; property IsState: Boolean read bIsState_; end; TSecureAppList = class(TList) protected procedure Notify(const Item: TSecureApp; Action: TCollectionNotification); override; end; implementation { TSecureApp } Constructor TSecureApp.Create; begin Inherited Create; sName_ := ''; sType_ := ''; sStatus_ := ''; sPath_ := ''; sTimeStamp_ := ''; bIsState_ := false; end; Constructor TSecureApp.Create(sName, sType, sStatus, sPath, sTimestamp: String; bState: Boolean); begin Create; SetValue(sName, sType, sStatus, sPath, sTimestamp, bState); end; Constructor TSecureApp.Create(aApp: TSecureApp); begin Create; SetValue(aApp.Name, aApp.AppType, aApp.Status, aApp.Path, aApp.Timestamp, aApp.IsState); end; procedure TSecureApp.SetValue(sName, sType, sStatus, sPath, sTimestamp: String; bState: Boolean); begin // 번역리소스에 추가 하면 안됨. 변환 안되서 백신, 방화벽 정보가 두개로 보임 22_0811 16:45:31 kku sName_ := Trim(StringReplace(sName, '바이러스 백신', '', [rfReplaceAll])); sName_ := Trim(StringReplace(sName_, '방화벽', 'Firewall', [rfReplaceAll])); sType_ := sType; sStatus_ := sStatus; sPath_ := sPath; sTimeStamp_ := sTimestamp; bIsState_ := bState; end; { TSecureAppList } procedure TSecureAppList.Notify(const Item: TSecureApp; Action: TCollectionNotification); begin if Action = cnRemoved then Item.Free; end; end.