unit cde_disc_frame;
{$mode delphi}
{$codepage UTF8}
interface
uses Classes, SysUtils, FileUtil, Forms, Controls, ExtCtrls, StdCtrls, Buttons, cde_types, cde_lang, ANBFormatString;
type
  { Tcde_disc_frm }
  Tcde_disc_frm = class(TFrame)
    RefrashInfoBtn: TSpeedButton;
    InfoPanel: TPanel;
    TitlePanel: TPanel;
    EjectDiscBtn: TSpeedButton;
    TopLine: TBevel;
    CreateLinkBtn: TSpeedButton;
    DiscImg: TImage;
    DiscLbl: TLabel;
    FileSystemImg: TImage;
    DiscSerialImg: TImage;
    DiscSerialLbl: TLabel;
    AdditionalActionsPanel: TPanel;
    BrowseDiscBtn: TSpeedButton;
    BottomLine: TBevel;
    VolumeNameLbl: TLabel;
    VolumeNameImg: TImage;
    FileSystemLbl: TLabel;
    procedure EjectDiscBtnClick(Sender: TObject);
    procedure RefrashInfoBtnClick(Sender: TObject);
  private
  public
   Drive: WideChar;
   DriveInfo: TDiscInfo;
   procedure UpdateDriveInfo;
  end;
implementation
uses kernel;
{$R *.lfm}
procedure Tcde_disc_frm.RefrashInfoBtnClick(Sender: TObject);
begin
UpdateDriveInfo;
end;
procedure Tcde_disc_frm.EjectDiscBtnClick(Sender: TObject);
begin
EjectDrive(Drive);
UpdateDriveInfo;
end;
procedure Tcde_disc_frm.UpdateDriveInfo;
begin
DiscLbl.Caption:= FormatStrUDI(GetLocalizedString(cdeg_discinfo_discletter), DriveInfo);
VolumeNameImg.Hint:= GetLocalizedString(cdeg_discinfo_volumename_hint);
VolumeNameLbl.Caption:= FormatStrUDI(GetLocalizedString(cdeg_discinfo_volumename), DriveInfo);
VolumeNameLbl.Hint:= FormatStr(VolumeNameLbl.Caption, ['&'], ['']);
FileSystemImg.Hint:= GetLocalizedString(cdeg_discinfo_filesystem_hint);
FileSystemLbl.Caption:= FormatStrUDI(GetLocalizedString(cdeg_discinfo_filesystem), DriveInfo);
DiscSerialImg.Hint:= GetLocalizedString(cdeg_discinfo_discserial_hint);
DiscSerialLbl.Caption:= FormatStrUDI(GetLocalizedString(cdeg_discinfo_discserial), DriveInfo);
CreateLinkBtn.Hint:= GetLocalizedString(cdeg_discinfo_createlink_hint);
BrowseDiscBtn.Hint:= GetLocalizedString(cdeg_discinfo_discbrowse_hint);
EjectDiscBtn.Hint:= GetLocalizedString(cdeg_discinfo_disceject_hint);
RefrashInfoBtn.Hint:= GetLocalizedString(cdeg_discinfo_refrash_hint);
end;
end.
