| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- unit HotKeyConfig;
- interface
- uses
- BaseConfig, InterfaceConfig;
- type
- THotkeyConfig = class(TBaseConfig, IHotkeyConfig)
- private
- protected
- procedure New; override;
- public
- constructor Create(); override;
- function GetCopyScreen: string;
- function GetReadMessage: string;
- function GetSendMessage: string;
- procedure SetCopyScreen(const Value: string);
- procedure SetReadMessage(const Value: string);
- procedure SetSendMessage(const Value: string);
- property ReadMessage: string read GetReadMessage write SetReadMessage;
- property CopyScreen: string read GetCopyScreen write SetCopyScreen;
- property SendMessage: string read GetSendMessage write SetSendMessage;
- end;
- implementation
- { THotkeyConfig }
- constructor THotkeyConfig.Create;
- begin
- ConfigType := ctUser;
- FileName := 'hotkey.json';
- inherited;
- end;
- function THotkeyConfig.GetCopyScreen: string;
- begin
- Result := Data.S['copyScreen']
- end;
- function THotkeyConfig.GetReadMessage: string;
- begin
- Result := Data.S['readMessage'];
- end;
- function THotkeyConfig.GetSendMessage: string;
- begin
- Result := Data.S['sendMessage'];
- end;
- procedure THotkeyConfig.New;
- begin
- inherited;
- Data.S['readMessage'] := 'CTRL+ALT+R';
- Data.S['copyScreen'] := 'CTRL+ALT+C';
- Data.S['sendMessage'] := 'SHIFT+ENTER';
- end;
- procedure THotkeyConfig.SetCopyScreen(const Value: string);
- begin
- Data.S['copyScreen'] := Value;
- end;
- procedure THotkeyConfig.SetReadMessage(const Value: string);
- begin
- Data.S['readMessage'] := Value;
- end;
- procedure THotkeyConfig.SetSendMessage(const Value: string);
- begin
- Data.S['sendMessage'] := Value;
- end;
- end.
|