QOL upgrades
This commit is contained in:
parent
2eca513251
commit
dee661af78
|
|
@ -15,6 +15,7 @@ class Downloader
|
||||||
public readonly string fileFilter;
|
public readonly string fileFilter;
|
||||||
public readonly string filePath;
|
public readonly string filePath;
|
||||||
public static bool showErrorInfo;
|
public static bool showErrorInfo;
|
||||||
|
public int downloadSize;
|
||||||
private string downloadOutcome;
|
private string downloadOutcome;
|
||||||
private static string downloadOutcomeException;
|
private static string downloadOutcomeException;
|
||||||
|
|
||||||
|
|
@ -115,7 +116,8 @@ class Downloader
|
||||||
//Thread.Sleep(2000);
|
//Thread.Sleep(2000);
|
||||||
if (File.Exists(name) && read > 0)
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -165,12 +165,12 @@
|
||||||
//
|
//
|
||||||
// CustomDLURLLabel
|
// CustomDLURLLabel
|
||||||
//
|
//
|
||||||
this.CustomDLURLLabel.AutoSize = true;
|
this.CustomDLURLLabel.Location = new System.Drawing.Point(5, 72);
|
||||||
this.CustomDLURLLabel.Location = new System.Drawing.Point(5, 78);
|
|
||||||
this.CustomDLURLLabel.Name = "CustomDLURLLabel";
|
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.TabIndex = 26;
|
||||||
this.CustomDLURLLabel.Text = "Custom URL";
|
this.CustomDLURLLabel.Text = "Custom URL\r\n(Optional):";
|
||||||
|
this.CustomDLURLLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||||
//
|
//
|
||||||
// URLOverrideBox
|
// URLOverrideBox
|
||||||
//
|
//
|
||||||
|
|
@ -186,14 +186,14 @@
|
||||||
this.URLListLabel.AutoSize = true;
|
this.URLListLabel.AutoSize = true;
|
||||||
this.URLListLabel.Location = new System.Drawing.Point(18, 51);
|
this.URLListLabel.Location = new System.Drawing.Point(18, 51);
|
||||||
this.URLListLabel.Name = "URLListLabel";
|
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.TabIndex = 24;
|
||||||
this.URLListLabel.Text = "URL List";
|
this.URLListLabel.Text = "URL:";
|
||||||
//
|
//
|
||||||
// URLSelection
|
// URLSelection
|
||||||
//
|
//
|
||||||
this.URLSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.URLSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.URLSelection.DropDownWidth = 242;
|
this.URLSelection.DropDownWidth = 300;
|
||||||
this.URLSelection.FormattingEnabled = true;
|
this.URLSelection.FormattingEnabled = true;
|
||||||
this.URLSelection.Location = new System.Drawing.Point(72, 48);
|
this.URLSelection.Location = new System.Drawing.Point(72, 48);
|
||||||
this.URLSelection.Name = "URLSelection";
|
this.URLSelection.Name = "URLSelection";
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ public partial class AssetDownloader : Form
|
||||||
private bool isWebSite = false;
|
private bool isWebSite = false;
|
||||||
private bool batchMode = false;
|
private bool batchMode = false;
|
||||||
private bool hasOverrideWarningOpenedOnce = false;
|
private bool hasOverrideWarningOpenedOnce = false;
|
||||||
|
private static int batchDownloadSize = 0;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructor
|
#region Constructor
|
||||||
|
|
@ -56,6 +57,8 @@ public partial class AssetDownloader : Form
|
||||||
|
|
||||||
//downloader
|
//downloader
|
||||||
AssetDownloader_LoadHelpMessage.Checked = GlobalVars.UserConfiguration.DisabledAssetSDKHelp;
|
AssetDownloader_LoadHelpMessage.Checked = GlobalVars.UserConfiguration.DisabledAssetSDKHelp;
|
||||||
|
Height = 193;
|
||||||
|
CenterToScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssetSDK_Close(object sender, CancelEventArgs e)
|
void AssetSDK_Close(object sender, CancelEventArgs e)
|
||||||
|
|
@ -186,6 +189,11 @@ public partial class AssetDownloader : Form
|
||||||
GlobalFuncs.LogExceptions(ex);
|
GlobalFuncs.LogExceptions(ex);
|
||||||
noErrors = false;
|
noErrors = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (noErrors)
|
||||||
|
{
|
||||||
|
batchDownloadSize += download.downloadSize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
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." : "";
|
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)
|
catch (Exception ex)
|
||||||
|
|
@ -283,6 +291,7 @@ public partial class AssetDownloader : Form
|
||||||
|
|
||||||
if (batchMode)
|
if (batchMode)
|
||||||
{
|
{
|
||||||
|
Height = 454;
|
||||||
AssetDownloaderBatch_BatchIDBox.Enabled = true;
|
AssetDownloaderBatch_BatchIDBox.Enabled = true;
|
||||||
AssetDownloaderBatch_Note.Visible = true;
|
AssetDownloaderBatch_Note.Visible = true;
|
||||||
AssetDownloader_AssetIDBox.Enabled = false;
|
AssetDownloader_AssetIDBox.Enabled = false;
|
||||||
|
|
@ -291,6 +300,7 @@ public partial class AssetDownloader : Form
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Height = 193;
|
||||||
AssetDownloaderBatch_BatchIDBox.Enabled = false;
|
AssetDownloaderBatch_BatchIDBox.Enabled = false;
|
||||||
AssetDownloaderBatch_Note.Visible = false;
|
AssetDownloaderBatch_Note.Visible = false;
|
||||||
AssetDownloader_AssetIDBox.Enabled = true;
|
AssetDownloader_AssetIDBox.Enabled = true;
|
||||||
|
|
|
||||||
|
|
@ -47,12 +47,12 @@
|
||||||
//
|
//
|
||||||
// CustomDLURLLabel
|
// CustomDLURLLabel
|
||||||
//
|
//
|
||||||
this.CustomDLURLLabel.AutoSize = true;
|
this.CustomDLURLLabel.Location = new System.Drawing.Point(12, 35);
|
||||||
this.CustomDLURLLabel.Location = new System.Drawing.Point(14, 41);
|
|
||||||
this.CustomDLURLLabel.Name = "CustomDLURLLabel";
|
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.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
|
// URLOverrideBox
|
||||||
//
|
//
|
||||||
|
|
@ -66,11 +66,11 @@
|
||||||
// URLListLabel
|
// URLListLabel
|
||||||
//
|
//
|
||||||
this.URLListLabel.AutoSize = true;
|
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.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.TabIndex = 24;
|
||||||
this.URLListLabel.Text = "URL List";
|
this.URLListLabel.Text = "URL:";
|
||||||
//
|
//
|
||||||
// URLSelection
|
// URLSelection
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -376,13 +376,7 @@ public partial class AssetFixer : Form
|
||||||
if (robloxFileDialog.ShowDialog() == DialogResult.OK)
|
if (robloxFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
path = robloxFileDialog.FileName;
|
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();
|
AssetLocalization_BackgroundWorker.RunWorkerAsync();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue