Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Stelusteee committed Sep 21, 2024
0 parents commit 518c3e5
Show file tree
Hide file tree
Showing 464 changed files with 8,727 additions and 0 deletions.
Binary file added .vs/BombTimer/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .vs/BombTimer/v17/.futdcache.v2
Binary file not shown.
Binary file added .vs/BombTimer/v17/.suo
Binary file not shown.
105 changes: 105 additions & 0 deletions .vs/BombTimer/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\stelu\\source\\repos\\BombTimer\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\wnd.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\wnd.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\savedata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\savedata.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\countdowntimer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\countdowntimer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|c:\\users\\stelu\\source\\repos\\bombtimer\\bombtimer\\wnd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\wnd.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 1,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedHeight": 200,
"SelectedChildIndex": 4,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "SaveData.cs",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\SaveData.cs",
"RelativeDocumentMoniker": "BombTimer\\SaveData.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\SaveData.cs",
"RelativeToolTip": "BombTimer\\SaveData.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAcAAAAFAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-21T15:23:01.794Z"
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "Program.cs",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Program.cs",
"RelativeDocumentMoniker": "BombTimer\\Program.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Program.cs",
"RelativeToolTip": "BombTimer\\Program.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAwAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-21T15:22:55.544Z"
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "CountdownTimer.cs",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\CountdownTimer.cs",
"RelativeDocumentMoniker": "BombTimer\\CountdownTimer.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\CountdownTimer.cs",
"RelativeToolTip": "BombTimer\\CountdownTimer.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-21T15:22:53.719Z"
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Wnd.Designer.cs",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Wnd.Designer.cs",
"RelativeDocumentMoniker": "BombTimer\\Wnd.Designer.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Wnd.Designer.cs",
"RelativeToolTip": "BombTimer\\Wnd.Designer.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAGABAAArAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-21T15:22:17.567Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "Wnd.cs",
"DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Wnd.cs",
"RelativeDocumentMoniker": "BombTimer\\Wnd.cs",
"ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\Wnd.cs",
"RelativeToolTip": "BombTimer\\Wnd.cs",
"ViewState": "AQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-09-21T15:22:14.238Z"
}
]
}
]
}
]
}
Binary file added .vs/ProjectEvaluation/bombtimer.metadata.v8.bin
Binary file not shown.
Binary file added .vs/ProjectEvaluation/bombtimer.projects.v8.bin
Binary file not shown.
Binary file added .vs/ProjectEvaluation/bombtimer.strings.v8.bin
Binary file not shown.
25 changes: 25 additions & 0 deletions BombTimer.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 17
VisualStudioVersion = 17.10.34928.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BombTimer", "BombTimer\BombTimer.csproj", "{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {10C64467-FEB3-4DC4-B7FA-9D40FD56F253}
EndGlobalSection
EndGlobal
36 changes: 36 additions & 0 deletions BombTimer/BombTimer.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>c4_render.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
<Content Include="c4_render.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="SFML.Audio" Version="2.6.0" />
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions BombTimer/BombTimer.csproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Update="Wnd.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
</Project>
59 changes: 59 additions & 0 deletions BombTimer/CountdownTimer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System.Text;

namespace BombTimer
{
public static class CountdownTimer
{
public static System.Windows.Forms.Timer? timer;
public static int timeLeft;
public static string outPut = "99:99:99";

public static void Entry(StringBuilder inputStr)
{
// Seperate
string hours = inputStr.ToString(0, 2);
string minutes = inputStr.ToString(2, 2);
string seconds = inputStr.ToString(4, 2);

// Normalize
int h = int.Parse(hours);
int m = int.Parse(minutes);
int s = int.Parse(seconds);
h = h > 59 ? 59 : h;
m = m > 59 ? 59 : m;
s = s > 59 ? 59 : s;

// Format
StartCountdown(h * 3600 + m * 60 + s);
}

private static void StartCountdown(int inputTime)
{
timeLeft = inputTime;

timer = new() { Interval = 1000 };
timer.Tick += Timer_Tick;

timer.Start();
}

public delegate void OutPutEventHandler();
public static event OutPutEventHandler? OutPutEvent;
private static void Timer_Tick(object? sender, EventArgs e)
{
timeLeft--;

int s = timeLeft % 60;
int m = (timeLeft / 60) % 60;
int h = timeLeft / 3600;

outPut = $"{h:D2}:{m:D2}:{s:D2}";
OutPutEvent?.Invoke();

if (timeLeft <= 0)
{
timer?.Stop();
}
}
}
}
12 changes: 12 additions & 0 deletions BombTimer/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace BombTimer
{
internal static class Program
{
[STAThread]
static void Main()
{
ApplicationConfiguration.Initialize();
Application.Run(new Wnd());
}
}
}
83 changes: 83 additions & 0 deletions BombTimer/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 518c3e5

Please sign in to comment.