OSDN Git Service

タブ文字チェック
[winbottle/winbottle.git] / bottleclient / MinMaxEditor.pas
1 unit MinMaxEditor;
2
3 interface
4
5 uses
6   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7   Dialogs, StdCtrls, Spin;
8
9 type
10   TfrmMinMaxEditor = class(TForm)
11     btnCancel: TButton;
12     btnOk: TButton;
13     spnMin: TSpinEdit;
14     spnMax: TSpinEdit;
15     Label1: TLabel;
16     Label2: TLabel;
17     procedure btnOkClick(Sender: TObject);
18     procedure btnCancelClick(Sender: TObject);
19   private
20     { Private \90é\8c¾ }
21   public
22     { Public \90é\8c¾ }
23     function Execute: boolean;
24   end;
25
26 var
27   frmMinMaxEditor: TfrmMinMaxEditor;
28
29 implementation
30
31 {$R *.dfm}
32
33 procedure TfrmMinMaxEditor.btnOkClick(Sender: TObject);
34 begin
35   if spnMin.Value > spnMax.Value then begin
36     ShowMessage('\8dÅ\8f¬\92l\82Ì\90Ý\92è\82ª\8dÅ\91å\92l\82æ\82è\91å\82«\82­\82È\82Á\82Ä\82¢\82Ü\82·');
37     Exit;
38   end;
39   ModalResult := mrOk;
40 end;
41
42 procedure TfrmMinMaxEditor.btnCancelClick(Sender: TObject);
43 begin
44   ModalResult := mrCancel;
45 end;
46
47 function TfrmMinMaxEditor.Execute: boolean;
48 begin
49   Result := ShowModal = mrOk;
50 end;
51
52 end.