Skip to content

Commit

Permalink
Add project files.
Browse files Browse the repository at this point in the history
  • Loading branch information
JumpingPistachio committed Apr 9, 2021
1 parent 723df0b commit a33ed62
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
59 changes: 59 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System;
using System.Threading;

namespace SecondsTimer
{
class Program
{

int y;
int x;
string z;
bool loop = false;
static void Main(string[] args)
{
new Program().Run();
}


void Run()
{
y = 0;
x = 0;
Console.WriteLine("How long would you like to set this timer for? (in seconds)");
z = Console.ReadLine();
try
{

x = int.Parse(z);
loop = true;
while (loop = true)
{
if (x == y)
{
Console.WriteLine("Finished Counting");
Thread.Sleep(250);
Console.Clear();
loop = false;
Run();
}
y += 1;
Console.WriteLine(y);
Thread.Sleep(1000);

}

}
catch (FormatException)
{

Console.WriteLine("That is not a valid number.");
Thread.Sleep(600);
Console.Clear();
Run();

}
}

}
}
8 changes: 8 additions & 0 deletions SecondsTimer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>

</Project>
25 changes: 25 additions & 0 deletions SecondsTimer.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31129.286
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SecondsTimer", "SecondsTimer.csproj", "{15F9EBFC-E29F-4189-BA0B-6DEBD89353C6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{15F9EBFC-E29F-4189-BA0B-6DEBD89353C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15F9EBFC-E29F-4189-BA0B-6DEBD89353C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{15F9EBFC-E29F-4189-BA0B-6DEBD89353C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15F9EBFC-E29F-4189-BA0B-6DEBD89353C6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B2BC4808-5BCA-4495-9986-F7702E839445}
EndGlobalSection
EndGlobal

0 comments on commit a33ed62

Please sign in to comment.