Changeset 339 for tools


Ignore:
Timestamp:
Feb 27, 2010, 2:57:14 PM (14 years ago)
Author:
george
Message:
  • Upraveno: Oddělení zpracování parametrů volání do samostatné metody.
Location:
tools/dbc_export
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tools/dbc_export/DBCExport.lpi

    r338 r339  
    3535        <IsPartOfProject Value="True"/>
    3636        <UnitName Value="DBCExport"/>
    37         <CursorPos X="3" Y="107"/>
    38         <TopLine Value="105"/>
     37        <CursorPos X="1" Y="35"/>
     38        <TopLine Value="22"/>
    3939        <EditorIndex Value="0"/>
    40         <UsageCount Value="31"/>
     40        <UsageCount Value="39"/>
    4141        <Loaded Value="True"/>
    4242        <SyntaxHighlighter Value="Delphi"/>
     
    4747        <CursorPos X="1" Y="1"/>
    4848        <TopLine Value="1"/>
    49         <UsageCount Value="29"/>
     49        <UsageCount Value="28"/>
    5050        <SyntaxHighlighter Value="Delphi"/>
    5151      </Unit1>
     
    5454        <CursorPos X="14" Y="719"/>
    5555        <TopLine Value="703"/>
    56         <UsageCount Value="15"/>
     56        <UsageCount Value="14"/>
    5757      </Unit2>
    5858      <Unit3>
     
    6060        <CursorPos X="23" Y="36"/>
    6161        <TopLine Value="33"/>
    62         <UsageCount Value="14"/>
     62        <UsageCount Value="13"/>
    6363      </Unit3>
    6464      <Unit4>
     
    6767        <CursorPos X="1" Y="1"/>
    6868        <TopLine Value="1"/>
    69         <UsageCount Value="29"/>
     69        <UsageCount Value="28"/>
    7070        <SyntaxHighlighter Value="Delphi"/>
    7171      </Unit4>
     
    7474        <CursorPos X="24" Y="6"/>
    7575        <TopLine Value="1"/>
    76         <UsageCount Value="9"/>
     76        <UsageCount Value="8"/>
    7777        <SyntaxHighlighter Value="None"/>
    7878      </Unit5>
     
    8282        <CursorPos X="3" Y="166"/>
    8383        <TopLine Value="164"/>
    84         <UsageCount Value="10"/>
     84        <UsageCount Value="9"/>
    8585      </Unit6>
    8686      <Unit7>
     
    8888        <CursorPos X="22" Y="196"/>
    8989        <TopLine Value="184"/>
    90         <UsageCount Value="12"/>
     90        <UsageCount Value="11"/>
    9191      </Unit7>
    9292      <Unit8>
     
    9595        <CursorPos X="12" Y="100"/>
    9696        <TopLine Value="66"/>
    97         <UsageCount Value="12"/>
     97        <UsageCount Value="11"/>
    9898      </Unit8>
    9999      <Unit9>
     
    101101        <CursorPos X="1" Y="1"/>
    102102        <TopLine Value="51"/>
    103         <UsageCount Value="12"/>
     103        <UsageCount Value="11"/>
    104104      </Unit9>
    105105      <Unit10>
     
    108108        <CursorPos X="9" Y="79"/>
    109109        <TopLine Value="51"/>
    110         <UsageCount Value="11"/>
     110        <UsageCount Value="10"/>
    111111      </Unit10>
    112112      <Unit11>
     
    117117        <TopLine Value="71"/>
    118118        <EditorIndex Value="4"/>
    119         <UsageCount Value="22"/>
     119        <UsageCount Value="30"/>
    120120        <Loaded Value="True"/>
    121121        <SyntaxHighlighter Value="Delphi"/>
     
    128128        <TopLine Value="60"/>
    129129        <EditorIndex Value="2"/>
    130         <UsageCount Value="22"/>
     130        <UsageCount Value="30"/>
    131131        <Loaded Value="True"/>
    132132        <SyntaxHighlighter Value="Delphi"/>
     
    138138        <TopLine Value="1"/>
    139139        <EditorIndex Value="3"/>
    140         <UsageCount Value="22"/>
     140        <UsageCount Value="30"/>
    141141        <Loaded Value="True"/>
    142142        <SyntaxHighlighter Value="None"/>
     
    148148        <TopLine Value="47"/>
    149149        <EditorIndex Value="1"/>
    150         <UsageCount Value="11"/>
     150        <UsageCount Value="15"/>
    151151        <Loaded Value="True"/>
    152152      </Unit14>
  • tools/dbc_export/DBCExport.pas

    r338 r339  
    1414  { TDBCExport }
    1515  TDBCExport = class(TCustomApplication)
     16  private
     17    procedure ParseParameters;
    1618  protected
    1719    procedure DoRun; override;
     
    3133{ TDBCExport }
    3234
    33 procedure TDBCExport.DoRun;
     35procedure TDBCExport.ParseParameters;
    3436begin
    35   // Parse parameters
    3637  if HasOption('h', 'help') then begin
    3738    WriteHelp;
     
    6869    Database.Hostname := GetOptionValue('t', 'host');
    6970  end else Database.Hostname := 'localhost';
     71end;
    7072
    71 
     73procedure TDBCExport.DoRun;
     74begin
     75  ParseParameters;
    7276  ShowDBC;
    7377
     
    8084  inherited Create(TheOwner);
    8185  StopOnException := True;
    82   Database := TSqlDatabase.Create;;
     86  Database := TSqlDatabase.Create;
    8387end;
    8488
     
    129133      end;
    130134
    131       WriteLn('Save');
    132135      SaveToFile(NewDBCFileName);
    133136    end else WriteLn('File ' + DBCFileName + ' not exists.');
     
    139142  Application: TDBCExport;
    140143
    141 {$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
     144{$IFDEF WINDOWS}{$R DBCExport.rc}{$ENDIF}
    142145
    143146{$R DBCExport.res}
Note: See TracChangeset for help on using the changeset viewer.