Ignore:
Timestamp:
Apr 2, 2016, 1:06:34 PM (8 years ago)
Author:
chronos
Message:
  • Modified: All drive dimensions are now stored in project file.
  • Added: Confirmation dialog for saving project on application exit.
  • Modified: ComboBox for selection of current drive now behaves correctly to update project parameters.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Form/UFormProject.pas

    r11 r13  
    1616    Button1: TButton;
    1717    Button2: TButton;
    18     Edit1: TEdit;
     18    ComboBoxDrive: TComboBox;
     19    EditName: TEdit;
    1920    Label1: TLabel;
    2021    Label2: TLabel;
     22    Label3: TLabel;
     23    Label4: TLabel;
     24    LabelSectorCount: TLabel;
    2125    SpinEditSectorSize: TSpinEdit;
    2226  private
     
    3337{$R *.lfm}
    3438
     39uses
     40  UFormMain;
     41
    3542{ TFormProject }
    3643
    3744procedure TFormProject.Load(Project: TProject);
    3845begin
    39   Edit1.Text := Project.Name;
    40   SpinEditSectorSize.Value := Project.SectorSize;
     46  FormMain.DriveList.LoadToStrings(ComboBoxDrive.Items);
     47  EditName.Text := Project.Name;
     48  SpinEditSectorSize.Value := Project.DriveInfo.SectorSize;
     49  ComboBoxDrive.ItemIndex := FormMain.DriveList.IndexOf(FormMain.DriveList.FindByModel(Project.DriveInfo.Model));
    4150end;
    4251
    4352procedure TFormProject.Save(Project: TProject);
    4453begin
    45   Project.Name := Edit1.Text;
    46   Project.SectorSize := SpinEditSectorSize.Value;
     54  Project.Name := EditName.Text;
     55  Project.DriveInfo.SectorSize := SpinEditSectorSize.Value;
    4756end;
    4857
Note: See TracChangeset for help on using the changeset viewer.