Skip to content

Commit

Permalink
Cleaned up UI, added stuff to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
mazarskov committed Jul 27, 2024
1 parent 39f3e94 commit d1a22b5
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 39 deletions.
8 changes: 4 additions & 4 deletions AboutControl.Designer.cs

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

27 changes: 20 additions & 7 deletions HomeControl.Designer.cs

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

23 changes: 22 additions & 1 deletion HomeControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ private void InitializeTimer()
{
System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer();
timer.Interval = 1000; // 1 second
timer.Tick += Timer_Tick;
if (!DesignMode)
{
timer.Tick += Timer_Tick;
}
timer.Start();
}

Expand Down Expand Up @@ -177,6 +180,24 @@ private async void Timer_Tick(object sender, EventArgs e)

appString.Text = $"{finString}";
}
else
{
//TODO: rn doesnt stop the db recoprding process
// If the current app is being tracked, stop tracking it
if (currentApp != null)
{
end = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
Debug.WriteLine($"{currentApp}, Start-{start}, End-{end}");
if (!DesignMode)
{
await Task.Run(() => DatabaseHelper.InsertDataAsync(currentApp, start, end));
}


currentApp = null; // Reset currentApp
}
appString.Text = $"No active app";
}
}
finally
{
Expand Down
28 changes: 15 additions & 13 deletions MainForm.Designer.cs

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

23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# ScreenTime
# ScreenTime

ScreenTime is an app to track how much time you have spend across various applications on Windows.

The app is stil in development, so any feedback and suggestions are appreciated!


## Features

- Currently focused app tracking every second.
- App usage history, by calendar day.
- Fully local databse, no imternet connection or account creation required.
- App usage history, by hour. (W.I.P)
- User-set status according to the currently focused app. (W.I.P)

## How to use

I welcome contributions to my projects. No specific rules, do whatever you want.

## Contact

You can reach me at [email protected] or connect with me on [LinkedIn](https://www.linkedin.com/in/maksim-azarskov-59a6b6215/).
13 changes: 8 additions & 5 deletions ReportsControl.Designer.cs

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

5 changes: 2 additions & 3 deletions ScreenTime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>E:\coding\Projects\</PublishUrl>
<PublishUrl>E:\coding\Projects\Screen\bin\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
Expand All @@ -28,8 +28,7 @@
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<WebPage>publish.htm</WebPage>
<AutorunEnabled>true</AutorunEnabled>
<ApplicationRevision>4</ApplicationRevision>
<ApplicationRevision>5</ApplicationRevision>
<ApplicationVersion>0.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
Expand Down
10 changes: 5 additions & 5 deletions SettingsControl.Designer.cs

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

0 comments on commit d1a22b5

Please sign in to comment.