public override void Execute(DnHexBox dnHexBox) { var sel = dnHexBox.Selection; if (sel == null) { return; } var res = messageBoxManager.Ask <byte?>(dnSpy_Shared_Resources.FillSelection_Label, "0xFF", dnSpy_Shared_Resources.FillSelection_Title, s => { string error; byte b = NumberVMUtils.ParseByte(s, byte.MinValue, byte.MaxValue, out error); return(string.IsNullOrEmpty(error) ? b : (byte?)null); }, s => { string error; byte b = NumberVMUtils.ParseByte(s, byte.MinValue, byte.MaxValue, out error); return(error); }); if (res == null) { return; } dnHexBox.FillBytes(sel.Value.StartOffset, sel.Value.EndOffset, res.Value); dnHexBox.Selection = null; }