Skip to content

Commit 3f81f3e

Browse files
committed
Update dll
1 parent c657482 commit 3f81f3e

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

app/Project Tracker Server/Project Tracker Server/Program.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class Program {
2626
private static bool viewConnectionDetails = false;
2727
private static bool viewStatistics = false;
2828
private static bool resetWeek = false;
29+
private static bool speedUpStatistics = false;
2930
private static string lastMonth = "";
3031

3132
private static string[] resetDaysOpened = {
@@ -297,6 +298,14 @@ private static void BackgroundConsoleHelper() {
297298
if (key.Key == ConsoleKey.E) {
298299
viewStatistics = false;
299300
}
301+
else if (key.Key == ConsoleKey.S) {
302+
if (speedUpStatistics) {
303+
speedUpStatistics = false;
304+
}
305+
else {
306+
speedUpStatistics = true;
307+
}
308+
}
300309
}
301310
}
302311
else if (action == 3) {
@@ -354,7 +363,8 @@ private static void BackgroundStatistics() {
354363
if (viewStatistics) {
355364
Console.Clear();
356365
Console.WriteLine("You're currently viewing statistics.");
357-
Console.WriteLine("Press E to go back to the main console menu.\n");
366+
Console.WriteLine("Press E to go back to the main console menu.");
367+
Console.WriteLine("Press S to speed up/slow down statistics.");
358368

359369
int secondsUntilReset = resetTimer;
360370
int minutesUntilReset = 0;
@@ -430,7 +440,13 @@ private static void BackgroundStatistics() {
430440
if (resetTimer == 0) {
431441
resetTimer = 600;
432442
}
433-
Thread.Sleep(5000);
443+
444+
if (speedUpStatistics) {
445+
Thread.Sleep(1000);
446+
}
447+
else {
448+
Thread.Sleep(5000);
449+
}
434450
}
435451
}
436452

app/Server Communication DLL/Server Communication DLL/SetData.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ public static void SetActivity(bool isActive) {
103103
}
104104

105105
public static void Refresh(int a) {
106+
FileManager.PrepareDataTransfer();
107+
FileManager.isOpen = true;
106108
Connections.CreateConnection();
107109
// throw new Exception("hiiii");
108110
// Add something here about how long the user has been active
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)