diff --git a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
index b9f57f746c..9a6861f194 100644
--- a/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
+++ b/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj
@@ -585,9 +585,6 @@
Component
-
- Form
-
@@ -617,27 +614,12 @@
PrereqsAlert.cs
-
- Form
-
-
- QuickProgressPopup.cs
-
Component
Component
-
- Component
-
-
- Component
-
-
- Component
-
Component
@@ -1506,18 +1488,12 @@
ExceptionBox.cs
-
- InputConfigBase.cs
-
MsgBox.cs
PrereqsAlert.cs
-
- QuickProgressPopup.cs
-
MainForm.cs
Designer
diff --git a/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs b/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs
index b4353894c4..7fc33dbad7 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/ExceptionBox.cs
@@ -1,10 +1,5 @@
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;
namespace BizHawk.Client.EmuHawk
@@ -79,12 +74,10 @@ namespace BizHawk.Client.EmuHawk
{
protected override void OnPaint(PaintEventArgs e)
{
- Rectangle rc = this.ClientRectangle;
+ Rectangle rc = ClientRectangle;
StringFormat fmt = new StringFormat(StringFormat.GenericTypographic);
- using (var br = new SolidBrush(this.ForeColor))
- {
- e.Graphics.DrawString(this.Text, this.Font, br, rc, fmt);
- }
+ using var br = new SolidBrush(ForeColor);
+ e.Graphics.DrawString(this.Text, this.Font, br, rc, fmt);
}
}
diff --git a/BizHawk.Client.EmuHawk/CustomControls/HexTextBox.cs b/BizHawk.Client.EmuHawk/CustomControls/HexTextBox.cs
index 8a2e55146d..46b2229797 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/HexTextBox.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/HexTextBox.cs
@@ -12,21 +12,20 @@ namespace BizHawk.Client.EmuHawk
{
bool Nullable { get; }
int? ToRawInt();
- void SetFromRawInt(int? rawint);
+ void SetFromRawInt(int? rawInt);
}
public class HexTextBox : TextBox, INumberBox
{
private string _addressFormatStr = "";
private long? _maxSize;
- private bool _nullable = true;
public HexTextBox()
{
CharacterCasing = CharacterCasing.Upper;
}
- public bool Nullable { get { return _nullable; } set { _nullable = value; } }
+ public bool Nullable { get; set; } = true;
public void SetHexProperties(long domainSize)
{
@@ -38,10 +37,10 @@ namespace BizHawk.Client.EmuHawk
MaxLength = _maxSize.Value.NumHexDigits();
_addressFormatStr = $"{{0:X{MaxLength}}}";
- //try to preserve the old value, as best we can
+ // try to preserve the old value, as best we can
if(!wasMaxSizeSet)
ResetText();
- else if(_nullable)
+ else if (Nullable)
Text = "";
else if (MaxLength != currMaxLength)
{
@@ -65,7 +64,7 @@ namespace BizHawk.Client.EmuHawk
public override void ResetText()
{
- Text = _nullable ? "" : string.Format(_addressFormatStr, 0);
+ Text = Nullable ? "" : string.Format(_addressFormatStr, 0);
}
protected override void OnKeyPress(KeyPressEventArgs e)
@@ -179,14 +178,12 @@ namespace BizHawk.Client.EmuHawk
public class UnsignedIntegerBox : TextBox, INumberBox
{
- private bool _nullable = true;
-
public UnsignedIntegerBox()
{
CharacterCasing = CharacterCasing.Upper;
}
- public bool Nullable { get { return _nullable; } set { _nullable = value; } }
+ public bool Nullable { get; set; } = true;
protected override void OnKeyPress(KeyPressEventArgs e)
{
@@ -203,7 +200,7 @@ namespace BizHawk.Client.EmuHawk
public override void ResetText()
{
- Text = _nullable ? "" : "0";
+ Text = Nullable ? "" : "0";
}
protected override void OnKeyDown(KeyEventArgs e)
diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputConfigBase.cs b/BizHawk.Client.EmuHawk/CustomControls/InputConfigBase.cs
deleted file mode 100644
index 74318434a4..0000000000
--- a/BizHawk.Client.EmuHawk/CustomControls/InputConfigBase.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System.Collections.Generic;
-using System.Windows.Forms;
-
-namespace BizHawk.Client.EmuHawk
-{
- public class InputConfigBase : Form
- {
- public void CheckDups()
- {
- Dictionary dups = new Dictionary();
- foreach (Control c in Controls)
- {
- SmartTextBoxControl stbc = c as SmartTextBoxControl;
- if (stbc == null) continue;
- if (dups.ContainsKey(stbc.Text))
- {
- MessageBox.Show("DUP!");
- return;
- }
- dups[stbc.Text] = true;
- }
- }
-
- }
-}
\ No newline at end of file
diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputConfigBase.resx b/BizHawk.Client.EmuHawk/CustomControls/InputConfigBase.resx
deleted file mode 100644
index ff31a6db56..0000000000
--- a/BizHawk.Client.EmuHawk/CustomControls/InputConfigBase.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/BizHawk.Client.EmuHawk/CustomControls/MenuButton.cs b/BizHawk.Client.EmuHawk/CustomControls/MenuButton.cs
index e958b51710..098a503eda 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/MenuButton.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/MenuButton.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Drawing;
+using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel;
@@ -7,8 +6,6 @@ namespace BizHawk.Client.EmuHawk
{
public class MenuButton : Button
{
- public MenuButton() { }
-
[DefaultValue(null)]
public ContextMenuStrip Menu { get; set; }
@@ -30,7 +27,7 @@ namespace BizHawk.Client.EmuHawk
int arrowY = ClientRectangle.Height / 2 - 1;
Brush brush = Enabled ? SystemBrushes.ControlText : SystemBrushes.ButtonShadow;
- Point[] arrows = new Point[] { new Point(arrowX, arrowY), new Point(arrowX + 7, arrowY), new Point(arrowX + 3, arrowY + 4) };
+ Point[] arrows = { new Point(arrowX, arrowY), new Point(arrowX + 7, arrowY), new Point(arrowX + 3, arrowY + 4) };
pevent.Graphics.FillPolygon(brush, arrows);
}
}
diff --git a/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs b/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs
index 72fc189416..29fd1ec9ae 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/MiscControls.cs
@@ -18,23 +18,23 @@ namespace BizHawk.Client.EmuHawk
public class CustomCheckBox : CheckBox
{
- Color _CheckBackColor = SystemColors.Control;
+ Color _checkBackColor = SystemColors.Control;
public Color CheckBackColor
{
- get { return _CheckBackColor; }
- set { _CheckBackColor = value; Refresh(); }
+ get => _checkBackColor;
+ set { _checkBackColor = value; Refresh(); }
}
- bool? _ForceChecked;
+ bool? _forceChecked;
public bool? ForceChecked
{
- get { return _ForceChecked; }
- set { _ForceChecked = value; Refresh(); }
+ get => _forceChecked;
+ set { _forceChecked = value; Refresh(); }
}
protected override void OnPaint(PaintEventArgs pevent)
{
- //draw text-label part of the control with something so that it isn't hallofmirrorsy
+ // draw text-label part of the control with something so that it isn't hallofmirrorsy
using(var brush = new SolidBrush(Parent.BackColor))
pevent.Graphics.FillRectangle(brush, ClientRectangle);
@@ -42,11 +42,11 @@ namespace BizHawk.Client.EmuHawk
var glyphLoc = ClientRectangle;
glyphLoc.Size = SystemInformation.MenuCheckSize;
- //draw the selectedbackdrop color roughly where the glyph belongs
- using (var brush = new SolidBrush(_CheckBackColor))
+ // draw the selectedbackdrop color roughly where the glyph belongs
+ using (var brush = new SolidBrush(_checkBackColor))
pevent.Graphics.FillRectangle(brush, glyphLoc);
- //draw a checkbox menu glyph (we could do this more elegantly with DrawFrameControl)
+ // draw a checkbox menu glyph (we could do this more elegantly with DrawFrameControl)
bool c = CheckState == CheckState.Checked;
if (ForceChecked.HasValue)
{
@@ -59,7 +59,7 @@ namespace BizHawk.Client.EmuHawk
ControlPaint.DrawMenuGlyph(pevent.Graphics, glyphLoc, MenuGlyph.Checkmark, Color.Black, Color.Transparent);
}
- //draw a border on top of it all
+ // draw a border on top of it all
ControlPaint.DrawBorder3D(pevent.Graphics, r, Border3DStyle.Sunken);
//stuff that didnt work
diff --git a/BizHawk.Client.EmuHawk/CustomControls/PrereqsAlert.cs b/BizHawk.Client.EmuHawk/CustomControls/PrereqsAlert.cs
index eed2e55938..8ba01ec39b 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/PrereqsAlert.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/PrereqsAlert.cs
@@ -1,21 +1,17 @@
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;
namespace BizHawk.Client.EmuHawk.CustomControls
{
public partial class PrereqsAlert : Form
{
- public PrereqsAlert(bool warn_only)
+ public PrereqsAlert(bool warnOnly)
{
InitializeComponent();
- if (warn_only)
+ if (warnOnly)
+ {
button1.Text = "Continue";
+ }
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
diff --git a/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.Designer.cs b/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.Designer.cs
deleted file mode 100644
index bee1d1a55b..0000000000
--- a/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.Designer.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-namespace BizHawk.Client.EmuHawk
-{
- partial class QuickProgressPopup
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- this.progressBar = new System.Windows.Forms.ProgressBar();
- this.lblProgress = new System.Windows.Forms.Label();
- this.SuspendLayout();
- //
- // progressBar
- //
- this.progressBar.Location = new System.Drawing.Point(12, 12);
- this.progressBar.Name = "progressBar";
- this.progressBar.Size = new System.Drawing.Size(194, 23);
- this.progressBar.TabIndex = 0;
- //
- // lblProgress
- //
- this.lblProgress.AutoSize = true;
- this.lblProgress.Location = new System.Drawing.Point(12, 41);
- this.lblProgress.Margin = new System.Windows.Forms.Padding(3);
- this.lblProgress.Name = "lblProgress";
- this.lblProgress.Size = new System.Drawing.Size(35, 13);
- this.lblProgress.TabIndex = 1;
- this.lblProgress.Text = "label1";
- //
- // QuickProgressPopup
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.AutoSize = true;
- this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.ClientSize = new System.Drawing.Size(229, 63);
- this.ControlBox = false;
- this.Controls.Add(this.lblProgress);
- this.Controls.Add(this.progressBar);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "QuickProgressPopup";
- this.Text = "Please wait...";
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.ProgressBar progressBar;
- private System.Windows.Forms.Label lblProgress;
- }
-}
\ No newline at end of file
diff --git a/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.cs b/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.cs
deleted file mode 100644
index 3804c354a1..0000000000
--- a/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-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;
-
-namespace BizHawk.Client.EmuHawk
-{
- public partial class QuickProgressPopup : Form
- {
- public QuickProgressPopup()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.resx b/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.resx
deleted file mode 100644
index 29dcb1b3a3..0000000000
--- a/BizHawk.Client.EmuHawk/CustomControls/QuickProgressPopup.resx
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/BizHawk.Client.EmuHawk/CustomControls/ReadonlyCheckbox.cs b/BizHawk.Client.EmuHawk/CustomControls/ReadonlyCheckbox.cs
deleted file mode 100644
index d7895ca95e..0000000000
--- a/BizHawk.Client.EmuHawk/CustomControls/ReadonlyCheckbox.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Windows.Forms;
-
-namespace BizHawk.Client.EmuHawk
-{
- public class ReadonlyCheckBox : CheckBox
- {
- protected override void OnClick(EventArgs e)
- {
- // Do nothing
- }
- }
-}
diff --git a/BizHawk.Client.EmuHawk/CustomControls/RepeatButton.cs b/BizHawk.Client.EmuHawk/CustomControls/RepeatButton.cs
index 91a03a8b4c..45e6d84f6e 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/RepeatButton.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/RepeatButton.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Data;
using System.Windows.Forms;
namespace BizHawk.Client.EmuHawk
@@ -9,83 +6,77 @@ namespace BizHawk.Client.EmuHawk
// http://www.codeproject.com/Articles/2130/NET-port-of-Joe-s-AutoRepeat-Button-class
public class RepeatButton : Button
{
- private Timer m_timer;
- private bool down = false;
- private bool once = false;
- private int m_initdelay = 1000;
- private int m_repdelay = 400;
+ private readonly Timer _mTimer;
+ private bool _down;
+ private bool _once;
+ private int _mInitDelay = 1000;
+ private int _mRepeatDelay = 400;
public RepeatButton()
{
- this.MouseUp +=
- new MouseEventHandler(RepeatButton_MouseUp);
- this.MouseDown +=
- new MouseEventHandler(RepeatButton_MouseDown);
+ MouseUp += RepeatButton_MouseUp;
+ MouseDown += RepeatButton_MouseDown;
- m_timer = new Timer();
- m_timer.Tick += new EventHandler(timerproc);
- m_timer.Enabled = false;
+ _mTimer = new Timer();
+ _mTimer.Tick += TimerProcess;
+ _mTimer.Enabled = false;
}
- private void timerproc(object o1, EventArgs e1)
+ private void TimerProcess(object o1, EventArgs e1)
{
- m_timer.Interval = m_repdelay;
- if (down)
+ _mTimer.Interval = _mRepeatDelay;
+ if (_down)
{
- once = true;
- this.PerformClick();
+ _once = true;
+ PerformClick();
}
}
protected override void OnClick(EventArgs e)
{
- if (!once || down)
+ if (!_once || _down)
+ {
base.OnClick(e);
+ }
}
-
-
- private void RepeatButton_MouseDown(object sender,
- System.Windows.Forms.MouseEventArgs e)
+ private void RepeatButton_MouseDown(object sender, MouseEventArgs e)
{
- m_timer.Interval = m_initdelay;
- m_timer.Enabled = true;
- down = true;
+ _mTimer.Interval = _mInitDelay;
+ _mTimer.Enabled = true;
+ _down = true;
}
- private void RepeatButton_MouseUp(object sender,
- System.Windows.Forms.MouseEventArgs e)
+ private void RepeatButton_MouseUp(object sender, MouseEventArgs e)
{
- m_timer.Enabled = false;
- down = false;
+ _mTimer.Enabled = false;
+ _down = false;
}
public int InitialDelay
{
- get
- {
- return m_initdelay;
- }
+ get => _mInitDelay;
set
{
- m_initdelay = value;
- if (m_initdelay < 10)
- m_initdelay = 10;
+ _mInitDelay = value;
+ if (_mInitDelay < 10)
+ {
+ _mInitDelay = 10;
+ }
}
}
public int RepeatDelay
{
- get
- {
- return m_repdelay;
- }
+ get => _mRepeatDelay;
set
{
- m_repdelay = value;
- if (m_repdelay < 10)
- m_repdelay = 10;
+ _mRepeatDelay = value;
+ if (_mRepeatDelay < 10)
+ {
+ _mRepeatDelay = 10;
+ }
}
}
diff --git a/BizHawk.Client.EmuHawk/CustomControls/SmartTextBoxControl.cs b/BizHawk.Client.EmuHawk/CustomControls/SmartTextBoxControl.cs
deleted file mode 100644
index 1813a9feb5..0000000000
--- a/BizHawk.Client.EmuHawk/CustomControls/SmartTextBoxControl.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Windows.Forms;
-
-namespace BizHawk.Client.EmuHawk
-{
- public class SmartTextBoxControl : TextBox
- {
- public SmartTextBoxControl()
- {
- ReadOnly = true;
- }
- protected override void OnKeyDown(KeyEventArgs e)
- {
- base.Text = e.KeyCode.ToString();
- OnTextChanged(new EventArgs());
- }
-
- protected override void OnKeyPress(KeyPressEventArgs e)
- {
-
- }
-
- protected override void OnKeyUp(KeyEventArgs e)
- {
- }
-
- public override string Text
- {
- get { return base.Text; }
- set { }
- }
-
- }
-}
\ No newline at end of file
diff --git a/BizHawk.Client.EmuHawk/CustomControls/TextDebugView.cs b/BizHawk.Client.EmuHawk/CustomControls/TextDebugView.cs
deleted file mode 100644
index 33f83808ac..0000000000
--- a/BizHawk.Client.EmuHawk/CustomControls/TextDebugView.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using System.Drawing;
-using System.Windows.Forms;
-
-namespace BizHawk.Client.EmuHawk
-{
- public class TextDebugView : Control
- {
- public TextDebugView()
- {
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- SetStyle(ControlStyles.Opaque, true);
- SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
- }
- protected override void OnPaint(PaintEventArgs e)
- {
- base.OnPaint(e);
- e.Graphics.Clear(SystemColors.Control);
- using var font = new Font(new FontFamily("Courier New"), 8);
- e.Graphics.DrawString(Text, font, Brushes.Black,0,0);
- }
-
- public override string Text
- {
- get
- {
- return base.Text;
- }
- set
- {
- base.Text = value;
- Invalidate();
- }
- }
- }
-
- public class TextDebugForm : Form
- {
- public TextDebugView view = new TextDebugView();
- public TextDebugForm()
- {
- view.Dock = DockStyle.Fill;
- Controls.Add(view);
- }
-
- public override string Text
- {
- get
- {
- return view.Text;
- }
- set
- {
- view.Text = value;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/BizHawk.Client.EmuHawk/CustomControls/TransparentTrackbar.cs b/BizHawk.Client.EmuHawk/CustomControls/TransparentTrackbar.cs
index 2ac7c1104f..69451ecba8 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/TransparentTrackbar.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/TransparentTrackbar.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Windows.Forms;
+using System.Windows.Forms;
namespace BizHawk.Client.EmuHawk
{
diff --git a/BizHawk.Client.EmuHawk/CustomControls/ViewportPanel.cs b/BizHawk.Client.EmuHawk/CustomControls/ViewportPanel.cs
index f33deb75ae..34a1e78fa8 100644
--- a/BizHawk.Client.EmuHawk/CustomControls/ViewportPanel.cs
+++ b/BizHawk.Client.EmuHawk/CustomControls/ViewportPanel.cs
@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Threading;
using System.Drawing;
-using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
@@ -130,15 +129,6 @@ namespace BizHawk.Client.EmuHawk
ewh.Set();
}
- //Size logicalSize;
- ////int pitch;
- //public void SetLogicalSize(int w, int h)
- //{
- // if (bmp != null) bmp.Dispose();
- // bmp = new Bitmap(w, h, PixelFormat.Format32bppArgb);
- // logicalSize = new Size(w, h);
- //}
-
///
/// Takes ownership of the provided bitmap and will use it for future painting
///
@@ -172,68 +162,5 @@ namespace BizHawk.Client.EmuHawk
SignalPaint();
base.OnPaint(e);
}
-
- }
-
- ///
- /// A dumb panel which functions as a placeholder for framebuffer painting
- ///
- public class ViewportPanel : Control
- {
- public ViewportPanel()
- {
- SetStyle(ControlStyles.AllPaintingInWmPaint, true);
- SetStyle(ControlStyles.UserPaint, true);
- SetStyle(ControlStyles.DoubleBuffer, true);
- SetStyle(ControlStyles.Opaque, true);
- SetStyle(ControlStyles.UserMouse, true);
- }
- }
-
- ///
- /// A ViewportPanel with a vertical scroll bar
- ///
- public class ScrollableViewportPanel : UserControl
- {
- TableLayoutPanel table;
- ViewportPanel view;
- VScrollBar scroll;
-
- public ViewportPanel View { get { return view; } }
- public VScrollBar Scrollbar { get { return scroll; } }
-
- public int ScrollMax { get { return Scrollbar.Maximum; } set { Scrollbar.Maximum = value; } }
- public int ScrollLargeChange { get { return Scrollbar.LargeChange; } set { Scrollbar.LargeChange = value; } }
-
- public ScrollableViewportPanel()
- {
- InitializeComponent();
- }
-
- public void InitializeComponent()
- {
- table = new TableLayoutPanel();
- view = new ViewportPanel();
- scroll = new VScrollBar();
-
- scroll.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
- view.Dock = DockStyle.Fill;
-
- table.Dock = DockStyle.Fill;
- table.RowStyles.Add(new RowStyle(SizeType.Percent, 100));
- table.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100));
- table.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize, 0));
- table.RowCount = 1;
- table.ColumnCount = 2;
- table.Controls.Add(view);
- table.Controls.Add(scroll);
- table.SetColumn(view, 0);
- table.SetColumn(scroll, 1);
-
- scroll.Scroll += (sender, e) => OnScroll(e);
- view.Paint += (sender, e) => OnPaint(e);
-
- Controls.Add(table);
- }
}
}
\ No newline at end of file
diff --git a/BizHawk.Client.EmuHawk/config/InputWidget.cs b/BizHawk.Client.EmuHawk/config/InputWidget.cs
index c34c500d5f..9e4de69f3d 100644
--- a/BizHawk.Client.EmuHawk/config/InputWidget.cs
+++ b/BizHawk.Client.EmuHawk/config/InputWidget.cs
@@ -52,11 +52,7 @@ namespace BizHawk.Client.EmuHawk
public string Bindings
{
- get
- {
- return Text;
- }
-
+ get => Text;
set
{
ClearBindings();
diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings
index baf662f40f..2a16d4d221 100644
--- a/BizHawk.sln.DotSettings
+++ b/BizHawk.sln.DotSettings
@@ -256,6 +256,7 @@
True
True
True
+ True
True
True
True