diff --git a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs index a7c1a5a6e5..4d734c0dd2 100644 --- a/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs @@ -47,11 +47,11 @@ namespace BizHawk.Client.EmuHawk public int LagFramesToHide { get; set; } public bool HideWasLagFrames { get; set; } - public bool AllowRightClickSelecton { get; set; } + public bool AllowRightClickSelection { get; set; } public bool LetKeysModifySelection { get; set; } public bool SuspendHotkeys { get; set; } - private Font _font = new Font("Arial", 8, FontStyle.Bold); + private readonly Font _font = new Font("Arial", 8, FontStyle.Bold); public InputRoll() { @@ -299,7 +299,7 @@ namespace BizHawk.Client.EmuHawk public string ScrollMethod { get; set; } /// - /// Gets or sets a value indicating how the Intever for the hover event + /// Gets or sets a value indicating how the scrolling behavior for the hover event /// [Category("Behavior")] public bool AlwaysScroll { get; set; } @@ -453,8 +453,8 @@ namespace BizHawk.Client.EmuHawk NewCell = newCell; } - public Cell OldCell { get; private set; } - public Cell NewCell { get; private set; } + public Cell OldCell { get; } + public Cell NewCell { get; } } public class ColumnClickEventArgs @@ -464,7 +464,7 @@ namespace BizHawk.Client.EmuHawk Column = column; } - public RollColumn Column { get; private set; } + public RollColumn Column { get; } } public class ColumnReorderedEventArgs @@ -476,9 +476,9 @@ namespace BizHawk.Client.EmuHawk NewDisplayIndex = newDisplayIndex; } - public RollColumn Column { get; private set; } - public int OldDisplayIndex { get; private set; } - public int NewDisplayIndex { get; private set; } + public RollColumn Column { get; } + public int OldDisplayIndex { get; } + public int NewDisplayIndex { get; } } #endregion @@ -661,7 +661,7 @@ namespace BizHawk.Client.EmuHawk [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public int FirstVisibleRow { - get // SuuperW: This was checking if the scroll bars were needed, which is useless because their Value is 0 if they aren't needed. + get { if (HorizontalOrientation) { @@ -995,7 +995,7 @@ namespace BizHawk.Client.EmuHawk #region Mouse and Key Events private bool _columnDownMoved; - private int _previousX = 0; // TODO: move me + private int _previousX; // TODO: move me protected override void OnMouseMove(MouseEventArgs e) { @@ -1085,7 +1085,7 @@ namespace BizHawk.Client.EmuHawk { if (!GlobalWin.MainForm.EmulatorPaused && _currentX.HasValue) { - // copypaste from OnMouseMove() + // TODO: this is copy pasta from OnMouseMove() Cell newCell = CalculatePointedCell(_currentX.Value, _currentY.Value); if (QueryFrameLag != null && newCell.RowIndex.HasValue) { @@ -1225,7 +1225,6 @@ namespace BizHawk.Client.EmuHawk } else if (ModifierKeys != Keys.Shift) { - var hadIndex = _selectedItems.Any(); _selectedItems.Clear(); SelectCell(CurrentCell); } @@ -1238,7 +1237,7 @@ namespace BizHawk.Client.EmuHawk base.OnMouseDown(e); - if (AllowRightClickSelecton && e.Button == MouseButtons.Right) + if (AllowRightClickSelection && e.Button == MouseButtons.Right) { if (!IsHoveringOnColumnCell && CurrentCell != null) { @@ -1729,6 +1728,7 @@ namespace BizHawk.Client.EmuHawk /// If FullRowSelect is enabled, selects all cells in the row that contains the given cell. Otherwise only given cell is added. /// /// The cell to select. + /// Specifies whether or not to toggle the current state, rather than force the value to true private void SelectCell(Cell cell, bool toggle = false) { if (cell.RowIndex.HasValue && cell.RowIndex < RowCount) @@ -1906,7 +1906,7 @@ namespace BizHawk.Client.EmuHawk /// Converts a horizontal or vertical coordinate to a row number. /// /// A vertical coordinate if Vertical Oriented, otherwise a horizontal coordinate. - /// A row number between 0 and VisibleRows if it is a Datarow, otherwise a negative number if above all Datarows. + /// A row number between 0 and VisibleRows if it is a data row, otherwise a negative number if above all Datarows. private int PixelsToRows(int pixels) { // Using Math.Floor and float because integer division rounds towards 0 but we want to round down. diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.Designer.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.Designer.cs index 3e91765166..da6880ddde 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.Designer.cs @@ -148,7 +148,7 @@ // this.BranchView.AllowColumnReorder = false; this.BranchView.AllowColumnResize = false; - this.BranchView.AllowRightClickSelecton = true; + this.BranchView.AllowRightClickSelection = true; this.BranchView.AlwaysScroll = false; this.BranchView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs index a3726d0fe4..57eb976625 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.Designer.cs @@ -187,7 +187,7 @@ // this.MarkerView.AllowColumnReorder = false; this.MarkerView.AllowColumnResize = false; - this.MarkerView.AllowRightClickSelecton = true; + this.MarkerView.AllowRightClickSelection = true; this.MarkerView.AlwaysScroll = false; this.MarkerView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs index 8972f50607..7a154e5ccf 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Designer.cs @@ -1230,7 +1230,7 @@ namespace BizHawk.Client.EmuHawk // this.TasView.AllowColumnReorder = false; this.TasView.AllowColumnResize = false; - this.TasView.AllowRightClickSelecton = false; + this.TasView.AllowRightClickSelection = false; this.TasView.AlwaysScroll = false; this.TasView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings index b6b12fa574..e6b55cb2f1 100644 --- a/BizHawk.sln.DotSettings +++ b/BizHawk.sln.DotSettings @@ -192,6 +192,8 @@ True True True + True + True True True True