Changeset 92


Ignore:
Timestamp:
Jul 20, 2018, 9:48:47 AM (6 years ago)
Author:
chronos
Message:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r91 r92  
    433433procedure TFormMain.AViewCompilersExecute(Sender: TObject);
    434434begin
    435   FormCompilers.Show;
     435  FormTargets.Show;
    436436end;
    437437
  • trunk/Forms/UFormTargetOptions.lfm

    r50 r92  
    11object FormTargetOptions: TFormTargetOptions
    22  Left = 429
    3   Height = 240
     3  Height = 206
    44  Top = 228
    5   Width = 369
     5  Width = 422
    66  Caption = 'Target options'
    7   ClientHeight = 240
    8   ClientWidth = 369
    9   LCLVersion = '1.1'
     7  ClientHeight = 206
     8  ClientWidth = 422
     9  DesignTimePPI = 120
     10  OnClose = FormClose
     11  OnCreate = FormCreate
     12  OnShow = FormShow
     13  LCLVersion = '1.8.2.0'
    1014  object Edit1: TEdit
    1115    Left = 8
    12     Height = 21
    13     Top = 24
    14     Width = 272
     16    Height = 28
     17    Top = 32
     18    Width = 325
    1519    Anchors = [akTop, akLeft, akRight]
    1620    TabOrder = 0
     
    1822  object Label1: TLabel
    1923    Left = 8
    20     Height = 14
     24    Height = 20
    2125    Top = 7
    22     Width = 86
     26    Width = 122
    2327    Caption = 'Compiler location:'
    2428    ParentColor = False
    2529  end
    2630  object ButtonCompiler: TButton
    27     Left = 288
    28     Height = 25
    29     Top = 24
     31    Left = 341
     32    Height = 31
     33    Top = 35
    3034    Width = 75
    3135    Anchors = [akTop, akRight]
     
    3539  end
    3640  object ButtonExecute: TButton
    37     Left = 288
    38     Height = 25
    39     Top = 80
     41    Left = 341
     42    Height = 31
     43    Top = 96
    4044    Width = 75
    4145    Anchors = [akTop, akRight]
     
    4650  object Edit2: TEdit
    4751    Left = 8
    48     Height = 21
    49     Top = 81
    50     Width = 272
     52    Height = 28
     53    Top = 96
     54    Width = 325
    5155    Anchors = [akTop, akLeft, akRight]
    5256    TabOrder = 3
     
    5458  object Label2: TLabel
    5559    Left = 8
    56     Height = 14
    57     Top = 64
    58     Width = 88
     60    Height = 20
     61    Top = 72
     62    Width = 118
    5963    Caption = 'Executor location:'
    6064    ParentColor = False
    6165  end
    6266  object ButtonOk: TButton
    63     Left = 288
    64     Height = 25
    65     Top = 208
    66     Width = 75
     67    Left = 319
     68    Height = 31
     69    Top = 163
     70    Width = 91
    6771    Anchors = [akRight, akBottom]
    6872    Caption = 'Ok'
     
    7175  end
    7276  object ButtonCancel: TButton
    73     Left = 200
    74     Height = 25
    75     Top = 208
    76     Width = 75
     77    Left = 207
     78    Height = 31
     79    Top = 163
     80    Width = 91
    7781    Anchors = [akRight, akBottom]
    7882    Caption = 'Cancel'
  • trunk/Forms/UFormTargetOptions.pas

    r72 r92  
    2525    procedure ButtonCompilerClick(Sender: TObject);
    2626    procedure ButtonExecuteClick(Sender: TObject);
     27    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     28    procedure FormCreate(Sender: TObject);
     29    procedure FormShow(Sender: TObject);
    2730  private
    2831    { private declarations }
     
    3538  FormTargetOptions: TFormTargetOptions;
    3639
     40
    3741implementation
    3842
    3943{$R *.lfm}
     44
     45uses
     46  UCore;
    4047
    4148{ TFormTargetOptions }
     
    5158  OpenDialog1.FileName := Edit2.Text;
    5259  if OpenDialog1.Execute then Edit2.Text := OpenDialog1.FileName;
     60end;
     61
     62procedure TFormTargetOptions.FormClose(Sender: TObject;
     63  var CloseAction: TCloseAction);
     64begin
     65  Core.PersistentForm1.Save(Self);
     66end;
     67
     68procedure TFormTargetOptions.FormCreate(Sender: TObject);
     69begin
     70  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     71end;
     72
     73procedure TFormTargetOptions.FormShow(Sender: TObject);
     74begin
     75  Core.PersistentForm1.Load(Self);
    5376end;
    5477
  • trunk/Forms/UFormTargets.lfm

    r50 r92  
    1 object FormCompilers: TFormCompilers
     1object FormTargets: TFormTargets
    22  Left = 292
    33  Height = 344
     
    77  ClientHeight = 344
    88  ClientWidth = 574
     9  DesignTimePPI = 120
    910  OnShow = FormShow
    10   LCLVersion = '1.1'
     11  LCLVersion = '1.8.2.0'
    1112  object ListView1: TListView
    1213    Left = 8
     
    3536    OnData = ListView1Data
    3637    OnDblClick = ListView1DblClick
     38    OnKeyPress = ListView1KeyPress
    3739  end
    3840end
  • trunk/Forms/UFormTargets.pas

    r51 r92  
    1010type
    1111
    12   { TFormCompilers }
     12  { TFormTargets }
    1313
    14   TFormCompilers = class(TForm)
     14  TFormTargets = class(TForm)
    1515    ListView1: TListView;
    1616    procedure FormShow(Sender: TObject);
    1717    procedure ListView1Data(Sender: TObject; Item: TListItem);
    1818    procedure ListView1DblClick(Sender: TObject);
     19    procedure ListView1KeyPress(Sender: TObject; var Key: char);
    1920  private
    2021    { private declarations }
     
    2425
    2526var
    26   FormCompilers: TFormCompilers;
     27  FormTargets: TFormTargets;
    2728
    2829implementation
     
    3334  UCore, UTarget, UFormTargetOptions;
    3435
    35 { TFormCompilers }
     36{ TFormTargets }
    3637
    37 procedure TFormCompilers.FormShow(Sender: TObject);
     38procedure TFormTargets.FormShow(Sender: TObject);
    3839begin
    3940  ReloadList;
    4041end;
    4142
    42 procedure TFormCompilers.ListView1Data(Sender: TObject; Item: TListItem);
     43procedure TFormTargets.ListView1Data(Sender: TObject; Item: TListItem);
    4344begin
    4445  if (Item.Index >= 0) and (Item.Index < Core.Targets.Count) then
     
    5152end;
    5253
    53 procedure TFormCompilers.ListView1DblClick(Sender: TObject);
     54procedure TFormTargets.ListView1DblClick(Sender: TObject);
    5455begin
    55   FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data));
    56   if FormTargetOptions.ShowModal = mrOk then begin
    57     FormTargetOptions.SaveControls(TTarget(ListView1.Selected.Data));
    58     ReloadList;
     56  FormTargetOptions := TFormTargetOptions.Create(nil);
     57  try
     58    FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data));
     59    if FormTargetOptions.ShowModal = mrOk then begin
     60      FormTargetOptions.SaveControls(TTarget(ListView1.Selected.Data));
     61      ReloadList;
     62    end;
     63  finally
     64    FormTargetOptions.Free;
    5965  end;
    6066end;
    6167
    62 procedure TFormCompilers.ReloadList;
     68procedure TFormTargets.ListView1KeyPress(Sender: TObject; var Key: char);
     69begin
     70  if Key = #13 then ListView1DblClick(nil);
     71end;
     72
     73procedure TFormTargets.ReloadList;
    6374begin
    6475  ListView1.Items.Count := Core.Targets.Count;
  • trunk/Languages/LazFuck.cs.po

    r91 r92  
    4646
    4747#: tformcompilers.listview1.columns[0].caption
     48msgctxt "tformcompilers.listview1.columns[0].caption"
    4849msgid "Name"
    4950msgstr "Jméno"
    5051
    5152#: tformcompilers.listview1.columns[1].caption
     53msgctxt "tformcompilers.listview1.columns[1].caption"
    5254msgid "Execution path"
    5355msgstr "Cesta vykonání"
     
    540542msgstr "Umístění spouštěče:"
    541543
     544#: tformtargets.caption
     545msgctxt "tformtargets.caption"
     546msgid "Compilers"
     547msgstr "Překladače"
     548
     549#: tformtargets.listview1.columns[0].caption
     550msgctxt "tformtargets.listview1.columns[0].caption"
     551msgid "Name"
     552msgstr "Jméno"
     553
     554#: tformtargets.listview1.columns[1].caption
     555msgctxt "tformtargets.listview1.columns[1].caption"
     556msgid "Execution path"
     557msgstr "Cesta vykonání"
     558
     559#: tformtargets.listview1.columns[2].caption
     560msgctxt "tformtargets.listview1.columns[2].caption"
     561msgid "Compiler path"
     562msgstr "Cesta překladače"
     563
    542564#: toptionsform.buttoncancel.caption
    543565msgctxt "toptionsform.buttoncancel.caption"
  • trunk/Languages/LazFuck.po

    r91 r92  
    3636
    3737#: tformcompilers.listview1.columns[0].caption
     38msgctxt "tformcompilers.listview1.columns[0].caption"
    3839msgid "Name"
    3940msgstr ""
    4041
    4142#: tformcompilers.listview1.columns[1].caption
     43msgctxt "tformcompilers.listview1.columns[1].caption"
    4244msgid "Execution path"
    4345msgstr ""
    4446
    4547#: tformcompilers.listview1.columns[2].caption
     48msgctxt "tformcompilers.listview1.columns[2].caption"
    4649msgid "Compiler path"
    4750msgstr ""
     
    494497msgstr ""
    495498
     499#: tformtargets.caption
     500msgctxt "tformtargets.caption"
     501msgid "Compilers"
     502msgstr ""
     503
     504#: tformtargets.listview1.columns[0].caption
     505msgctxt "tformtargets.listview1.columns[0].caption"
     506msgid "Name"
     507msgstr ""
     508
     509#: tformtargets.listview1.columns[1].caption
     510msgctxt "tformtargets.listview1.columns[1].caption"
     511msgid "Execution path"
     512msgstr ""
     513
     514#: tformtargets.listview1.columns[2].caption
     515msgctxt "tformtargets.listview1.columns[2].caption"
     516msgid "Compiler path"
     517msgstr ""
     518
    496519#: toptionsform.buttoncancel.caption
    497520msgctxt "toptionsform.buttoncancel.caption"
  • trunk/LazFuck.lpi

    r91 r92  
    206206        <Filename Value="Forms\UFormTargets.pas"/>
    207207        <IsPartOfProject Value="True"/>
    208         <ComponentName Value="FormCompilers"/>
     208        <ComponentName Value="FormTargets"/>
    209209        <HasResources Value="True"/>
    210210        <ResourceBaseClass Value="Form"/>
  • trunk/LazFuck.lpr

    r91 r92  
    3636  Application.CreateForm(TFormMain, FormMain);
    3737  Application.CreateForm(TFormCPU, FormCPU);
    38   Application.CreateForm(TFormCompilers, FormCompilers);
    3938  Application.CreateForm(TFormOutput, FormOutput);
    4039  Application.CreateForm(TFormInput, FormInput);
     
    4342  Application.CreateForm(TFormSourceCode, FormSourceCode);
    4443  Application.CreateForm(TFormTargetCode, FormTargetCode);
    45   Application.CreateForm(TFormTargetOptions, FormTargetOptions);
    4644  Application.CreateForm(TFormLog, FormLog);
     45  Application.CreateForm(TFormTargets, FormTargets);
    4746  Application.Run;
    4847end.
Note: See TracChangeset for help on using the changeset viewer.