Changeset 33 for trunk/Forms


Ignore:
Timestamp:
Dec 10, 2016, 9:34:28 PM (8 years ago)
Author:
chronos
Message:
  • Added: About form which show version information and link to project homepage.
Location:
trunk/Forms
Files:
4 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r31 r33  
    1313  OnDestroy = FormDestroy
    1414  OnShow = FormShow
    15   LCLVersion = '1.7'
     15  LCLVersion = '1.6.0.4'
    1616  object ToolBar1: TToolBar
    1717    Left = 0
     
    478478      OnExecute = AOperationAddExecute
    479479    end
     480    object AShowAbout: TAction
     481      Caption = 'About'
     482      OnExecute = AShowAboutExecute
     483    end
    480484  end
    481485  object OpenDialog1: TOpenDialog
     
    545549      end
    546550    end
     551    object MenuItem20: TMenuItem
     552      Caption = 'Help'
     553      object MenuItem21: TMenuItem
     554        Action = AShowAbout
     555      end
     556    end
    547557  end
    548558  object LastOpenedList1: TLastOpenedList
  • trunk/Forms/UFormMain.pas

    r31 r33  
    1515
    1616  TFormMain = class(TForm)
     17    AShowAbout: TAction;
    1718    AOperationAdd: TAction;
    1819    AOperationRemove: TAction;
     
    7778    MenuItem18: TMenuItem;
    7879    MenuItem19: TMenuItem;
     80    MenuItem20: TMenuItem;
     81    MenuItem21: TMenuItem;
    7982    MenuItemOpenRecent: TMenuItem;
    8083    MenuItem2: TMenuItem;
     
    115118    procedure AScanStartExecute(Sender: TObject);
    116119    procedure AScanStopExecute(Sender: TObject);
     120    procedure AShowAboutExecute(Sender: TObject);
    117121    procedure AViewToolbarExecute(Sender: TObject);
    118122    procedure ComboBoxDriveChange(Sender: TObject);
     
    152156  FormMain: TFormMain;
    153157
     158
    154159implementation
    155160
     
    157162
    158163uses
    159   UCore, UFormProject, UFormOperation;
     164  UCore, UFormProject, UFormOperation, UFormAbout;
    160165
    161166resourcestring
     
    225230    Core.Project.CurrentScan.Stop;
    226231    UpdateInterface;
     232  end;
     233end;
     234
     235procedure TFormMain.AShowAboutExecute(Sender: TObject);
     236var
     237  FormAbout: TFormAbout;
     238begin
     239  FormAbout := TFormAbout.Create(nil);
     240  try
     241    FormAbout.ApplicationInfo := Core.ApplicationInfo1;
     242    FormAbout.ShowModal;
     243  finally
     244    FreeAndNil(FormAbout);
    227245  end;
    228246end;
Note: See TracChangeset for help on using the changeset viewer.