Model Downloader Cancel is now instant + other improvements

This commit is contained in:
N00MKRAD
2021-06-22 15:01:48 +02:00
parent 8dc8ccf71f
commit 40b88bfa46
4 changed files with 16 additions and 9 deletions

View File

@@ -4,8 +4,6 @@ using Flowframes.IO;
using Flowframes.Main;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Flowframes.MiscUtils
@@ -15,7 +13,7 @@ namespace Flowframes.MiscUtils
public static ModelDownloadForm form;
static int taskCounter = 0;
static int tasksToDo = 0;
public static bool canceled = false;
static bool canceled = false;
public static async Task DownloadAll ()
{
@@ -50,6 +48,12 @@ namespace Flowframes.MiscUtils
}
}
public static void Cancel ()
{
canceled = true;
ModelDownloader.canceled = true;
}
public static int GetTaskCount (AI[] ais)
{
int count = 0;