From 718b671730a807005d025c16bf255f0c49aef763 Mon Sep 17 00:00:00 2001 From: Sour Date: Mon, 11 Jun 2018 19:27:35 -0400 Subject: [PATCH] UI: Fixed warnings found by xbuild 14.0 --- GUI.NET/Config/DebugInfo.cs | 2 +- GUI.NET/Controls/MyListView.cs | 1 - GUI.NET/Debugger/Controls/ctrlAddressList.Designer.cs | 2 -- GUI.NET/Debugger/Controls/ctrlChrViewer.cs | 1 - GUI.NET/Debugger/Controls/ctrlDbgShortcuts.cs | 2 -- GUI.NET/Debugger/Controls/ctrlDebuggerCode.Designer.cs | 2 -- GUI.NET/Debugger/Controls/ctrlDebuggerCode.cs | 2 -- GUI.NET/Debugger/Controls/ctrlFunctionList.cs | 1 - GUI.NET/Debugger/Controls/ctrlHexViewer.Designer.cs | 2 -- GUI.NET/Debugger/Controls/ctrlMemoryMapping.cs | 2 -- GUI.NET/Debugger/Controls/ctrlSourceViewer.cs | 1 - GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs | 2 -- GUI.NET/Debugger/Controls/ctrlTextbox.cs | 2 -- GUI.NET/Debugger/FastColoredTextBox/FastColoredTextBox.cs | 4 ---- GUI.NET/Debugger/FastColoredTextBox/FileTextSource.cs | 1 - GUI.NET/Debugger/FastColoredTextBox/TypeDescriptor.cs | 2 -- GUI.NET/Debugger/HexBox/HexBox.cs | 4 ---- GUI.NET/Debugger/TblLoader.cs | 1 - GUI.NET/Debugger/frmDebugger.cs | 2 +- GUI.NET/Debugger/frmEventViewer.cs | 3 --- GUI.NET/Debugger/frmTraceLogger.cs | 1 - GUI.NET/Forms/Cheats/frmCheatImportFromDb.cs | 1 - GUI.NET/Forms/Config/frmInputConfig.cs | 1 - GUI.NET/Forms/Config/frmVideoConfig.cs | 1 - GUI.NET/Forms/frmConfigWizard.cs | 2 -- GUI.NET/Forms/frmMain.Tests.cs | 2 +- GUI.NET/Forms/frmMain.cs | 2 -- GUI.NET/GoogleDriveIntegration/CloudSyncHelper.cs | 1 - GUI.NET/GoogleDriveIntegration/GoogleDriveAccessor.cs | 4 ---- GUI.NET/Program.cs | 4 ++-- 30 files changed, 5 insertions(+), 53 deletions(-) diff --git a/GUI.NET/Config/DebugInfo.cs b/GUI.NET/Config/DebugInfo.cs index e198dc76..e0e6e353 100644 --- a/GUI.NET/Config/DebugInfo.cs +++ b/GUI.NET/Config/DebugInfo.cs @@ -52,7 +52,7 @@ namespace Mesen.GUI.Config private static DebugWorkspace Deserialize(string path) { - DebugWorkspace config = config = new DebugWorkspace(); + DebugWorkspace config = new DebugWorkspace(); if(File.Exists(path)) { try { diff --git a/GUI.NET/Controls/MyListView.cs b/GUI.NET/Controls/MyListView.cs index e452cfde..782b7488 100644 --- a/GUI.NET/Controls/MyListView.cs +++ b/GUI.NET/Controls/MyListView.cs @@ -80,7 +80,6 @@ namespace Mesen.GUI.Controls var item = this.Items[e.Item]; AfterEdit?.Invoke(this, new LabelEditEventArgs(item.Index, text)); } else if(_pressedEsc) { - string text = _originalText; var originalItem = this.Items[e.Item]; var newItem = new ListViewItem(_originalText); newItem.SubItems.Add(originalItem.SubItems[1].Text); diff --git a/GUI.NET/Debugger/Controls/ctrlAddressList.Designer.cs b/GUI.NET/Debugger/Controls/ctrlAddressList.Designer.cs index a7742361..9c667daa 100644 --- a/GUI.NET/Debugger/Controls/ctrlAddressList.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlAddressList.Designer.cs @@ -30,7 +30,6 @@ this.components = new System.ComponentModel.Container(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.ctrlDataViewer = new Mesen.GUI.Debugger.ctrlScrollableTextbox(); - this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // @@ -75,6 +74,5 @@ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private ctrlScrollableTextbox ctrlDataViewer; - private System.Windows.Forms.ToolTip toolTip; } } diff --git a/GUI.NET/Debugger/Controls/ctrlChrViewer.cs b/GUI.NET/Debugger/Controls/ctrlChrViewer.cs index 932b39e8..1b309d37 100644 --- a/GUI.NET/Debugger/Controls/ctrlChrViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlChrViewer.cs @@ -420,7 +420,6 @@ namespace Mesen.GUI.Debugger.Controls private void ctxMenu_Opening(object sender, CancelEventArgs e) { int baseAddress = _bottomBank ? 0x1000 : 0x0000; - bool ppuMemory = this.cboChrSelection.SelectedIndex == 0; if(this.cboChrSelection.SelectedIndex > 1) { baseAddress += (this.cboChrSelection.SelectedIndex - 1) * 0x2000; } diff --git a/GUI.NET/Debugger/Controls/ctrlDbgShortcuts.cs b/GUI.NET/Debugger/Controls/ctrlDbgShortcuts.cs index 207c8b16..903a6b22 100644 --- a/GUI.NET/Debugger/Controls/ctrlDbgShortcuts.cs +++ b/GUI.NET/Debugger/Controls/ctrlDbgShortcuts.cs @@ -35,8 +35,6 @@ namespace Mesen.GUI.Debugger public void InitializeGrid() { - HashSet keyCombinations = new HashSet(); - gridShortcuts.Rows.Clear(); foreach(FieldInfo shortcut in _shortcuts) { diff --git a/GUI.NET/Debugger/Controls/ctrlDebuggerCode.Designer.cs b/GUI.NET/Debugger/Controls/ctrlDebuggerCode.Designer.cs index a85124bb..343cf7c8 100644 --- a/GUI.NET/Debugger/Controls/ctrlDebuggerCode.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlDebuggerCode.Designer.cs @@ -28,7 +28,6 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.ctrlCodeViewer = new Mesen.GUI.Debugger.ctrlScrollableTextbox(); this.contextMenuMargin = new System.Windows.Forms.ContextMenuStrip(this.components); this.mnuEditBreakpoint = new System.Windows.Forms.ToolStripMenuItem(); @@ -151,7 +150,6 @@ #endregion - private System.Windows.Forms.ToolTip toolTip; private Mesen.GUI.Debugger.ctrlScrollableTextbox ctrlCodeViewer; private System.Windows.Forms.ContextMenuStrip contextMenuMargin; private System.Windows.Forms.ToolStripMenuItem mnuRemoveBreakpoint; diff --git a/GUI.NET/Debugger/Controls/ctrlDebuggerCode.cs b/GUI.NET/Debugger/Controls/ctrlDebuggerCode.cs index 7bfe59ec..8666b77a 100644 --- a/GUI.NET/Debugger/Controls/ctrlDebuggerCode.cs +++ b/GUI.NET/Debugger/Controls/ctrlDebuggerCode.cs @@ -36,7 +36,6 @@ namespace Mesen.GUI.Debugger private UInt32? _currentActiveAddress { get; set; } = null; - private Point _previousLocation; private DebugViewInfo _config; private CodeTooltipManager _tooltipManager = null; private CodeViewerActions _codeViewerActions; @@ -365,7 +364,6 @@ namespace Mesen.GUI.Debugger this.ctrlCodeViewer.ContextMenuStrip = _codeViewerActions.contextMenu; } - _previousLocation = e.Location; _tooltipManager.ProcessMouseMove(e.Location); } diff --git a/GUI.NET/Debugger/Controls/ctrlFunctionList.cs b/GUI.NET/Debugger/Controls/ctrlFunctionList.cs index efec5d22..317a836d 100644 --- a/GUI.NET/Debugger/Controls/ctrlFunctionList.cs +++ b/GUI.NET/Debugger/Controls/ctrlFunctionList.cs @@ -183,7 +183,6 @@ namespace Mesen.GUI.Debugger.Controls private void mnuAddBreakpoint_Click(object sender, EventArgs e) { if(lstFunctions.SelectedIndices.Count > 0) { - CodeLabel label = GetSelectedItem().Tag as CodeLabel; int absoluteAddress = (int)GetSelectedItem().SubItems[2].Tag; BreakpointManager.AddBreakpoint(new Breakpoint() { MemoryType = DebugMemoryType.PrgRom, diff --git a/GUI.NET/Debugger/Controls/ctrlHexViewer.Designer.cs b/GUI.NET/Debugger/Controls/ctrlHexViewer.Designer.cs index 77eabf2f..6eeb7f1f 100644 --- a/GUI.NET/Debugger/Controls/ctrlHexViewer.Designer.cs +++ b/GUI.NET/Debugger/Controls/ctrlHexViewer.Designer.cs @@ -43,7 +43,6 @@ this.chkTextSearch = new System.Windows.Forms.CheckBox(); this.chkMatchCase = new System.Windows.Forms.CheckBox(); this.ctrlHexBox = new Be.Windows.Forms.HexBox(); - this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.lblLocation = new System.Windows.Forms.ToolStripStatusLabel(); this.ctxMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); @@ -495,7 +494,6 @@ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.Label lblNumberOfColumns; private System.Windows.Forms.ComboBox cboNumberColumns; - private System.Windows.Forms.ToolTip toolTip; private Be.Windows.Forms.HexBox ctrlHexBox; private System.Windows.Forms.Panel panelSearch; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; diff --git a/GUI.NET/Debugger/Controls/ctrlMemoryMapping.cs b/GUI.NET/Debugger/Controls/ctrlMemoryMapping.cs index 0a7bfcdc..713492fc 100644 --- a/GUI.NET/Debugger/Controls/ctrlMemoryMapping.cs +++ b/GUI.NET/Debugger/Controls/ctrlMemoryMapping.cs @@ -118,8 +118,6 @@ namespace Mesen.GUI.Debugger.Controls float pixelsPerByte = (float)rect.Width / totalSize; - StringFormat verticalFormat = new StringFormat(StringFormatFlags.DirectionVertical); - float currentPosition = 1; int byteOffset = 0; foreach(MemoryRegionInfo region in _regions) { diff --git a/GUI.NET/Debugger/Controls/ctrlSourceViewer.cs b/GUI.NET/Debugger/Controls/ctrlSourceViewer.cs index 70e4f410..28d30eff 100644 --- a/GUI.NET/Debugger/Controls/ctrlSourceViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlSourceViewer.cs @@ -422,7 +422,6 @@ namespace Mesen.GUI.Debugger.Controls class ScrollbarColorProvider : IScrollbarColorProvider { - private Color _nesRamColor = Color.FromArgb(163, 222, 171); private Dictionary _breakpointColors = new Dictionary(); private ctrlSourceViewer _viewer; diff --git a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs index 434bf4b9..4b1f642a 100644 --- a/GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs +++ b/GUI.NET/Debugger/Controls/ctrlSpriteViewer.cs @@ -260,8 +260,6 @@ namespace Mesen.GUI.Debugger.Controls _selectedSprite = -1; for(int i = 0x100 - 4; i >= 0; i-=4) { int spriteY = _spriteRam[i]; - int tileIndex = _spriteRam[i + 1]; - int attributes = _spriteRam[i + 2]; int spriteX = _spriteRam[i + 3]; if(xPos >= spriteX && xPos < spriteX + 8 && yPos >= spriteY && yPos < spriteY + (_largeSprites ? 16 : 8)) { diff --git a/GUI.NET/Debugger/Controls/ctrlTextbox.cs b/GUI.NET/Debugger/Controls/ctrlTextbox.cs index f733d48c..455bc3bf 100644 --- a/GUI.NET/Debugger/Controls/ctrlTextbox.cs +++ b/GUI.NET/Debugger/Controls/ctrlTextbox.cs @@ -58,7 +58,6 @@ namespace Mesen.GUI.Debugger private string[] _contentNotes = new string[0]; private string[] _compareContents = null; private int[] _lineNumbers = new int[0]; - private int[] _lineMargins = new int[0]; private string[] _lineNumberNotes = new string[0]; private Dictionary _lineNumberIndex = new Dictionary(); private bool _showLineNumbers = false; @@ -889,7 +888,6 @@ namespace Mesen.GUI.Debugger codeString = "--------" + codeString.Substring(2, codeString.Length - 4) + "--------"; } - string commentString = Comments?[i].Trim() ?? ""; int padding = Math.Max(CommentSpacingCharCount, codeString.Length); if(codeString.Length == 0) { padding = 0; diff --git a/GUI.NET/Debugger/FastColoredTextBox/FastColoredTextBox.cs b/GUI.NET/Debugger/FastColoredTextBox/FastColoredTextBox.cs index 17cded80..1fb0dae5 100644 --- a/GUI.NET/Debugger/FastColoredTextBox/FastColoredTextBox.cs +++ b/GUI.NET/Debugger/FastColoredTextBox/FastColoredTextBox.cs @@ -4831,7 +4831,6 @@ namespace FastColoredTextBoxNS e.Graphics.FillRectangle(paddingBrush, LeftIndent - HorizontalScroll.Value - 2, 0, Math.Max(0, Paddings.Left - 1), ClientSize.Height); // - int leftTextIndent = Math.Max(LeftIndent, LeftIndent + Paddings.Left - HorizontalScroll.Value); int textWidth = textAreaRect.Width; //draw indent area e.Graphics.FillRectangle(indentBrush, 0, 0, LeftIndentLine, ClientSize.Height); @@ -5083,7 +5082,6 @@ namespace FastColoredTextBoxNS var state = graphics.Save(); graphics.SmoothingMode = SmoothingMode.HighQuality; graphics.TranslateTransform(rect.Left + h/2, rect.Top + h/2); - var ts = new TimeSpan(DateTime.Now.Ticks); graphics.RotateTransform(180 * (DateTime.Now.Millisecond/1000f)); using (var pen = new Pen(Color.Red, 2)) { @@ -6770,7 +6768,6 @@ namespace FastColoredTextBoxNS /// public virtual void InsertLinePrefix(string prefix) { - Range old = Selection.Clone(); int from = Math.Min(Selection.Start.iLine, Selection.End.iLine); int to = Math.Max(Selection.Start.iLine, Selection.End.iLine); BeginUpdate(); @@ -6798,7 +6795,6 @@ namespace FastColoredTextBoxNS /// public virtual void RemoveLinePrefix(string prefix) { - Range old = Selection.Clone(); int from = Math.Min(Selection.Start.iLine, Selection.End.iLine); int to = Math.Max(Selection.Start.iLine, Selection.End.iLine); BeginUpdate(); diff --git a/GUI.NET/Debugger/FastColoredTextBox/FileTextSource.cs b/GUI.NET/Debugger/FastColoredTextBox/FileTextSource.cs index 3049ce9c..89f8259d 100644 --- a/GUI.NET/Debugger/FastColoredTextBox/FileTextSource.cs +++ b/GUI.NET/Debugger/FastColoredTextBox/FileTextSource.cs @@ -54,7 +54,6 @@ namespace FastColoredTextBoxNS private void UnloadUnusedLines() { const int margin = 2000; - var iStartVisibleLine = CurrentTB.VisibleRange.Start.iLine; var iFinishVisibleLine = CurrentTB.VisibleRange.End.iLine; int count = 0; diff --git a/GUI.NET/Debugger/FastColoredTextBox/TypeDescriptor.cs b/GUI.NET/Debugger/FastColoredTextBox/TypeDescriptor.cs index d84c37ac..918dd5ad 100644 --- a/GUI.NET/Debugger/FastColoredTextBox/TypeDescriptor.cs +++ b/GUI.NET/Debugger/FastColoredTextBox/TypeDescriptor.cs @@ -30,13 +30,11 @@ namespace FastColoredTextBoxNS class FCTBTypeDescriptor : CustomTypeDescriptor { - ICustomTypeDescriptor parent; object instance; public FCTBTypeDescriptor(ICustomTypeDescriptor parent, object instance) : base(parent) { - this.parent = parent; this.instance = instance; } diff --git a/GUI.NET/Debugger/HexBox/HexBox.cs b/GUI.NET/Debugger/HexBox/HexBox.cs index 21fc23ca..6b352a61 100644 --- a/GUI.NET/Debugger/HexBox/HexBox.cs +++ b/GUI.NET/Debugger/HexBox/HexBox.cs @@ -1885,7 +1885,6 @@ namespace Be.Windows.Forms float x = ((float)(p.X - _recHex.X) / _charSize.Width); float y = ((float)(p.Y - _recHex.Y) / _charSize.Height); - int iX = (int)x; int iY = (int)y; //Offset by half a character to make the selection more intuitive (e.g half the white space belongs to the left byte, the other to the right) @@ -2554,9 +2553,6 @@ namespace Be.Windows.Forms int counter = -1; long intern_endByte = Math.Min(_byteProvider.Length - 1, endByte + _iHexMaxHBytes); - bool isKeyInterpreterActive = _keyInterpreter == null || _keyInterpreter.GetType() == typeof(KeyInterpreter); - bool isStringKeyInterpreterActive = _keyInterpreter != null && _keyInterpreter.GetType() == typeof(StringKeyInterpreter); - int yPrevious = -1; float xOffset = 0; Color defaultForeColor = this.ForeColor; diff --git a/GUI.NET/Debugger/TblLoader.cs b/GUI.NET/Debugger/TblLoader.cs index 9f58eca4..187ac63e 100644 --- a/GUI.NET/Debugger/TblLoader.cs +++ b/GUI.NET/Debugger/TblLoader.cs @@ -40,7 +40,6 @@ namespace Mesen.GUI.Debugger if(data[0].Length % 2 == 0 && Regex.IsMatch(data[0], "[0-9A-Fa-f]+")) { TblKey key = new TblKey(); - List bytes = new List(); for(int j = 0; j < data[0].Length; j+=2) { byte result = byte.Parse(data[0].Substring(j, 2), System.Globalization.NumberStyles.HexNumber); key.Key |= (UInt64)result << (8 * j / 2); diff --git a/GUI.NET/Debugger/frmDebugger.cs b/GUI.NET/Debugger/frmDebugger.cs index c6c8a460..f678d1cf 100644 --- a/GUI.NET/Debugger/frmDebugger.cs +++ b/GUI.NET/Debugger/frmDebugger.cs @@ -393,7 +393,7 @@ namespace Mesen.GUI.Debugger private void UpdateWorkspace() { DebugWorkspaceManager.SaveWorkspace(); - DebugWorkspace workspace = DebugWorkspaceManager.GetWorkspace(); + DebugWorkspaceManager.GetWorkspace(); ctrlLabelList.UpdateLabelList(); ctrlFunctionList.UpdateFunctionList(true); diff --git a/GUI.NET/Debugger/frmEventViewer.cs b/GUI.NET/Debugger/frmEventViewer.cs index ab7a645b..ea797812 100644 --- a/GUI.NET/Debugger/frmEventViewer.cs +++ b/GUI.NET/Debugger/frmEventViewer.cs @@ -16,14 +16,12 @@ namespace Mesen.GUI.Debugger { private DateTime _lastUpdate = DateTime.MinValue; private InteropEmu.NotificationListener _notifListener; - private TabPage _selectedTab; private bool _refreshing = false; public frmEventViewer() { InitializeComponent(); - this._selectedTab = this.tpgPpuView; this.mnuRefreshOnBreak.Checked = ConfigManager.Config.DebugInfo.EventViewerRefreshOnBreak; this.chkShowPpuRegisterWrites.Checked = ConfigManager.Config.DebugInfo.EventViewerShowPpuRegisterWrites; this.chkShowPpuRegisterReads.Checked = ConfigManager.Config.DebugInfo.EventViewerShowPpuRegisterReads; @@ -105,7 +103,6 @@ namespace Mesen.GUI.Debugger private void tabMain_SelectedIndexChanged(object sender, EventArgs e) { - this._selectedTab = this.tabMain.SelectedTab; } private void mnuRefreshOnBreak_Click(object sender, EventArgs e) diff --git a/GUI.NET/Debugger/frmTraceLogger.cs b/GUI.NET/Debugger/frmTraceLogger.cs index 1b5f02f2..2f0b03ec 100644 --- a/GUI.NET/Debugger/frmTraceLogger.cs +++ b/GUI.NET/Debugger/frmTraceLogger.cs @@ -306,7 +306,6 @@ namespace Mesen.GUI.Debugger List indent = new List(30000); bool showByteCode = false; - char[] splitter = new char[] { ' ' }; while(readLine()) { string[] parts = line.Split('\x1'); programCounter.Add(Int32.Parse(parts[0], System.Globalization.NumberStyles.HexNumber)); diff --git a/GUI.NET/Forms/Cheats/frmCheatImportFromDb.cs b/GUI.NET/Forms/Cheats/frmCheatImportFromDb.cs index fe55f50f..1bdea9d0 100644 --- a/GUI.NET/Forms/Cheats/frmCheatImportFromDb.cs +++ b/GUI.NET/Forms/Cheats/frmCheatImportFromDb.cs @@ -95,7 +95,6 @@ namespace Mesen.GUI.Forms.Cheats if(string.IsNullOrWhiteSpace(_previousSearch)) { lstGames.Items.AddRange(_gamesByCrc.Values.ToArray()); } else { - List gamesToAdd = new List(); lstGames.Items.AddRange(_gamesByCrc.Where(c => c.Value.Name.IndexOf(_previousSearch, StringComparison.InvariantCultureIgnoreCase) >= 0).Select(c => c.Value).ToArray()); } } diff --git a/GUI.NET/Forms/Config/frmInputConfig.cs b/GUI.NET/Forms/Config/frmInputConfig.cs index 7d136251..5a33738e 100644 --- a/GUI.NET/Forms/Config/frmInputConfig.cs +++ b/GUI.NET/Forms/Config/frmInputConfig.cs @@ -124,7 +124,6 @@ namespace Mesen.GUI.Forms.Config cboPlayer4.SelectedIndexChanged -= cboPlayerController_SelectedIndexChanged; bool isNes = ((InputInfo)Entity).ConsoleType == ConsoleType.Nes; - bool p3and4visible = (isNes && chkFourScore.Checked) || (!isNes && ((InputInfo)Entity).ExpansionPortDevice == InteropEmu.ExpansionPortDevice.FourPlayerAdapter); bool isOriginalFamicom = !isNes && !ConfigManager.Config.EmulationInfo.UseNes101Hvc101Behavior; List controllerTypes = new List() { InteropEmu.ControllerType.None, InteropEmu.ControllerType.StandardController }; diff --git a/GUI.NET/Forms/Config/frmVideoConfig.cs b/GUI.NET/Forms/Config/frmVideoConfig.cs index 0d3b77bb..b961c869 100644 --- a/GUI.NET/Forms/Config/frmVideoConfig.cs +++ b/GUI.NET/Forms/Config/frmVideoConfig.cs @@ -138,7 +138,6 @@ namespace Mesen.GUI.Forms.Config protected override bool ValidateInput() { - VideoFilterType orgFilter = ((VideoInfo)Entity).VideoFilter; UpdateObject(); UpdateCustomRatioVisibility(); UpdatePalette(); diff --git a/GUI.NET/Forms/frmConfigWizard.cs b/GUI.NET/Forms/frmConfigWizard.cs index c5aae3e9..c4d97c95 100644 --- a/GUI.NET/Forms/frmConfigWizard.cs +++ b/GUI.NET/Forms/frmConfigWizard.cs @@ -18,8 +18,6 @@ namespace Mesen.GUI.Forms { public partial class frmConfigWizard : Form { - private PrivateFontCollection _fonts = new PrivateFontCollection(); - public frmConfigWizard() { InitializeComponent(); diff --git a/GUI.NET/Forms/frmMain.Tests.cs b/GUI.NET/Forms/frmMain.Tests.cs index a859273a..7117023c 100644 --- a/GUI.NET/Forms/frmMain.Tests.cs +++ b/GUI.NET/Forms/frmMain.Tests.cs @@ -128,7 +128,7 @@ namespace Mesen.GUI.Forms string filename = ofd.FileName; Task.Run(() => { - int result = InteropEmu.RunAutomaticTest(filename); + InteropEmu.RunAutomaticTest(filename); }); } } diff --git a/GUI.NET/Forms/frmMain.cs b/GUI.NET/Forms/frmMain.cs index 762ba813..a80e6e5c 100644 --- a/GUI.NET/Forms/frmMain.cs +++ b/GUI.NET/Forms/frmMain.cs @@ -48,7 +48,6 @@ namespace Mesen.GUI.Forms private object _loadRomLock = new object(); private int _romLoadCounter = 0; private bool _showUpgradeMessage = false; - private float _xFactor = 1; private float _yFactor = 1; private bool _enableResize = false; private bool _overrideWindowSize = false; @@ -345,7 +344,6 @@ namespace Mesen.GUI.Forms protected override void ScaleControl(SizeF factor, BoundsSpecified specified) { - _xFactor = factor.Width; _yFactor = factor.Height; base.ScaleControl(factor, specified); } diff --git a/GUI.NET/GoogleDriveIntegration/CloudSyncHelper.cs b/GUI.NET/GoogleDriveIntegration/CloudSyncHelper.cs index 9e69534b..99e342ea 100644 --- a/GUI.NET/GoogleDriveIntegration/CloudSyncHelper.cs +++ b/GUI.NET/GoogleDriveIntegration/CloudSyncHelper.cs @@ -82,7 +82,6 @@ namespace Mesen.GUI.GoogleDriveIntegration private static bool UploadData() { using(MemoryStream stream = CloudSyncHelper.GetDataStream()) { - var gdAccessor = new GoogleDriveAccessor(); return _accessor.UploadFile(stream, "MesenData.zip"); } } diff --git a/GUI.NET/GoogleDriveIntegration/GoogleDriveAccessor.cs b/GUI.NET/GoogleDriveIntegration/GoogleDriveAccessor.cs index fd8968b7..1c206640 100644 --- a/GUI.NET/GoogleDriveIntegration/GoogleDriveAccessor.cs +++ b/GUI.NET/GoogleDriveIntegration/GoogleDriveAccessor.cs @@ -24,7 +24,6 @@ namespace Mesen.GUI.GoogleDriveIntegration { private const string _contentType = @"application/zip"; private readonly string[] _scopes = new[] { DriveService.Scope.DriveAppdata }; - private File _driveFile = null; private UserCredential _credentials = null; private DriveService _service = null; private bool _connected = false; @@ -184,10 +183,8 @@ namespace Mesen.GUI.GoogleDriveIntegration var request = _service.Files.Get(driveFile.Id); var progress = await request.DownloadAsync(outStream).ConfigureAwait(false); if(progress.Status == DownloadStatus.Completed) { - _driveFile = driveFile; return FileDownloadResult.OK; } else { - _driveFile = null; return FileDownloadResult.Error; } } @@ -203,7 +200,6 @@ namespace Mesen.GUI.GoogleDriveIntegration void Upload_ResponseReceived(File file) { - _driveFile = file; } void IDisposable.Dispose() diff --git a/GUI.NET/Program.cs b/GUI.NET/Program.cs index a42c53a0..fe21bdbd 100644 --- a/GUI.NET/Program.cs +++ b/GUI.NET/Program.cs @@ -64,8 +64,8 @@ namespace Mesen.GUI try { Task.Run(() => { //Cache deserializers in another thread - XmlSerializer xmlSerializer = new XmlSerializer(typeof(Configuration)); - xmlSerializer = new XmlSerializer(typeof(DebugWorkspace)); + new XmlSerializer(typeof(Configuration)); + new XmlSerializer(typeof(DebugWorkspace)); }); if(Type.GetType("Mono.Runtime") != null) {