Add missing `: IDialogParent`, remove unnecessary `IMainForm*` params
This commit is contained in:
parent
e4f142c0d1
commit
e56b3abd37
|
@ -863,13 +863,19 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (e is RomLoader.RomErrorArgs args)
|
||||
{
|
||||
using var configForm = new FirmwaresConfig(FirmwareManager, Config.FirmwareUserSpecifications, this, Config.PathEntries, retryLoadRom: true, reloadRomPath: args.RomPath);
|
||||
using var configForm = new FirmwaresConfig(
|
||||
this,
|
||||
FirmwareManager,
|
||||
Config.FirmwareUserSpecifications,
|
||||
Config.PathEntries,
|
||||
retryLoadRom: true,
|
||||
reloadRomPath: args.RomPath);
|
||||
var result = configForm.ShowDialog();
|
||||
args.Retry = result == DialogResult.Retry;
|
||||
}
|
||||
else
|
||||
{
|
||||
using var configForm = new FirmwaresConfig(FirmwareManager, Config.FirmwareUserSpecifications, this, Config.PathEntries);
|
||||
using var configForm = new FirmwaresConfig(this, FirmwareManager, Config.FirmwareUserSpecifications, Config.PathEntries);
|
||||
configForm.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
@ -1877,7 +1883,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (Emulator is ZXSpectrum speccy)
|
||||
{
|
||||
using var form = new ZxSpectrumPokeMemory(this, speccy);
|
||||
using var form = new ZxSpectrumPokeMemory(speccy);
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
@ -2006,7 +2012,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (Emulator is AmstradCPC cpc)
|
||||
{
|
||||
using var form = new AmstradCpcPokeMemory(this, cpc);
|
||||
using var form = new AmstradCpcPokeMemory(cpc);
|
||||
form.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
MameLaunchGame
|
||||
}
|
||||
|
||||
public partial class OpenAdvancedChooser : Form
|
||||
public partial class OpenAdvancedChooser : Form, IDialogParent
|
||||
{
|
||||
private readonly Config _config;
|
||||
|
||||
|
|
|
@ -7,12 +7,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public partial class AmstradCpcPokeMemory : Form
|
||||
{
|
||||
private readonly IMainFormForConfig _mainForm;
|
||||
private readonly AmstradCPC _cpc;
|
||||
|
||||
public AmstradCpcPokeMemory(IMainFormForConfig mainForm, AmstradCPC cpc)
|
||||
public AmstradCpcPokeMemory(AmstradCPC cpc)
|
||||
{
|
||||
_mainForm = mainForm;
|
||||
_cpc = cpc;
|
||||
InitializeComponent();
|
||||
Icon = Properties.Resources.GameControllerIcon;
|
||||
|
|
|
@ -30,11 +30,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
private readonly IDictionary<string, string> _firmwareUserSpecifications;
|
||||
|
||||
private readonly IMainFormForConfig _mainForm;
|
||||
|
||||
private readonly PathEntryCollection _pathEntries;
|
||||
|
||||
public IDialogController DialogController => _mainForm.DialogController;
|
||||
public IDialogController DialogController { get; }
|
||||
|
||||
private readonly FirmwareManager Manager;
|
||||
|
||||
|
@ -102,16 +100,16 @@ namespace BizHawk.Client.EmuHawk
|
|||
private readonly ListViewSorter _listViewSorter;
|
||||
|
||||
public FirmwaresConfig(
|
||||
IDialogController dialogController,
|
||||
FirmwareManager firmwareManager,
|
||||
IDictionary<string, string> firmwareUserSpecifications,
|
||||
IMainFormForConfig mainForm,
|
||||
PathEntryCollection pathEntries,
|
||||
bool retryLoadRom = false,
|
||||
string reloadRomPath = null)
|
||||
{
|
||||
_firmwareUserSpecifications = firmwareUserSpecifications;
|
||||
_mainForm = mainForm;
|
||||
_pathEntries = pathEntries;
|
||||
DialogController = dialogController;
|
||||
Manager = firmwareManager;
|
||||
|
||||
InitializeComponent();
|
||||
|
|
|
@ -7,7 +7,7 @@ using BizHawk.Common;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public partial class SoundConfig : Form
|
||||
public partial class SoundConfig : Form, IDialogParent
|
||||
{
|
||||
private readonly Config _config;
|
||||
|
||||
|
|
|
@ -6,13 +6,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public partial class ZxSpectrumPokeMemory : Form
|
||||
{
|
||||
private readonly IMainFormForConfig _mainForm;
|
||||
private readonly ZXSpectrum _speccy;
|
||||
public ZxSpectrumPokeMemory(
|
||||
IMainFormForConfig mainForm,
|
||||
ZXSpectrum speccy)
|
||||
|
||||
public ZxSpectrumPokeMemory(ZXSpectrum speccy)
|
||||
{
|
||||
_mainForm = mainForm;
|
||||
_speccy = speccy;
|
||||
|
||||
InitializeComponent();
|
||||
|
|
|
@ -9,7 +9,7 @@ using BizHawk.Common.NumberExtensions;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public partial class EditSubtitlesForm : Form
|
||||
public partial class EditSubtitlesForm : Form, IDialogParent
|
||||
{
|
||||
|
||||
private readonly IMovie _selectedMovie;
|
||||
|
|
|
@ -10,7 +10,7 @@ using BizHawk.Emulation.Common;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public partial class BatchRun : Form
|
||||
public partial class BatchRun : Form, IDialogParent
|
||||
{
|
||||
private readonly Config _config;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ using BizHawk.Client.Common;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public partial class GreenzoneSettings : Form
|
||||
public partial class GreenzoneSettings : Form, IDialogParent
|
||||
{
|
||||
private readonly Action<ZwinderStateManagerSettings, bool> _saveSettings;
|
||||
private ZwinderStateManagerSettings _settings;
|
||||
|
|
|
@ -9,7 +9,7 @@ using BizHawk.Client.Common;
|
|||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
// TODO: don't use textboxes as labels
|
||||
public partial class RamPoke : Form
|
||||
public partial class RamPoke : Form, IDialogParent
|
||||
{
|
||||
private readonly List<Watch> _watchList;
|
||||
private readonly CheatCollection _cheats;
|
||||
|
|
Loading…
Reference in New Issue