unit afdg;

{$IFDEF FPC}
  {$MODE DELPHI}{$H+}
{$ENDIF}

(***************************************)
(* Copyright (C) 2003, SHIRAISHI Kazuo *)
(***************************************)


interface

uses
  SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls,  CheckLst, LResources, Buttons;


type
  TAutoFormatDlg = class(TForm)
    OKBtn: TButton;
    CancelBtn: TButton;
    HelpBtn: TButton;
    Bevel1: TBevel;
    CheckListBox1: TCheckListBox;
    procedure HelpBtnClick(Sender: TObject);
  private
    { Private 宣言 }
  public
    { Public 宣言 }
  end;

var
  AutoFormatDlg: TAutoFormatDlg;
  AutoFormatKw:boolean=true;

procedure  setAutoFormat;

implementation
uses base,htmlhelp;


procedure TAutoFormatDlg.HelpBtnClick(Sender: TObject);
begin
  OpenHelp(HelpContext);
end;

procedure  setAutoFormat;
begin
 with AutoFormatDlg do
  begin
    //OkBtn.Focused;
    CheckListBox1.checked[0]:=AutoFormatKw;
    if ShowModal=mrOk then
      begin
        AutoFormatKw:=CheckListBox1.checked[0];
      end;
  end;
end;

initialization
  {$i afdg.lrs}
    with TMyIniFile.create('AutoFormat') do
       begin
         AutoFormatKw:=ReadBool('kw',AutoFormatKw);
         free
        end;

finalization
      with TMyIniFile.create('AutoFormat') do
         begin
             WriteBool('kw',AutoFormatKw);
             free
         end;

end.

