⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unitabsread.pas

📁 界面精美
💻 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 + -