Move another function to ToolFormBase
This commit is contained in:
parent
894a9c2318
commit
6f75ef6dba
|
@ -334,11 +334,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
Owner = Settings.FloatingWindow ? null : GlobalWin.MainForm;
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
#region File
|
||||
|
@ -572,7 +567,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void FloatingWindowMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.FloatingWindow ^= true;
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Settings.FloatingWindow);
|
||||
}
|
||||
|
||||
private void RestoreDefaultsMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -592,7 +587,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.Config.LoadCheatFileByGame = true;
|
||||
Global.Config.CheatsAutoSaveOnClose = true;
|
||||
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Settings.FloatingWindow);
|
||||
LoadColumnInfo(CheatListView, Settings.Columns);
|
||||
}
|
||||
|
||||
|
@ -686,7 +681,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Settings.FloatingWindow);
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,18 +42,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
// Do nothing
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
}
|
||||
|
||||
bool IsRunning;
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
//http://www.phy.mtu.edu/~suits/notefreqs.html
|
||||
//begins at C0. ends at B8
|
||||
static readonly float[] freqtbl = new[] {0,
|
||||
|
|
|
@ -191,10 +191,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
NameTableView.Refresh();
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
#region Menu and Context Menu
|
||||
|
@ -238,12 +234,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
private void NESNameTableViewer_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
if (_ppu != null)
|
||||
|
|
|
@ -322,10 +322,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
#region Menu and Context Menu
|
||||
|
@ -549,12 +545,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
toolStripStatusLabel1.Text = "Use CTRL+C to copy the pane under the mouse to the clipboard.";
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
private void PaletteView_MouseClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
HandleDefaultImage();
|
||||
|
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Windows.Forms;
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Emulation.Cores.PCEngine;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
|
@ -39,10 +38,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
}
|
||||
|
||||
#region Public API
|
||||
|
||||
public bool AskSaveChanges() { return true; }
|
||||
|
@ -140,8 +135,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#endregion
|
||||
|
||||
#region Dialog and Controls
|
||||
|
||||
private void Canvas_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
var vdc = _vdcType == 0 ? _pce.VDC1 : _pce.VDC2;
|
||||
|
@ -154,14 +147,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
PaletteLabel.Text = paletteNo.ToString();
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using BizHawk.Client.Common;
|
||||
using BizHawk.Emulation.Cores.PCEngine;
|
||||
using System.Drawing.Imaging;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
@ -237,15 +233,5 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
vce = emu.VCE;
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
base.OnShown(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ using BizHawk.Emulation.Common;
|
|||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public partial class TI83KeyPad : Form, IToolForm
|
||||
public partial class TI83KeyPad : ToolFormBase, IToolForm
|
||||
{
|
||||
[RequiredService]
|
||||
public TI83 Emu { get; private set; }
|
||||
|
@ -119,11 +119,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
KeyPadToolTips.RemoveAll();
|
||||
}
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
Owner = Global.Config.TI83KeypadSettings.FloatingWindow ? null : GlobalWin.MainForm;
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
#region Menu
|
||||
|
@ -169,7 +164,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void FloatingWindowMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.TI83KeypadSettings.FloatingWindow ^= true;
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Global.Config.TI83KeypadSettings.FloatingWindow);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -428,7 +423,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Global.Config.TI83KeypadSettings.FloatingWindow);
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -126,5 +126,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
columns[column.Name].Width = column.Width;
|
||||
}
|
||||
}
|
||||
|
||||
protected void RefreshFloatingWindowControl(bool floatingWindow)
|
||||
{
|
||||
Owner = floatingWindow ? null : GlobalWin.MainForm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -419,11 +419,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
#region Private
|
||||
|
||||
private void RefreshFloatingWindowControl()
|
||||
{
|
||||
Owner = Settings.FloatingWindow ? null : GlobalWin.MainForm;
|
||||
}
|
||||
|
||||
private void ToggleSearchDependentToolBarItems()
|
||||
{
|
||||
DoSearchToolButton.Enabled =
|
||||
|
@ -1384,7 +1379,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void FloatingWindowMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.FloatingWindow ^= true;
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Settings.FloatingWindow);
|
||||
}
|
||||
|
||||
private void RestoreDefaultsMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -1412,7 +1407,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
SetToFastMode();
|
||||
}
|
||||
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Settings.FloatingWindow);
|
||||
LoadColumnInfo(WatchListView, Settings.Columns);
|
||||
}
|
||||
|
||||
|
@ -1793,7 +1788,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Settings.FloatingWindow);
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -950,7 +950,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void FloatingWindowMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings.FloatingWindow ^= true;
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Settings.FloatingWindow);
|
||||
}
|
||||
|
||||
private void RestoreDefaultsMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -968,7 +968,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
Global.Config.DisplayRamWatch = false;
|
||||
|
||||
RefreshFloatingWindowControl();
|
||||
RefreshFloatingWindowControl(Settings.FloatingWindow);
|
||||
LoadColumnInfo(WatchListView, Settings.Columns);
|
||||
}
|
||||
|
||||
|
@ -1159,12 +1159,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
OrderColumn(e.Column);
|
||||
}
|
||||
|
||||
protected override void OnShown(EventArgs e)
|
||||
{
|
||||
RefreshFloatingWindowControl();
|
||||
base.OnShown(e);
|
||||
}
|
||||
|
||||
private void ErrorIconButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
var items = _watches
|
||||
|
|
Loading…
Reference in New Issue