QOL upgrades
This commit is contained in:
parent
2eca513251
commit
dee661af78
|
|
@ -15,6 +15,7 @@ class Downloader
|
|||
public readonly string fileFilter;
|
||||
public readonly string filePath;
|
||||
public static bool showErrorInfo;
|
||||
public int downloadSize;
|
||||
private string downloadOutcome;
|
||||
private static string downloadOutcomeException;
|
||||
|
||||
|
|
@ -115,7 +116,8 @@ class Downloader
|
|||
//Thread.Sleep(2000);
|
||||
if (File.Exists(name) && read > 0)
|
||||
{
|
||||
downloadOutcome = "File " + Path.GetFileName(name) + " downloaded! " + GlobalFuncs.SizeSuffix(Convert.ToInt64(read), 2) + " written (" + read + " bytes)! " + additionalText;
|
||||
downloadSize = read;
|
||||
downloadOutcome = "File " + Path.GetFileName(name) + " downloaded! " + GlobalFuncs.SizeSuffix(Convert.ToInt64(downloadSize), 2) + " written (" + downloadSize + " bytes)! " + additionalText;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -165,12 +165,12 @@
|
|||
//
|
||||
// CustomDLURLLabel
|
||||
//
|
||||
this.CustomDLURLLabel.AutoSize = true;
|
||||
this.CustomDLURLLabel.Location = new System.Drawing.Point(5, 78);
|
||||
this.CustomDLURLLabel.Location = new System.Drawing.Point(5, 72);
|
||||
this.CustomDLURLLabel.Name = "CustomDLURLLabel";
|
||||
this.CustomDLURLLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.CustomDLURLLabel.Size = new System.Drawing.Size(67, 27);
|
||||
this.CustomDLURLLabel.TabIndex = 26;
|
||||
this.CustomDLURLLabel.Text = "Custom URL";
|
||||
this.CustomDLURLLabel.Text = "Custom URL\r\n(Optional):";
|
||||
this.CustomDLURLLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// URLOverrideBox
|
||||
//
|
||||
|
|
@ -186,14 +186,14 @@
|
|||
this.URLListLabel.AutoSize = true;
|
||||
this.URLListLabel.Location = new System.Drawing.Point(18, 51);
|
||||
this.URLListLabel.Name = "URLListLabel";
|
||||
this.URLListLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.URLListLabel.Size = new System.Drawing.Size(32, 13);
|
||||
this.URLListLabel.TabIndex = 24;
|
||||
this.URLListLabel.Text = "URL List";
|
||||
this.URLListLabel.Text = "URL:";
|
||||
//
|
||||
// URLSelection
|
||||
//
|
||||
this.URLSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.URLSelection.DropDownWidth = 242;
|
||||
this.URLSelection.DropDownWidth = 300;
|
||||
this.URLSelection.FormattingEnabled = true;
|
||||
this.URLSelection.Location = new System.Drawing.Point(72, 48);
|
||||
this.URLSelection.Name = "URLSelection";
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ public partial class AssetDownloader : Form
|
|||
private bool isWebSite = false;
|
||||
private bool batchMode = false;
|
||||
private bool hasOverrideWarningOpenedOnce = false;
|
||||
private static int batchDownloadSize = 0;
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
|
|
@ -56,6 +57,8 @@ public partial class AssetDownloader : Form
|
|||
|
||||
//downloader
|
||||
AssetDownloader_LoadHelpMessage.Checked = GlobalVars.UserConfiguration.DisabledAssetSDKHelp;
|
||||
Height = 193;
|
||||
CenterToScreen();
|
||||
}
|
||||
|
||||
void AssetSDK_Close(object sender, CancelEventArgs e)
|
||||
|
|
@ -186,6 +189,11 @@ public partial class AssetDownloader : Form
|
|||
GlobalFuncs.LogExceptions(ex);
|
||||
noErrors = false;
|
||||
}
|
||||
|
||||
if (noErrors)
|
||||
{
|
||||
batchDownloadSize += download.downloadSize;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -261,7 +269,7 @@ public partial class AssetDownloader : Form
|
|||
|
||||
string extraText = (lines.Count() != lineCount) ? "\n" + (lines.Count() - lineCount) + " errors were detected during the download. Make sure your IDs and links are valid." : "";
|
||||
|
||||
MessageBox.Show("Batch download complete! " + lineCount + " items downloaded!" + extraText, "Novetus Asset SDK - Download Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageBox.Show("Batch download complete! " + lineCount + " items downloaded! " + GlobalFuncs.SizeSuffix(Convert.ToInt64(batchDownloadSize), 2) + "written (" + batchDownloadSize + " bytes)!" + extraText, "Novetus Asset SDK - Download Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
@ -283,6 +291,7 @@ public partial class AssetDownloader : Form
|
|||
|
||||
if (batchMode)
|
||||
{
|
||||
Height = 454;
|
||||
AssetDownloaderBatch_BatchIDBox.Enabled = true;
|
||||
AssetDownloaderBatch_Note.Visible = true;
|
||||
AssetDownloader_AssetIDBox.Enabled = false;
|
||||
|
|
@ -291,6 +300,7 @@ public partial class AssetDownloader : Form
|
|||
}
|
||||
else
|
||||
{
|
||||
Height = 193;
|
||||
AssetDownloaderBatch_BatchIDBox.Enabled = false;
|
||||
AssetDownloaderBatch_Note.Visible = false;
|
||||
AssetDownloader_AssetIDBox.Enabled = true;
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@
|
|||
//
|
||||
// CustomDLURLLabel
|
||||
//
|
||||
this.CustomDLURLLabel.AutoSize = true;
|
||||
this.CustomDLURLLabel.Location = new System.Drawing.Point(14, 41);
|
||||
this.CustomDLURLLabel.Location = new System.Drawing.Point(12, 35);
|
||||
this.CustomDLURLLabel.Name = "CustomDLURLLabel";
|
||||
this.CustomDLURLLabel.Size = new System.Drawing.Size(67, 13);
|
||||
this.CustomDLURLLabel.Size = new System.Drawing.Size(67, 27);
|
||||
this.CustomDLURLLabel.TabIndex = 26;
|
||||
this.CustomDLURLLabel.Text = "Custom URL";
|
||||
this.CustomDLURLLabel.Text = "Custom URL\r\n(Optional)\r\n:";
|
||||
this.CustomDLURLLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// URLOverrideBox
|
||||
//
|
||||
|
|
@ -66,11 +66,11 @@
|
|||
// URLListLabel
|
||||
//
|
||||
this.URLListLabel.AutoSize = true;
|
||||
this.URLListLabel.Location = new System.Drawing.Point(12, 14);
|
||||
this.URLListLabel.Location = new System.Drawing.Point(27, 14);
|
||||
this.URLListLabel.Name = "URLListLabel";
|
||||
this.URLListLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.URLListLabel.Size = new System.Drawing.Size(32, 13);
|
||||
this.URLListLabel.TabIndex = 24;
|
||||
this.URLListLabel.Text = "URL List";
|
||||
this.URLListLabel.Text = "URL:";
|
||||
//
|
||||
// URLSelection
|
||||
//
|
||||
|
|
|
|||
|
|
@ -376,13 +376,7 @@ public partial class AssetFixer : Form
|
|||
if (robloxFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
path = robloxFileDialog.FileName;
|
||||
#if DEBUG
|
||||
LocalizeAsset(currentType, null, path, name,
|
||||
AssetLocalization_AssetLinks.Checked ? AssetLocalization_AssetLinks.Checked : false,
|
||||
AssetLocalization_AssetLinks.Checked ? url : "");
|
||||
#else
|
||||
AssetLocalization_BackgroundWorker.RunWorkerAsync();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue