📄 u_crc_clicktotalk.pas
字号:
(*
----------------------------------------------
u_crc_main.pas - ConfRoomClient / main form
Voice Communicator components version 2.5
----------------------------------------------
This source code cannot be used without
proper license granted to you as a private
person or an entity by the Lake of Soft, Ltd
Visit http://lakeofsoft.com/ for more information.
Copyright (c) 2001, 2007 Lake of Soft, Ltd
All rights reserved
----------------------------------------------
created by:
Lake, 08 Jul 2003
modified by:
Lake, Jul, Dec 2003
Lake, Oct 2005
----------------------------------------------
*)
{$I unaDef.inc }
unit
u_crc_clickToTalk;
interface
uses
Windows, unaTypes, unaClasses,
Forms, StdCtrls, ComCtrls, Controls, ExtCtrls, Classes;
type
Tc_form_clickToTalk = class(TForm)
c_checkBox_enable: TCheckBox;
Bevel1: TBevel;
Button1: TButton;
c_hotKey_audio: THotKey;
Bevel2: TBevel;
Label1: TLabel;
c_checkBox_ctrl: TCheckBox;
c_checkBox_shift: TCheckBox;
c_checkBox_alt: TCheckBox;
c_radioButton_am_htt: TRadioButton;
c_radioButton_am_toggle: TRadioButton;
Label3: TLabel;
Button2: TButton;
procedure c_hotKey_audioChange(Sender: TObject);
procedure c_checkBox_enableClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function changeConfig(config: unaIniFile): bool;
end;
var
c_form_clickToTalk: Tc_form_clickToTalk;
implementation
{$R *.dfm}
uses
unaUtils;
// -- --
procedure Tc_form_clickToTalk.c_hotKey_audioChange(Sender: TObject);
begin
//
end;
// -- --
procedure Tc_form_clickToTalk.c_checkBox_enableClick(Sender: TObject);
begin
//
c_hotKey_audio.enabled := c_checkBox_enable.checked;
c_radioButton_am_htt.enabled := c_checkBox_enable.checked;
c_radioButton_am_toggle.enabled := c_checkBox_enable.checked;
end;
// -- --
function Tc_form_clickToTalk.changeConfig(config: unaIniFile): bool;
begin
c_checkBox_enable.checked := config.get('cct.enabled', false);
c_hotKey_audio.hotKey := config.get('cct.hotkey', int(c_hotKey_audio.hotKey));
c_radioButton_am_htt.checked := (0 = config.get('cct.mode', int(0)));
c_radioButton_am_toggle.checked := (1 = config.get('cct.mode', int(0)));
//
c_checkBox_enableClick(c_checkBox_enable);
//
{$IFDEF DEBUG }
c_checkBox_shift.checked := (0 <> ($00002000 and c_hotKey_audio.hotKey));
c_checkBox_ctrl.checked := (0 <> ($00004000 and c_hotKey_audio.hotKey));
c_checkBox_alt.checked := (0 <> ($00008000 and c_hotKey_audio.hotKey));
//
caption := adjust(int2str(c_hotKey_audio.hotKey, 16), 8, '0');
{$ENDIF }
//
result := (mrOK = showModal());
//
if (result) then begin
//
config.setValue('cct.enabled', c_checkBox_enable.checked);
config.setValue('cct.hotkey', int(c_hotKey_audio.hotKey));
//
if (c_radioButton_am_htt.checked) then
config.setValue('cct.mode', int(0));
//
if (c_radioButton_am_toggle.checked) then
config.setValue('cct.mode', int(1));
//
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -