aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/WinClassicForms/WinClassicDownloader.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-03-27 15:58:41 -0400
committerlempamo <[email protected]>2017-03-27 15:58:41 -0400
commitb880da82cd6af92ca704c4c1cd96c8d1fa64ad59 (patch)
treeb58fe5631bd861df849a3c57cfa2e032261bf4dc /TimeHACK.Main/WinClassicForms/WinClassicDownloader.cs
parent8cf466d0a3e835cbcd22bf768684141c9b996278 (diff)
parent5819bf69c300dfaefa427d701b3bef4a7397e0c9 (diff)
downloadhistacom2-b880da82cd6af92ca704c4c1cd96c8d1fa64ad59.tar.gz
histacom2-b880da82cd6af92ca704c4c1cd96c8d1fa64ad59.tar.bz2
histacom2-b880da82cd6af92ca704c4c1cd96c8d1fa64ad59.zip
Merge remote-tracking branch 'refs/remotes/TimeHACKDevs/master'
# Conflicts: # TimeHACK.Main/bin/Release/TimeHACK.Engine.dll # TimeHACK.Main/bin/Release/TimeHACK.Engine.pdb # TimeHACK.Main/bin/Release/TimeHACK.application # TimeHACK.Main/bin/Release/TimeHACK.exe # TimeHACK.Main/bin/Release/TimeHACK.exe.manifest # TimeHACK.Main/bin/Release/TimeHACK.pdb # TimeHACK.Main/bin/Release/app.publish/TimeHACK.exe # TimeHACK.Main/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache # TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.FileListAbsolute.txt # TimeHACK.Main/obj/Release/TimeHACK.Main.csproj.GenerateResource.Cache # TimeHACK.Main/obj/Release/TimeHACK.Main.csprojResolveAssemblyReference.cache # TimeHACK.Main/obj/Release/TimeHACK.WinClassicTemplate.resources # TimeHACK.Main/obj/Release/TimeHACK.Windows95.resources # TimeHACK.Main/obj/Release/TimeHACK.application # TimeHACK.Main/obj/Release/TimeHACK.exe # TimeHACK.Main/obj/Release/TimeHACK.exe.manifest # TimeHACK.Main/obj/Release/TimeHACK.pdb
Diffstat (limited to 'TimeHACK.Main/WinClassicForms/WinClassicDownloader.cs')
-rw-r--r--TimeHACK.Main/WinClassicForms/WinClassicDownloader.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/TimeHACK.Main/WinClassicForms/WinClassicDownloader.cs b/TimeHACK.Main/WinClassicForms/WinClassicDownloader.cs
index b5aa521..4cdcd43 100644
--- a/TimeHACK.Main/WinClassicForms/WinClassicDownloader.cs
+++ b/TimeHACK.Main/WinClassicForms/WinClassicDownloader.cs
@@ -9,9 +9,20 @@ namespace TimeHACK.WinClassicForms
public WinClassicDownloader()
{
InitializeComponent();
+
+ }
+
+ private string DownloadSpeed(string str)
+ {
+ Random rnd = new Random();
+ int dl1 = rnd.Next(7, 9);
+ int dl2 = rnd.Next(1, 9);
+ int dl3 = rnd.Next(1, 9);
+ string speed = dl1.ToString() + "." + dl2.ToString() + dl3.ToString();
+ return speed;
}
+
int amountToDL = 100;
- int downloadSpeed = 8;
int amountDLed = 0;
Windows95 Windows95 = new Windows95();
@@ -19,13 +30,13 @@ namespace TimeHACK.WinClassicForms
private void WinClassicDownloader_Load(object sender, EventArgs e)
{
dlTimer.Start();
- transferLbl.Text = ("Transfer speed: " + downloadSpeed + " KB/s");
+ dlSpeed.Start();
}
private void dlTimer_Tick(object sender, EventArgs e)
{
- amountDLed = amountDLed + downloadSpeed;
- if(downloadSpeed > amountToDL - amountDLed){
+ amountDLed = amountDLed + 8;
+ if(8 > amountToDL - amountDLed){
progBar.Value = 100;
amountLbl.Text = ("Downloaded " + amountDLed + " KB out of " + amountToDL + " KB");
@@ -67,5 +78,10 @@ namespace TimeHACK.WinClassicForms
}
amountLbl.Text = ("Downloaded " + amountDLed + " KB out of " + amountToDL);
}
+
+ private void dlSpeed_Tick(object sender, EventArgs e)
+ {
+ transferLbl.Text = ("Transfer speed: " + DownloadSpeed("") + " KB/s");
+ }
}
}