From b638c3b689e3b0ae466b456c771d84f5dc3cea4b Mon Sep 17 00:00:00 2001 From: Bitl Date: Sat, 9 Nov 2019 10:20:19 -0700 Subject: [PATCH] WIP itemmaker download feature --- NovetusLauncher/.vs/NovetusLauncher/v14/.suo | Bin 160256 -> 161280 bytes NovetusLauncher/NovetusFuncs/Downloader.cs | 90 ++++--- .../NovetusLauncher/ItemMaker.Designer.cs | 243 ++++++++++-------- NovetusLauncher/NovetusLauncher/ItemMaker.cs | 46 +++- .../.vs/NovetusTest_FileDownloader/v14/.suo | Bin 61952 -> 51200 bytes ...tusTest_FileDownloader.vshost.exe.manifest | 11 + ...le_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs | 0 ...le_5937a670-0e60-4077-877b-f7221da3dda1.cs | 0 ...le_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs | 0 9 files changed, 237 insertions(+), 153 deletions(-) create mode 100644 NovetusTest_FileDownloader/NovetusTest_FileDownloader/bin/Debug/NovetusTest_FileDownloader.vshost.exe.manifest create mode 100644 NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs create mode 100644 NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs create mode 100644 NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs diff --git a/NovetusLauncher/.vs/NovetusLauncher/v14/.suo b/NovetusLauncher/.vs/NovetusLauncher/v14/.suo index bac4b8dfc3ebdaf61cfb316bf7c4d2e7110f7d8b..58074e1d873920a2364db258b7b8f7fa06d1cd2c 100644 GIT binary patch delta 5104 zcmdUz32;Mo)r)=TCj_3K*=hz|9&%pQPIU(tE}y*-|Mfx zzQ6vu`@N|>6;gX9WTmq&)A>V$PS+Wt9$fZ%y;3XXZXlL-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tv%cjxXB+CiPna|$T zv6|J5O5-CP#4@)GWr6OO`&I~kO!rcR^}b^aRC`-@52RZ7{i zc^bwVzaZOqbs23Ji;Le{M*BG{rf zHBf-9OKa(J3moP<5`2t>vxi#*Hp@xYGyZ;67yuBbC)PqoE0Llii}Zg$ zT1yUf$wrDc@Vhrt6ffRD_m{3--I|~2vb*iB0$ZWGAjjs+Ey}mKi}H)`au;Uj*;23n<5ey7OT4MM%ic#E%;i|D<}mA#e!esT8uxV4Z$O%8u3#6Ev>@=vm8gt z)tq!lcSwymZk9?*f`xs-!se?c)lw~6_Q>#{+wjT?8p7pD$_rk6Ra|^MboFlJpGmZT z%R3}r&q-9_B>&+O{G%=8QGa)n9ME;9TPb10rM0;m_C{TNv&mHV-jvq6@JT^Gs+dUC&c4pVUToQxd0MdY&(sEkDuqFM0}_jE~Y(ETs=<-&3;8*KMW;Rg}9|!#vZi z>M2=H*YWN-aubj4CX2eWQm&`2J7lZ8-`Xf^S!doXzE&?!cH5?1fmq^gQX 0); - } + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(remoteFilename); + request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate"); + request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; + processRequest(request, response, remoteStream, localStream, localFilename, bytesProcessed); + } + else + { + WebRequest request = WebRequest.Create(remoteFilename); + processRequest(request, response, remoteStream, localStream, localFilename, bytesProcessed); } } catch (Exception e) @@ -133,6 +108,43 @@ class Downloader return bytesProcessed; } + private static void processRequest(WebRequest request, WebResponse response, Stream remoteStream, Stream localStream, string localFilename, int bytesProcessed) + { + if (request != null) + { + // Send the request to the server and retrieve the + // WebResponse object + response = request.GetResponse(); + if (response != null) + { + // Once the WebResponse object has been retrieved, + // get the stream object associated with the response's data + remoteStream = response.GetResponseStream(); + + // Create the local file + localStream = File.Create(localFilename); + + // Allocate a 1k buffer + byte[] buffer = new byte[1024]; + int bytesRead; + + // Simple do/while loop to read from stream until + // no bytes are returned + do + { + // Read data (up to 1k) from the stream + bytesRead = remoteStream.Read(buffer, 0, buffer.Length); + + // Write the data to the local file + localStream.Write(buffer, 0, bytesRead); + + // Increment total bytes processed + bytesProcessed += bytesRead; + } while (bytesRead > 0); + } + } + } + void wc_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e) { downloadProgress.Value = e.ProgressPercentage; diff --git a/NovetusLauncher/NovetusLauncher/ItemMaker.Designer.cs b/NovetusLauncher/NovetusLauncher/ItemMaker.Designer.cs index 53a6390..ec87d08 100644 --- a/NovetusLauncher/NovetusLauncher/ItemMaker.Designer.cs +++ b/NovetusLauncher/NovetusLauncher/ItemMaker.Designer.cs @@ -36,111 +36,139 @@ namespace NovetusLauncher /// private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ItemMaker)); - this.button1 = new System.Windows.Forms.Button(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.comboBox1 = new System.Windows.Forms.ComboBox(); - this.checkBox1 = new System.Windows.Forms.CheckBox(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); - this.SuspendLayout(); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(3, 80); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(238, 23); - this.button1.TabIndex = 1; - this.button1.Text = "Create!"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.Button1Click); - // - // textBox2 - // - this.textBox2.Location = new System.Drawing.Point(46, 27); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(76, 20); - this.textBox2.TabIndex = 2; - // - // numericUpDown1 - // - this.numericUpDown1.Location = new System.Drawing.Point(161, 27); - this.numericUpDown1.Maximum = new decimal(new int[] { - 99, - 0, - 0, - 0}); - this.numericUpDown1.Name = "numericUpDown1"; - this.numericUpDown1.Size = new System.Drawing.Size(36, 20); - this.numericUpDown1.TabIndex = 3; - // - // label2 - // - this.label2.Location = new System.Drawing.Point(63, 10); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(46, 14); - this.label2.TabIndex = 6; - this.label2.Text = "Item ID"; - // - // label3 - // - this.label3.Location = new System.Drawing.Point(161, 9); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(42, 14); - this.label3.TabIndex = 7; - this.label3.Text = "Version"; - this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // comboBox1 - // - this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox1.FormattingEnabled = true; - this.comboBox1.Items.AddRange(new object[] { - "http://www.roblox.com/", - "http://assetgame.roblox.com/", - "https://www.roblox.com/catalog/", - "https://www.roblox.com/library/"}); - this.comboBox1.Location = new System.Drawing.Point(3, 53); - this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(238, 21); - this.comboBox1.TabIndex = 8; - this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.ComboBox1SelectedIndexChanged); - // - // checkBox1 - // - this.checkBox1.Location = new System.Drawing.Point(18, 109); - this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(214, 24); - this.checkBox1.TabIndex = 9; - this.checkBox1.Text = "Disable Help Message on Item Creation"; - this.checkBox1.UseVisualStyleBackColor = true; - this.checkBox1.CheckedChanged += new System.EventHandler(this.CheckBox1CheckedChanged); - // - // ItemMaker - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.ClientSize = new System.Drawing.Size(244, 139); - this.Controls.Add(this.checkBox1); - this.Controls.Add(this.comboBox1); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.numericUpDown1); - this.Controls.Add(this.textBox2); - this.Controls.Add(this.button1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MaximizeBox = false; - this.Name = "ItemMaker"; - this.Text = "Novetus Item SDK"; - this.Closing += new System.ComponentModel.CancelEventHandler(this.ItemMakerClose); - this.Load += new System.EventHandler(this.ItemMakerLoad); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ItemMaker)); + this.button1 = new System.Windows.Forms.Button(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(3, 80); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(238, 23); + this.button1.TabIndex = 1; + this.button1.Text = "Create!"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.Button1Click); + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(98, 25); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(76, 20); + this.textBox2.TabIndex = 2; + // + // numericUpDown1 + // + this.numericUpDown1.Location = new System.Drawing.Point(193, 25); + this.numericUpDown1.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(36, 20); + this.numericUpDown1.TabIndex = 3; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(116, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(41, 14); + this.label2.TabIndex = 6; + this.label2.Text = "Item ID"; + // + // label3 + // + this.label3.Location = new System.Drawing.Point(190, 9); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(42, 14); + this.label3.TabIndex = 7; + this.label3.Text = "Version"; + this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // comboBox1 + // + this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Items.AddRange(new object[] { + "http://www.roblox.com/", + "http://assetgame.roblox.com/", + "https://www.roblox.com/catalog/", + "https://www.roblox.com/library/"}); + this.comboBox1.Location = new System.Drawing.Point(3, 53); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(238, 21); + this.comboBox1.TabIndex = 8; + this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.ComboBox1SelectedIndexChanged); + // + // checkBox1 + // + this.checkBox1.Location = new System.Drawing.Point(12, 126); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(220, 24); + this.checkBox1.TabIndex = 9; + this.checkBox1.Text = "Disable Help Message on Item Creation"; + this.checkBox1.UseVisualStyleBackColor = true; + this.checkBox1.CheckedChanged += new System.EventHandler(this.CheckBox1CheckedChanged); + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(3, 110); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(238, 10); + this.progressBar1.TabIndex = 10; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(33, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(35, 14); + this.label1.TabIndex = 11; + this.label1.Text = "Name"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(12, 25); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(76, 20); + this.textBox1.TabIndex = 12; + // + // ItemMaker + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.ClientSize = new System.Drawing.Size(244, 152); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label1); + this.Controls.Add(this.progressBar1); + this.Controls.Add(this.checkBox1); + this.Controls.Add(this.comboBox1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.numericUpDown1); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.button1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.Name = "ItemMaker"; + this.Text = "Novetus Item SDK"; + this.Closing += new System.ComponentModel.CancelEventHandler(this.ItemMakerClose); + this.Load += new System.EventHandler(this.ItemMakerLoad); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); } private System.Windows.Forms.ComboBox comboBox1; @@ -150,5 +178,8 @@ namespace NovetusLauncher private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Button button1; private System.Windows.Forms.CheckBox checkBox1; - } + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox1; + } } diff --git a/NovetusLauncher/NovetusLauncher/ItemMaker.cs b/NovetusLauncher/NovetusLauncher/ItemMaker.cs index 34f4cc7..059289d 100644 --- a/NovetusLauncher/NovetusLauncher/ItemMaker.cs +++ b/NovetusLauncher/NovetusLauncher/ItemMaker.cs @@ -38,14 +38,44 @@ namespace NovetusLauncher try { string version = ((numericUpDown1.Value != 0) && (isWebSite != true)) ? "&version=" + numericUpDown1.Value : ""; - - System.Diagnostics.Process.Start(url + textBox2.Text + version); - - if (!GlobalVars.DisabledHelp) - { - MessageBox.Show("In order for the item to work in Novetus, you'll need to find an icon for your item (it must be a .png file), then name it the same name as your item.\n\nIf you want to create a local (offline) item, you'll have to download the meshes/textures from the links in the rbxm file, then replace the links in the file pointing to where they are using rbxasset://. Look at the directory in the 'shareddata/charcustom' folder that best suits your item type, then look at the rbxm for any one of the items. If you get a corrupted file, change the URL using the drop down box.\n\nIf you're trying to create a offline item. please use these file extension names when saving your files:\n.rbxm - ROBLOX Model/Item\n.mesh - ROBLOX Mesh\n.png - Texture/Icon\n.wav - Sound","Novetus Item SDK", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - } + string fullURL = url + textBox2.Text + version; + + if (!isWebSite) + { + Downloader download = new Downloader(fullURL, textBox1.Text, "Roblox Model (*.rbxm)|*.rbxm|Roblox Mesh (*.mesh)|*.mesh|PNG Image (*.png)|*.png|WAV Sound (*.wav)|*.wav", progressBar1); + + if (!GlobalVars.DisabledHelp) + { + string helptext = "If you're trying to create a offline item, please use these file extension names when saving your files:\n.rbxm - ROBLOX Model/Item\n.mesh - ROBLOX Mesh\n.png - Texture/Icon\n.wav - Sound"; + MessageBox.Show(helptext, "Novetus Item SDK", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + + try + { + string helptext = "In order for the item to work in Novetus, you'll need to find an icon for your item (it must be a .png file), then name it the same name as your item.\n\nIf you want to create a local (offline) item, you'll have to download the meshes/textures from the links in the rbxm file, then replace the links in the file pointing to where they are using rbxasset://. Look at the directory in the 'shareddata/charcustom' folder that best suits your item type, then look at the rbxm for any one of the items. If you get a corrupted file, change the URL using the drop down box."; + download.InitDownload(true, (!GlobalVars.DisabledHelp) ? helptext : ""); + } + catch (Exception) + { + } + + if (!string.IsNullOrWhiteSpace(download.getDownloadOutcome())) + { + MessageBox.Show(download.getDownloadOutcome(), "Novetus Item SDK", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + else + { + System.Diagnostics.Process.Start(fullURL); + + if (!GlobalVars.DisabledHelp) + { + string helptext = "In order for the item to work in Novetus, you'll need to find an icon for your item (it must be a .png file), then name it the same name as your item.\n\nIf you want to create a local (offline) item, you'll have to download the meshes/textures from the links in the rbxm file, then replace the links in the file pointing to where they are using rbxasset://. Look at the directory in the 'shareddata/charcustom' folder that best suits your item type, then look at the rbxm for any one of the items. If you get a corrupted file, change the URL using the drop down box.\n\nIf you're trying to create a offline item, please use these file extension names when saving your files:\n.rbxm - ROBLOX Model/Item\n.mesh - ROBLOX Mesh\n.png - Texture/Icon\n.wav - Sound"; + MessageBox.Show(helptext, "Novetus Item SDK", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + } catch(Exception) { MessageBox.Show("Error: Unable to download the file. Try using a different file name or ID.","Novetus Item SDK | Error", MessageBoxButtons.OK, MessageBoxIcon.Error); diff --git a/NovetusTest_FileDownloader/.vs/NovetusTest_FileDownloader/v14/.suo b/NovetusTest_FileDownloader/.vs/NovetusTest_FileDownloader/v14/.suo index ae37a1a680d8385647c48ce01cad7cf13d898646..d38f37a98dd13691c9cd8ed403a8b8f2546ca52f 100644 GIT binary patch delta 1451 zcmc(fO=uHA6vuZq={AXzw8pfy)zqzRHA;~dtW<5KkPxdx-DvB#0Tl(oYQ(JvJv4~7 zMosq#f){m5%lK3k9qUv&D%GB-cI7J zEs?UNT2)ypj!H>dfF`Xc^Z7h^ZOF~&4F-AE?@YaT+UCDF!B&a^Wr#5+Fni-*Jw{+~ zp5yF5{0JtJ<|A_u+N0q{ySliZi*pT9i)<|VC?Qx=bRlbyAW|AkHt^;^CuQ7(n;H^DHX~b*t%!AC8`|5EeaKE^7qT0Hc(czz z2|TzMj_QVd*!kx1t0`GvKpAA`;H&)1%}9>L2qlCURZWm9_YHc{@e>`CpuD*0D$W#G zdRNl13Lzb7kF+4IEgebQzv(y|W9&#Vx1Z+1C@VUxH46Ekb#w)sLs&!-ISUQ0#cXmo zI#kL0Fe3sUOU;|@!ErV>$STXlcXxzw zl84%Ldbi@an^6-|Pg!1}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ma zxU@H0IU4WMz+EAatH3CggG10l{8$3=B|CIUKJ2S>R5Szzd(mR(xW#x+8kK|nw~VI> zSX)DEfMPRFkJj*t$HQyA%sg9g~H?v(&wbD%2`owvOY5$f)0dNt7dIx+p)}>u|n(dD)(VhW7uzERrn_&*0E;3A2icdz!LpF?V6iu z<(Do^8?7o1Lw!~#{yJY)IGi}P1%59ogFixM<@^;bm(QrCJ;+HXr2`IKcx%4BrLpN5 z*-V^k|0@xg86hsf-u~~DW&O1RPX%*4N3eDc3#FW@p2sOWl~1$HygJ(0Dm6r#Heo*2 zt0_cEQjrAwvNhl3^?2Hdr@ucT$~qJbn0P08cJLB#4|FQ7!A~+Mv4&7|cT;0@^VUc+ w*1$WY(xz3g@sbU$44G2Z;t?jRLMcqT_)|09Q$7a*H3ujMaQ@0KAQjd933+7E*Z=?k diff --git a/NovetusTest_FileDownloader/NovetusTest_FileDownloader/bin/Debug/NovetusTest_FileDownloader.vshost.exe.manifest b/NovetusTest_FileDownloader/NovetusTest_FileDownloader/bin/Debug/NovetusTest_FileDownloader.vshost.exe.manifest new file mode 100644 index 0000000..061c9ca --- /dev/null +++ b/NovetusTest_FileDownloader/NovetusTest_FileDownloader/bin/Debug/NovetusTest_FileDownloader.vshost.exe.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/NovetusTest_FileDownloader/NovetusTest_FileDownloader/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29