unit AppCentreConfig; interface uses BaseConfig, InterfaceConfig, TypInfo; type TAppCentreConfig = class(TBaseConfig, IAppCentreConfig) private public function GetAuthHost: string; function GetBSLoginout: Boolean; function GetEmbeddedClientHost: string; function GetEnable: Boolean; function GetLxtAppKey: string; function GetLxtAppSecret: string; function GetShowType: TAppCentreShowType; function GetProjectType: TAppCentreProjectType; constructor Create(); override; property LxtAppKey: string read GetLxtAppKey; property LxtAppSecret: string read GetLxtAppSecret; property AuthHost: string read GetAuthHost; property EmbeddedClientHost: string read GetEmbeddedClientHost; property BSLoginout: Boolean read GetBSLoginout; property Enable: Boolean read GetEnable; property ShowType: TAppCentreShowType read GetShowType; property ProjectType: TAppCentreProjectType read GetProjectType; end; implementation { TAppCentreConfig } constructor TAppCentreConfig.Create; begin ConfigType := ctPublic; FileName := 'appCentre.json'; inherited; end; function TAppCentreConfig.GetAuthHost: string; begin Result := Data.S['authHost']; end; function TAppCentreConfig.GetBSLoginout: Boolean; begin Result := Data.B['bsLoginout']; end; function TAppCentreConfig.GetEmbeddedClientHost: string; begin Result := Data.S['embeddedClientHost']; end; function TAppCentreConfig.GetEnable: Boolean; begin Result := Data.B['enable']; end; function TAppCentreConfig.GetLxtAppKey: string; begin Result := Data.S['appkey']; end; function TAppCentreConfig.GetLxtAppSecret: string; begin Result := Data.S['secret']; end; function TAppCentreConfig.GetProjectType: TAppCentreProjectType; begin if Data.S['projectType'] <> '' then Result := TAppCentreProjectType(GetEnumValue(TypeInfo(TAppCentreProjectType), Data.S['projectType'])) else Result := ptNormal; end; function TAppCentreConfig.GetShowType: TAppCentreShowType; begin if Data.S['showType'] <> '' then Result := TAppCentreShowType(GetEnumValue(TypeInfo(TAppCentreShowType), Data.S['showType'])) else Result := stForm; end; end.