| 1 |
unit optiondg; |
| 2 |
|
| 3 |
{$IFDEF FPC} |
| 4 |
{$MODE DELPHI}{$H+} |
| 5 |
{$ENDIF} |
| 6 |
|
| 7 |
(***************************************) |
| 8 |
(* Copyright (C) 2003, SHIRAISHI Kazuo *) |
| 9 |
(***************************************) |
| 10 |
|
| 11 |
|
| 12 |
interface |
| 13 |
|
| 14 |
uses Types, Classes, Graphics, Forms, Controls, Buttons, |
| 15 |
StdCtrls, ExtCtrls, CheckLst, LResources; |
| 16 |
|
| 17 |
type |
| 18 |
TOptionDlg = class(TForm) |
| 19 |
RadioGroup1: TRadioGroup; |
| 20 |
OKBtn: TBitBtn; |
| 21 |
CancelBtn: TBitBtn; |
| 22 |
HelpBtn: TBitBtn; |
| 23 |
Label1: TLabel; |
| 24 |
CheckListBox1: TCheckListBox; |
| 25 |
CheckBox1: TCheckBox; |
| 26 |
procedure RadioGroup1Click(Sender: TObject); |
| 27 |
procedure HelpBtnClick(Sender: TObject); |
| 28 |
procedure FormShow(Sender: TObject); |
| 29 |
private |
| 30 |
{ Private 宣言 } |
| 31 |
public |
| 32 |
{ Public 宣言 } |
| 33 |
end; |
| 34 |
|
| 35 |
var OptionDlg:TOptionDlg; |
| 36 |
|
| 37 |
procedure SetOption; |
| 38 |
|
| 39 |
|
| 40 |
implementation |
| 41 |
uses Dialogs, |
| 42 |
MainFrm,base,struct,toolfrm; |
| 43 |
{$R *.lfm} |
| 44 |
|
| 45 |
|
| 46 |
procedure SetOption; |
| 47 |
begin |
| 48 |
with OptionDlg do |
| 49 |
begin |
| 50 |
RadioGroup1.TabOrder:=0; |
| 51 |
RadioGroup1.ItemIndex:=byte(InitialPrecisionMode0); |
| 52 |
CheckListBox1.checked[0]:=UseTranscendentalFunction; |
| 53 |
CheckBox1.checked:=signiwidthMore; |
| 54 |
|
| 55 |
if ShowModal=mrOK then |
| 56 |
begin |
| 57 |
InitialPrecisionMode0:=tpPrecision(RadioGroup1.ItemIndex); |
| 58 |
UseTranscendentalFunction:=CheckListBox1.checked[0]; |
| 59 |
signiwidthMore:=CheckBox1.checked; |
| 60 |
end; |
| 61 |
end; |
| 62 |
ToolBox.refresh; |
| 63 |
end; |
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
procedure TOptionDlg.RadioGroup1Click(Sender: TObject); |
| 69 |
begin |
| 70 |
CheckListBox1.visible:=(RadioGroup1.ItemIndex in [1,4]); |
| 71 |
CheckBox1.visible:=(RadioGroup1.ItemIndex in [0,2,3]); |
| 72 |
end; |
| 73 |
|
| 74 |
procedure TOptionDlg.HelpBtnClick(Sender: TObject); |
| 75 |
begin |
| 76 |
Application.HelpContext(HelpContext); |
| 77 |
|
| 78 |
end; |
| 79 |
|
| 80 |
procedure TOptionDlg.FormShow(Sender: TObject); |
| 81 |
begin |
| 82 |
RadioGroup1Click(self) |
| 83 |
end; |
| 84 |
|
| 85 |
initialization |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
end. |