Class TMainForm (unit DfMain) |
Inherits from
TForm
procedure Exit1Click(Sender: TObject);
Update drives info immediately
procedure FormCreate(Sender: TObject);
-------------------- TMainForm -----------------------
procedure FormDestroy(Sender: TObject);
Get initial drives info (for initialization) TrayIcon1MouseMove(Self, [], 0, 0);
procedure PopupMenu1Popup(Sender: TObject);
This is where the drive info is displayed
procedure Setup1Click(Sender: TObject);
procedure TrayIcon1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure DrivesItemClick(Sender: TObject);
Now create and insert a menu item for the drive
procedure GetDrivesInfo;
Stores the drive info strings
procedure UpdateHint;
Store type of drive along with the string
procedure UpdateMenu;
Only assign new hint to the tray icon in case the hint changes.
Exit1 : TMenuItem;
N1 : TMenuItem;
PopupMenu1 : TPopupMenu;
Setup1 : TMenuItem;
TrayIcon1 : TTrayIcon;
Decimals : Byte;
Measure : Byte;
Show type of drives in the popup menu?
Qualified : Boolean;
Show all drives in the popup menu?
ShowAllDrives : Boolean;
# decimals in drive info
Drives : TStringList;
Show free space in KB, MB, or GB?
procedure Exit1Click(Sender: TObject);
Update drives info immediately
procedure FormCreate(Sender: TObject);
-------------------- TMainForm -----------------------
procedure FormDestroy(Sender: TObject);
Get initial drives info (for initialization) TrayIcon1MouseMove(Self, [], 0, 0);
procedure PopupMenu1Popup(Sender: TObject);
This is where the drive info is displayed
procedure Setup1Click(Sender: TObject);
procedure TrayIcon1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure DrivesItemClick(Sender: TObject);
Now create and insert a menu item for the drive
procedure GetDrivesInfo;
Stores the drive info strings
procedure UpdateHint;
Store type of drive along with the string
procedure UpdateMenu;
Only assign new hint to the tray icon in case the hint changes.
This avoids unnecessary cursor blinking.
Exit1 : TMenuItem;
N1 : TMenuItem;
PopupMenu1 : TPopupMenu;
Setup1 : TMenuItem;
TrayIcon1 : TTrayIcon;
Decimals : Byte;
Measure : Byte;
Show type of drives in the popup menu?
Qualified : Boolean;
Show all drives in the popup menu?
ShowAllDrives : Boolean;
# decimals in drive info
Drives : TStringList;
Show free space in KB, MB, or GB?