Fix ALL Warnings

This commit is contained in:
RandomHuman 2023-02-20 03:39:55 -07:00
parent c6f787c39c
commit dc5d26d13e
17 changed files with 186 additions and 204 deletions

View file

@ -3,13 +3,12 @@
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Threading.Tasks;
using WebBrowser;
using CefSharp;
using System.IO;
using System.Threading;
using System.Linq.Expressions;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;
using CefSharp;
using WebBrowser;
using Timer = System.Threading.Timer;
namespace DiamondCreeperBrowser
{
@ -53,7 +52,7 @@ namespace DiamondCreeperBrowser
}
}
private void DownloadProgress_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
private void DownloadProgress_FormClosing(object sender, FormClosingEventArgs e)
{
downloadItem.IsCancelled = true;
}
@ -66,13 +65,13 @@ namespace DiamondCreeperBrowser
if (downloadItem.IsComplete)
{
fivesecondtimer = new Timer(new TimerCallback(tcallback), null, 1000 * 5, 1000 * 5);
fivesecondtimer = new Timer(tcallback, null, 1000 * 5, 1000 * 5);
}
frmref.Invoke((Action)delegate {
downloadProgress.ProgressBar1.Value = downloadItem.PercentComplete;
downloadProgress.ProgressPrecentage.Text = downloadItem.PercentComplete.ToString() + "% " + (downloadItem.ReceivedBytes / 0x100000).ToString() + "MB / " + (downloadItem.TotalBytes / 0x100000).ToString() + "MB";
downloadProgress.ProgressPrecentage.Text = downloadItem.PercentComplete + "% " + (downloadItem.ReceivedBytes / 0x100000) + "MB / " + (downloadItem.TotalBytes / 0x100000) + "MB";
downloadProgress.ProgressFileName.Text = Path.GetFileName(downloadItem.FullPath);
downloadProgress.Update();
try { } catch (InvalidAsynchronousStateException){};