?? unitabsread.pas
字號:
unit UnitAbsRead;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons;
type
TFrmAbsRead = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
EdtAbsAddress: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
BBtnYes: TBitBtn;
BBtnNo: TBitBtn;
LabCylins: TLabel;
LabHeads: TLabel;
LabSectors: TLabel;
procedure EdtAbsAddressChange(Sender: TObject);
procedure BBtnNoClick(Sender: TObject);
procedure BBtnYesClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmAbsRead: TFrmAbsRead;
implementation
uses main;
{$R *.dfm}
procedure TFrmAbsRead.EdtAbsAddressChange(Sender: TObject);
begin
LabCylins.Caption:=IntToStr(StrToInt(EdtAbsAddress.Text) div(63*255)); //柱面
LabHeads.Caption:=IntToStr(StrToInt(EdtAbsAddress.Text) div 63 mod 255); //磁頭
LabSectors.Caption:=IntToStr(StrToInt(EdtAbsAddress.Text) mod 63 +1); //扇區
end;
procedure TFrmAbsRead.BBtnNoClick(Sender: TObject);
begin
close;
end;
procedure TFrmAbsRead.BBtnYesClick(Sender: TObject);
var
i,j:integer;
begin
fmain.SEditCylins.Value:=StrToInt(LabCylins.Caption);
fmain.SEditHeads.Value:=StrToInt(LabHeads.Caption);
fmain.SEditSectors.Value:=StrToInt(LabSectors.Caption);
fmain.PnlCHS.Visible:=true;
fmain.MItemSaveMBR.Enabled:=true;
fmain.MItemSaveBoot.Enabled:=true;
fmain.MItemWrite.Enabled:=true;
fmain.NWrite.Enabled:=true;
fmain.NSave.Enabled:=true;
fmain.TBtnSave.Enabled:=true;
fmain.TBtnWrite.Enabled:=true;
fmain.PopupMenu1.AutoPopup:=true;
fmain.PnlCHS.Align:=alBottom;
//PnlCHS.Visible:=false;
fmain.HexScrollBar.Visible:=true;
fmain.PnlSelLog.Visible:=false;
close;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -