Ignore:
Timestamp:
Jul 17, 2012, 7:25:56 AM (12 years ago)
Author:
chronos
Message:
  • Added: Target celection combobox on main toolbar.
  • Added: Options of available targets allow to change producer and executor path if available.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/Forms/UFormTargets.pas

    r53 r60  
    66
    77uses
    8   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls;
     8  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
     9  Menus, ActnList;
    910
    1011type
     
    1314
    1415  TFormTargets = class(TForm)
     16    ATargetOptions: TAction;
     17    ActionList1: TActionList;
    1518    ListView1: TListView;
     19    PopupMenu1: TPopupMenu;
     20    procedure ATargetOptionsExecute(Sender: TObject);
    1621    procedure FormShow(Sender: TObject);
    1722    procedure ListView1Data(Sender: TObject; Item: TListItem);
    18     procedure ListView1DblClick(Sender: TObject);
    1923  private
    2024    { private declarations }
     
    3135
    3236uses
    33   UCore, UFormMain, UCompiler, UFormCompilerSettings, UProducer, UTarget;
     37  UCore, UFormMain, UCompiler, UProducer, UTarget,
     38  UFormTargetOptions;
    3439
    3540resourcestring
     
    4449end;
    4550
     51procedure TFormTargets.ATargetOptionsExecute(Sender: TObject);
     52begin
     53  if Assigned(ListView1.Selected) then begin
     54    FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data));
     55    if FormTargetOptions.ShowModal = mrOk then begin
     56      FormTargetOptions.SaveControls(TTarget(ListView1.Selected.Data));
     57      ReloadList;
     58    end;
     59  end;
     60end;
     61
    4662procedure TFormTargets.ListView1Data(Sender: TObject; Item: TListItem);
    4763begin
     
    5167    Item.Data := Core.Compiler.Targets[Item.Index];
    5268    //Item.SubItems.Add(Producer.CompilerPath);
    53   end;
    54 end;
    55 
    56 procedure TFormTargets.ListView1DblClick(Sender: TObject);
    57 begin
    58   if Assigned(ListView1.Selected) then begin
    59     FormCompilerSettings.LoadFromProducer(TProducer(ListView1.Selected.Data));
    60     if FormCompilerSettings.ShowModal = mrOk then
    61       FormCompilerSettings.SaveToProducer(TProducer(ListView1.Selected.Data));
    62     ReloadList;
    6369  end;
    6470end;
Note: See TracChangeset for help on using the changeset viewer.