unit uarreglar_codificacion_fuentes;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls,
  Graphics, Dialogs, StdCtrls, DOS, Math,
  udirectoryscanner,
  udscanner_tolowercase,
  udscanner_eliminarbom,
  udscanner_relativeurl,
  udscanner_fuentespascal,
  udscanner_cleanconditionaldefine;

type

  { TForm1 }

  TForm1 = class(TForm)
    btCleraBOM: TButton;
    btHtmlRutasRelativas: TButton;
    btRenameToLowerCase: TButton;
    btScanFuentes: TButton;
    Button1: TButton;
    procedure btCleraBOMClick(Sender: TObject);
    procedure btHtmlRutasRelativasClick(Sender: TObject);
    procedure btRenameToLowerCaseClick(Sender: TObject);
    procedure btScanFuentesClick(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }


procedure TForm1.btCleraBOMClick(Sender: TObject);
var
  DScanner: TDirectoryScanner_EliminarBOM;
begin
  DScanner := TDirectoryScanner_EliminarBOM.Create;
  DScanner.scan('c:\simsee\SimSEE_src\fron_src');
  DScanner.Free;
end;

procedure TForm1.btHtmlRutasRelativasClick(Sender: TObject);
var
  DScanner: TDirectoryScanner_relative_url;
begin
  DScanner := TDirectoryScanner_relative_url.Create;
  DScanner.scan('C:\basura\ieeetdla2012_CD');
  DScanner.Free;
end;

procedure TForm1.btRenameToLowerCaseClick(Sender: TObject);
var
  DScanner: TDirectoryScanner_ToLowerCase;
begin
  DScanner := TDirectoryScanner_ToLowerCase.Create;
  DScanner.scan('c:\simsee\SimSEE_src\fron_src');
  DScanner.Free;
end;

procedure TForm1.btScanFuentesClick(Sender: TObject);
var
  fsal: textfile;
  DScanner: TDirectoryScanner_fuentespascal;
begin
  assignfile(fsal, 'c:\basura\scan_condigo.txt');
  rewrite(fsal);
  DScanner := TDirectoryScanner_fuentespascal.Create(fsal);
  DScanner.scan('C:\simsee\SimSEE_src\src');
  DScanner.Free;
  closefile(fsal);
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  DScanner: TDirectoryScanner_cleanconditionaldefine;
begin
  DScanner:= TDirectoryScanner_cleanconditionaldefine.Create('MIGRACION_PERSISTENCIA');
  DScanner.scan( 'c:\simsee\SimSEE_src\src\trunk' );
  DScanner.Free;
end;

end.

