diff --git a/.vs/BombTimer/DesignTimeBuild/.dtbcache.v2 b/.vs/BombTimer/DesignTimeBuild/.dtbcache.v2 index 946a50c..fb66e9a 100644 Binary files a/.vs/BombTimer/DesignTimeBuild/.dtbcache.v2 and b/.vs/BombTimer/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/BombTimer/v17/.futdcache.v2 b/.vs/BombTimer/v17/.futdcache.v2 index 83cace4..80af14f 100644 Binary files a/.vs/BombTimer/v17/.futdcache.v2 and b/.vs/BombTimer/v17/.futdcache.v2 differ diff --git a/.vs/BombTimer/v17/.suo b/.vs/BombTimer/v17/.suo index c9823c9..c8bc338 100644 Binary files a/.vs/BombTimer/v17/.suo and b/.vs/BombTimer/v17/.suo differ diff --git a/.vs/BombTimer/v17/DocumentLayout.json b/.vs/BombTimer/v17/DocumentLayout.json index 3cf613a..8bcb2cf 100644 --- a/.vs/BombTimer/v17/DocumentLayout.json +++ b/.vs/BombTimer/v17/DocumentLayout.json @@ -2,25 +2,13 @@ "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.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}" - }, - { - "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\\updatenotifier.designer.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\updatenotifier.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\\updatenotifier.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{3C394F86-AE6C-4D5B-8875-A51878CC3F7C}|BombTimer\\BombTimer.csproj|solutionrelative:bombtimer\\updatenotifier.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\\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": [ @@ -30,7 +18,7 @@ "DocumentGroups": [ { "DockedHeight": 200, - "SelectedChildIndex": 5, + "SelectedChildIndex": 3, "Children": [ { "$type": "Bookmark", @@ -40,69 +28,30 @@ "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" }, - { - "$type": "Document", - "DocumentIndex": 3, - "Title": "UpdateNotifier.cs", - "DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.cs", - "RelativeDocumentMoniker": "BombTimer\\UpdateNotifier.cs", - "ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.cs", - "RelativeToolTip": "BombTimer\\UpdateNotifier.cs", - "ViewState": "AgIAAAMAAAAAAAAAAAAAAAgAAAAiAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-12-08T06:43:27.149Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 2, - "Title": "UpdateNotifier.Designer.cs", - "DocumentMoniker": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.Designer.cs", - "RelativeDocumentMoniker": "BombTimer\\UpdateNotifier.Designer.cs", - "ToolTip": "C:\\Users\\stelu\\source\\repos\\BombTimer\\BombTimer\\UpdateNotifier.Designer.cs", - "RelativeToolTip": "BombTimer\\UpdateNotifier.Designer.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAACwAAAANAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-12-08T06:43:11.376Z", - "EditorCaption": "" - }, { "$type": "Document", "DocumentIndex": 1, - "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": "AgIAAAAAAAAAAAAAAAAAAO4AAAAsAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-11-23T18:22:29.753Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 0, "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": "AgIAAAAAAAAAAAAAAAAAAAwAAAApAAAAAAAAAA==", + "ViewState": "AgIAAFQAAAAAAAAAAAAUwGAAAAAuAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-11-13T17:17:34.604Z", - "EditorCaption": "" + "WhenOpened": "2024-11-13T17:17:34.604Z" }, { "$type": "Document", - "DocumentIndex": 4, + "DocumentIndex": 0, "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": "AgIAAAAAAAAAAAAAAAAAAAgAAAAjAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAA7AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-11-15T09:55:17.372Z" + "WhenOpened": "2024-11-15T09:55:17.372Z", + "EditorCaption": "" } ] } diff --git a/BombTimer/Program.cs b/BombTimer/Program.cs index 79a01b4..7028dd0 100644 --- a/BombTimer/Program.cs +++ b/BombTimer/Program.cs @@ -12,3 +12,6 @@ static void Main() // Uninstaller // Project timer +// Switch to Google Cloud API +// Close the issue +// Add presets like 1 hour or half an hour to f1 f2 or smth diff --git a/BombTimer/Wnd.cs b/BombTimer/Wnd.cs index 412e408..0913240 100644 --- a/BombTimer/Wnd.cs +++ b/BombTimer/Wnd.cs @@ -2,6 +2,7 @@ using SFML.Audio; using Octokit; using System.Net; +using System.Diagnostics; //using System.Diagnostics; namespace BombTimer @@ -72,8 +73,29 @@ public Wnd() ClientSize = data.wndSize; ctxMenuStrip.Renderer = new CustomContextMenuRenderer(); + + ///////////////////////////////////////////////////////// + + fileWatcher = new FileSystemWatcher(); + fileWatcher.Path = @"C:\Users\stelu\Desktop\ASS"; + fileWatcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName; + fileWatcher.Filter = "*.*"; + + fileWatcher.Changed += OnChanged; + fileWatcher.Created += OnChanged; + fileWatcher.Deleted += OnChanged; + + fileWatcher.IncludeSubdirectories = true; + fileWatcher.EnableRaisingEvents = true; } + private void OnChanged(object sender, FileSystemEventArgs e) + { + MessageBox.Show($"File: {e.FullPath} {e.ChangeType}", "File System Watcher"); + } + + private FileSystemWatcher fileWatcher; + readonly List soundList = new List { "sounds/moveout.wav", "sounds/bombpl.wav", "sounds/com_go.wav", "sounds/letsgo.wav", "sounds/locknload.wav" }; SoundBuffer startBuffer; Sound startSound = new Sound(); @@ -240,6 +262,8 @@ private void QuitAction() string json = JsonConvert.SerializeObject(data, Formatting.Indented); File.WriteAllText("save.json", json); + fileWatcher.Dispose(); + System.Windows.Forms.Application.Exit(); }