| 57 |
procedure OnGestureMove(Sender: TObject); |
procedure OnGestureMove(Sender: TObject); |
| 58 |
procedure OnGestureEnd(Sender: TObject); |
procedure OnGestureEnd(Sender: TObject); |
| 59 |
procedure GestureCheckBoxClick(Sender: TObject); |
procedure GestureCheckBoxClick(Sender: TObject); |
| 60 |
|
procedure GestureEditChange(Sender: TObject); |
| 61 |
private |
private |
| 62 |
{ Private 宣言 } |
{ Private 宣言 } |
| 63 |
public |
public |
| 71 |
implementation |
implementation |
| 72 |
|
|
| 73 |
uses Giko, Gesture; |
uses Giko, Gesture; |
| 74 |
|
const |
| 75 |
|
GUESTURE_NOTHING = 'なし'; |
| 76 |
|
|
| 77 |
{$R *.dfm} |
{$R *.dfm} |
| 78 |
|
|
| 169 |
if TObject(Item.Data) is TKeySettingItem then begin |
if TObject(Item.Data) is TKeySettingItem then begin |
| 170 |
KeyItem := TKeySettingItem(Item.Data); |
KeyItem := TKeySettingItem(Item.Data); |
| 171 |
HotKey.HotKey := KeyItem.ShortCut; |
HotKey.HotKey := KeyItem.ShortCut; |
| 172 |
|
GestureEdit.Text := KeyItem.Gesture; |
| 173 |
end; |
end; |
| 174 |
end; |
end; |
| 175 |
|
|
| 296 |
if ActiveListView.Selected = nil then Exit; |
if ActiveListView.Selected = nil then Exit; |
| 297 |
if (GetKeyState( VK_SHIFT ) and $80000000) <> 0 then begin |
if (GetKeyState( VK_SHIFT ) and $80000000) <> 0 then begin |
| 298 |
GestureEdit.Text := ''; |
GestureEdit.Text := ''; |
| 299 |
|
ActiveListView.Selected.SubItems[2] := ''; |
| 300 |
Exit; |
Exit; |
| 301 |
end; |
end; |
| 302 |
|
|
| 307 |
Item := ActiveListView.Items[i]; |
Item := ActiveListView.Items[i]; |
| 308 |
if TObject(Item.Data) is TKeySettingItem then begin |
if TObject(Item.Data) is TKeySettingItem then begin |
| 309 |
KeyItem := TKeySettingItem(Item.Data); |
KeyItem := TKeySettingItem(Item.Data); |
| 310 |
if KeyItem.Gesture = GestureEdit.Text then begin |
if (GestureEdit.Text <> '') |
| 311 |
|
and (KeyItem.Gesture = GestureEdit.Text) then begin |
| 312 |
MsgBox(Handle, ERR_MSG, ERR_TITLE, MB_OK or MB_ICONSTOP); |
MsgBox(Handle, ERR_MSG, ERR_TITLE, MB_OK or MB_ICONSTOP); |
| 313 |
HotKey.SetFocus; |
HotKey.SetFocus; |
| 314 |
Exit; |
Exit; |
| 319 |
if TObject(ActiveListView.Selected.Data) is TKeySettingItem then begin |
if TObject(ActiveListView.Selected.Data) is TKeySettingItem then begin |
| 320 |
KeyItem := TKeySettingItem(ActiveListView.Selected.Data); |
KeyItem := TKeySettingItem(ActiveListView.Selected.Data); |
| 321 |
KeyItem.Gesture := GestureEdit.Text; |
KeyItem.Gesture := GestureEdit.Text; |
| 322 |
ActiveListView.Selected.SubItems[2] := GestureEdit.Text; |
if GestureEdit.Text = GUESTURE_NOTHING then |
| 323 |
|
ActiveListView.Selected.SubItems[2] := '' |
| 324 |
|
else |
| 325 |
|
ActiveListView.Selected.SubItems[2] := GestureEdit.Text; |
| 326 |
end; |
end; |
| 327 |
end; |
end; |
| 328 |
|
|
| 347 |
GestureSetButton.Enabled := GestureCheckBox.Checked; |
GestureSetButton.Enabled := GestureCheckBox.Checked; |
| 348 |
end; |
end; |
| 349 |
|
|
| 350 |
|
procedure TKeySettingForm.GestureEditChange(Sender: TObject); |
| 351 |
|
begin |
| 352 |
|
|
| 353 |
|
if GestureEdit.Text = '' then |
| 354 |
|
GestureEdit.Text := GUESTURE_NOTHING; |
| 355 |
|
|
| 356 |
|
end; |
| 357 |
|
|
| 358 |
end. |
end. |