void ChangeSector() { data = disk.ReadSector((int)numTrack.Value, (int)numSide.Value, (int)numSector.Value); DynamicByteProvider dbp = new DynamicByteProvider(data); dbp.Changed += new EventHandler(dbp_Changed); hexBox1.ByteProvider = dbp; }
public SectorEditor(IDiskImage Disk) { InitializeComponent(); this.toolStrip.Renderer.RenderToolStripBorder += new ToolStripRenderEventHandler(Renderer_RenderToolStripBorder); disk = Disk; data = Disk.ReadSector((int)numTrack.Value, (int)numSide.Value, (int)numSector.Value); FixedLengthByteProvider dbp = new FixedLengthByteProvider(data); dbp.Changed += new EventHandler(dbp_Changed); hexBox1.ByteProvider = dbp; //hexBox1.ReadOnly = true; numTrack.Maximum = disk.PhysicalTracks - 1; numSide.Maximum = disk.PhysicalHeads - 1; numSector.Maximum = disk.PhysicalSectors; Init(); hexBox1.MouseWheel += hexBox1_MouseWheel; }