Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/KeySetting.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by yoffy, Mon Oct 11 15:59:17 2004 UTC revision 1.5 by yoffy, Wed Oct 13 23:28:32 2004 UTC
# Line 57  type Line 57  type
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
# Line 70  type Line 71  type
71  implementation  implementation
72    
73  uses Giko, Gesture;  uses Giko, Gesture;
74    const
75            GUESTURE_NOTHING        = 'なし';
76    
77  {$R *.dfm}  {$R *.dfm}
78    
# Line 166  begin Line 169  begin
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    
# Line 292  begin Line 296  begin
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    
# Line 302  begin Line 307  begin
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;
# Line 313  begin Line 319  begin
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    
# Line 338  begin Line 347  begin
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.

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26