unit ShowTunnell;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Mask, Buttons,inifiles;

type
  TShowTunn = class(TForm)
    autoconnecttitle: TGroupBox;
    autoconnect: TCheckBox;
    Button1: TButton;
    Button2: TButton;
    OpenDialog1: TOpenDialog;
    GroupBox1: TGroupBox;
    Edit2: TEdit;
    prima: TLabel;
    dopo: TLabel;
    Edit3: TEdit;
    SpeedButton2: TSpeedButton;
    SpeedButton3: TSpeedButton;
    Edit4: TEdit;
    CheckBox1: TCheckBox;
    SpeedButton4: TSpeedButton;
    debug: TCheckBox;
    procedure SpeedButton4Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  ShowTunn: TShowTunn;

implementation

uses exdials0, Unit1;

{$R *.dfm}

procedure TShowTunn.SpeedButton4Click(Sender: TObject);
begin
if formras.showmodal=mrOk then edit4.Text:=formras.connlist.items[formras.connlist.itemindex];

end;

procedure TShowTunn.Button1Click(Sender: TObject);
var conn: tinifile;
begin
  conn:=tinifile.Create(extractfilepath(application.exename)+'tunnells\'+main.Listview1.Items[main.listview1.itemindex].Caption+'\tunnel.tun');
  conn.writeBool('Tunnell','AutoConnessione',autoconnect.checked);
  conn.writeBool('Tunnell','Debug',debug.checked);  
  conn.UpdateFile;
  close;
end;

procedure TShowTunn.Button2Click(Sender: TObject);
begin
 close;
end;

end.
