Implement IDialogParent in some more forms
This commit is contained in:
parent
8a6c7be6aa
commit
b752b09d62
|
@ -14,7 +14,7 @@ using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class PlayMovie : Form
|
public partial class PlayMovie : Form, IDialogParent
|
||||||
{
|
{
|
||||||
private readonly IMainFormForTools _mainForm;
|
private readonly IMainFormForTools _mainForm;
|
||||||
private readonly Config _config;
|
private readonly Config _config;
|
||||||
|
@ -29,6 +29,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private bool _sortDetailsReverse;
|
private bool _sortDetailsReverse;
|
||||||
private string _sortedDetailsCol;
|
private string _sortedDetailsCol;
|
||||||
|
|
||||||
|
public IDialogController DialogController => _mainForm;
|
||||||
|
|
||||||
|
public IWin32Window SelfAsHandle => this;
|
||||||
|
|
||||||
public PlayMovie(
|
public PlayMovie(
|
||||||
IMainFormForTools mainForm,
|
IMainFormForTools mainForm,
|
||||||
Config config,
|
Config config,
|
||||||
|
|
|
@ -9,7 +9,7 @@ using BizHawk.Client.Common;
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
// TODO - Allow relative paths in record TextBox
|
// TODO - Allow relative paths in record TextBox
|
||||||
public partial class RecordMovie : Form
|
public partial class RecordMovie : Form, IDialogParent
|
||||||
{
|
{
|
||||||
private readonly IMainFormForTools _mainForm;
|
private readonly IMainFormForTools _mainForm;
|
||||||
private readonly Config _config;
|
private readonly Config _config;
|
||||||
|
@ -18,6 +18,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private readonly IMovieSession _movieSession;
|
private readonly IMovieSession _movieSession;
|
||||||
private readonly FirmwareManager _firmwareManager;
|
private readonly FirmwareManager _firmwareManager;
|
||||||
|
|
||||||
|
public IDialogController DialogController => _mainForm;
|
||||||
|
|
||||||
|
public IWin32Window SelfAsHandle => this;
|
||||||
|
|
||||||
public RecordMovie(
|
public RecordMovie(
|
||||||
IMainFormForTools mainForm,
|
IMainFormForTools mainForm,
|
||||||
Config config,
|
Config config,
|
||||||
|
|
|
@ -10,7 +10,7 @@ using BizHawk.Emulation.Common;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class BreakpointControl : UserControl
|
public partial class BreakpointControl : UserControl, IDialogParent
|
||||||
{
|
{
|
||||||
public IMainFormForTools MainForm { get; set; }
|
public IMainFormForTools MainForm { get; set; }
|
||||||
public IDebuggable Core { get; set; }
|
public IDebuggable Core { get; set; }
|
||||||
|
@ -20,6 +20,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private readonly BreakpointList _breakpoints = new BreakpointList();
|
private readonly BreakpointList _breakpoints = new BreakpointList();
|
||||||
|
|
||||||
|
public IDialogController DialogController => MainForm;
|
||||||
|
|
||||||
|
public IWin32Window SelfAsHandle => this;
|
||||||
|
|
||||||
public BreakpointControl()
|
public BreakpointControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
|
@ -7,14 +7,16 @@ using BizHawk.Client.Common;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class MultiDiskFileSelector : UserControl
|
public partial class MultiDiskFileSelector : UserControl, IDialogParent
|
||||||
{
|
{
|
||||||
private readonly IDialogController _dialogController;
|
|
||||||
|
|
||||||
private readonly Func<string> _getLoadedRomNameCallback;
|
private readonly Func<string> _getLoadedRomNameCallback;
|
||||||
|
|
||||||
private readonly ToolFormBase _parent;
|
private readonly ToolFormBase _parent;
|
||||||
|
|
||||||
|
public IDialogController DialogController { get; }
|
||||||
|
|
||||||
|
public IWin32Window SelfAsHandle => this;
|
||||||
|
|
||||||
public string SystemString { get; set; } = "";
|
public string SystemString { get; set; } = "";
|
||||||
|
|
||||||
public string Path
|
public string Path
|
||||||
|
@ -32,7 +34,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public MultiDiskFileSelector(ToolFormBase parent, IDialogController dialogController, Func<string> getLoadedRomNameCallback)
|
public MultiDiskFileSelector(ToolFormBase parent, IDialogController dialogController, Func<string> getLoadedRomNameCallback)
|
||||||
{
|
{
|
||||||
_dialogController = dialogController;
|
DialogController = dialogController;
|
||||||
_getLoadedRomNameCallback = getLoadedRomNameCallback;
|
_getLoadedRomNameCallback = getLoadedRomNameCallback;
|
||||||
_parent = parent;
|
_parent = parent;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
@ -79,7 +81,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
};
|
};
|
||||||
string hawkPath = "";
|
string hawkPath = "";
|
||||||
|
|
||||||
var result = _dialogController.DoWithTempMute(() => ofd.ShowDialog(this));
|
var result = DialogController.DoWithTempMute(() => ofd.ShowDialog(this));
|
||||||
if (result == DialogResult.OK)
|
if (result == DialogResult.OK)
|
||||||
{
|
{
|
||||||
hawkPath = ofd.FileName;
|
hawkPath = ofd.FileName;
|
||||||
|
|
|
@ -11,7 +11,7 @@ using BizHawk.Client.EmuHawk.Properties;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class BookmarksBranchesBox : UserControl
|
public partial class BookmarksBranchesBox : UserControl, IDialogParent
|
||||||
{
|
{
|
||||||
private const string BranchNumberColumnName = "BranchNumberColumn";
|
private const string BranchNumberColumnName = "BranchNumberColumn";
|
||||||
private const string FrameColumnName = "FrameColumn";
|
private const string FrameColumnName = "FrameColumn";
|
||||||
|
@ -45,6 +45,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
set => BranchView.HoverInterval = value;
|
set => BranchView.HoverInterval = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IDialogController DialogController => Tastudio.MainForm;
|
||||||
|
|
||||||
|
public IWin32Window SelfAsHandle => this;
|
||||||
|
|
||||||
public BookmarksBranchesBox()
|
public BookmarksBranchesBox()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
|
@ -10,11 +10,15 @@ using BizHawk.Client.EmuHawk.Properties;
|
||||||
|
|
||||||
namespace BizHawk.Client.EmuHawk
|
namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class MarkerControl : UserControl
|
public partial class MarkerControl : UserControl, IDialogParent
|
||||||
{
|
{
|
||||||
public TAStudio Tastudio { get; set; }
|
public TAStudio Tastudio { get; set; }
|
||||||
public TasMovieMarkerList Markers => Tastudio.CurrentTasMovie.Markers;
|
public TasMovieMarkerList Markers => Tastudio.CurrentTasMovie.Markers;
|
||||||
|
|
||||||
|
public IDialogController DialogController => Tastudio.MainForm;
|
||||||
|
|
||||||
|
public IWin32Window SelfAsHandle => this;
|
||||||
|
|
||||||
public MarkerControl()
|
public MarkerControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
Loading…
Reference in New Issue