-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f9e46d2
commit fb77fbf
Showing
34 changed files
with
1,044 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"BackgroundImageAbsolutePath": "C:\\Users\\Hephaestus\\Pictures\\elephant meets seal.jpg", | ||
"BackgroundImagesDirectoryAbsolutePath": "c:\\users\\hephaestus\\appdata\\local\\microsoft\\visualstudio\\17.0_0c0dd023\\extensions\\yhitju51.knt\\Images", | ||
"ExpandToIDE": true, | ||
"Extensions": ".png, .jpg, .gif, .bmp", | ||
"ImageBackgroundType": 0, | ||
"ImageFadeAnimationInterval": "PT5S", | ||
"ImageStretch": 3, | ||
"IsLimitToMainlyEditorWindow": false, | ||
"LoopSlideshow": true, | ||
"MaxHeight": 0, | ||
"MaxWidth": 0, | ||
"Opacity": 0.1, | ||
"PositionHorizon": 0, | ||
"PositionVertical": 1, | ||
"ShuffleSlideshow": false, | ||
"SoftEdgeX": 0, | ||
"SoftEdgeY": 0, | ||
"TileMode": 0, | ||
"UpdateImageInterval": "PT1M", | ||
"ViewBoxPointX": 0, | ||
"ViewBoxPointY": 0, | ||
"ViewPortHeight": 1, | ||
"ViewPortPointX": 0, | ||
"ViewPortPointY": 0, | ||
"ViewPortWidth": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace ForgetMeLock.Backend.Data | ||
{ | ||
public class NoteContext | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0-preview3" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-preview.4.22229.2" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.0-preview.4.22229.2" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ForgetMeLock.Backend.Model | ||
{ | ||
public class Category | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ForgetMeLock.Backend.Model | ||
{ | ||
public enum Mood | ||
{ | ||
Happy, | ||
Sad, | ||
Worried, | ||
Angry, | ||
Frustrated, | ||
Lovestruck, | ||
Exhausted | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ForgetMeLock.Backend.Model | ||
{ | ||
public class Note | ||
{ | ||
public int Id { get; set; } | ||
public string? Title { get; set; } | ||
public DateTime DueTime { get; set; } | ||
public DateTime Created { get; set; } = DateTime.Now; | ||
public string? Content { get; set; } = string.Empty; | ||
public Mood? StateOfMind { get; set; } | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using ForgetMeLock.Backend.Model; | ||
using ForgetMeLock.Backend.Data; | ||
|
||
namespace ForgetMeLock.Backend.Services | ||
{ | ||
public class SqliteDS | ||
{ | ||
private readonly NoteContext context; | ||
|
||
public SqliteDS (NoteContext dbContext) | ||
{ | ||
this.context = dbContext; | ||
this.context.Database.EnsureCreated(); | ||
} | ||
|
||
public IEnumerable<Note> GetAll() | ||
{ | ||
return this.context.Notes.AsEnumerable(); | ||
} | ||
|
||
public async Task<Note> GetByIdAsync(int id) | ||
{ | ||
return await this.context.Notes.Where(e => e.Id == id).FirstOrDefaultAsync(); | ||
} | ||
|
||
public async Task UpsertAsync(Note note) | ||
{ | ||
//obviously this forbids last name changes | ||
await this.context.Notes.Upsert(note).On(e => new { e.FirstName, e.LastName }).RunAsync(); | ||
|
||
} | ||
|
||
public async Task DeleteAsync(int id) | ||
{ | ||
var note = await GetByIdAsync(id); | ||
if (note != null) | ||
{ | ||
this.context.Notes.Remove(note); | ||
await this.context.SaveChangesAsync(); | ||
} | ||
else | ||
{ | ||
Debug.WriteLine($"Failed to delete id {id}"); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ForgetMeLock.Backend.ViewModels | ||
{ | ||
public class InputViewModel | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using CommunityToolkit.Mvvm.Input; | ||
|
||
namespace ForgetMeLock.Backend.ViewModels | ||
{ | ||
internal class NotesDueViewModel | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using ForgetMeLock.Backend.Model; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
|
||
namespace ForgetMeLock.Backend.ViewModels | ||
{ | ||
public partial class ObservableNote : ObservableObject | ||
{ | ||
private readonly Note note; | ||
public ObservableNote(Note note) => this.note = note; | ||
|
||
[ObservableProperty] | ||
private int id; | ||
[ObservableProperty] | ||
private string? title; | ||
[ObservableProperty] | ||
private DateTime dueTime; | ||
[ObservableProperty] | ||
private DateTime created; | ||
[ObservableProperty] | ||
private Mood stateOfMind; | ||
|
||
|
||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<Application | ||
x:Class="ForgetMeLock.UI.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:ForgetMeLock.UI"> | ||
<Application.Resources> | ||
<ResourceDictionary> | ||
<ResourceDictionary.MergedDictionaries> | ||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" /> | ||
<!-- Other merged dictionaries here --> | ||
</ResourceDictionary.MergedDictionaries> | ||
<!-- Other app resources here --> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Microsoft.UI.Xaml.Controls.Primitives; | ||
using Microsoft.UI.Xaml.Data; | ||
using Microsoft.UI.Xaml.Input; | ||
using Microsoft.UI.Xaml.Media; | ||
using Microsoft.UI.Xaml.Navigation; | ||
using Microsoft.UI.Xaml.Shapes; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.ApplicationModel; | ||
using Windows.ApplicationModel.Activation; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
|
||
// To learn more about WinUI, the WinUI project structure, | ||
// and more about our project templates, see: http://aka.ms/winui-project-info. | ||
|
||
namespace ForgetMeLock.UI | ||
{ | ||
/// <summary> | ||
/// Provides application-specific behavior to supplement the default Application class. | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
/// <summary> | ||
/// Initializes the singleton application object. This is the first line of authored code | ||
/// executed, and as such is the logical equivalent of main() or WinMain(). | ||
/// </summary> | ||
public App() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
/// <summary> | ||
/// Invoked when the application is launched normally by the end user. Other entry points | ||
/// will be used such as when the application is launched to open a specific file. | ||
/// </summary> | ||
/// <param name="args">Details about the launch request and process.</param> | ||
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) | ||
{ | ||
m_window = new MainWindow(); | ||
m_window.Activate(); | ||
} | ||
|
||
private Window m_window; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+283 Bytes
ForgetMeLock.UI/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework> | ||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion> | ||
<RootNamespace>ForgetMeLock.UI</RootNamespace> | ||
<ApplicationManifest>app.manifest</ApplicationManifest> | ||
<Platforms>x86;x64;arm64</Platforms> | ||
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> | ||
<PublishProfile>win10-$(Platform).pubxml</PublishProfile> | ||
<UseWinUI>true</UseWinUI> | ||
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling> | ||
<DefaultLanguage>en</DefaultLanguage> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Remove="UserControls\MarkdownInputBox.xaml" /> | ||
<None Remove="Views\InputPage.xaml" /> | ||
<None Remove="Views\NotesDuePage.xaml" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Include="Assets\SplashScreen.scale-200.png" /> | ||
<Content Include="Assets\LockScreenLogo.scale-200.png" /> | ||
<Content Include="Assets\Square150x150Logo.scale-200.png" /> | ||
<Content Include="Assets\Square44x44Logo.scale-200.png" /> | ||
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" /> | ||
<Content Include="Assets\StoreLogo.png" /> | ||
<Content Include="Assets\Wide310x150Logo.scale-200.png" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0-preview3" /> | ||
<PackageReference Include="CommunityToolkit.WinUI.UI.Controls" Version="7.1.2" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.0-preview.4.22229.2" /> | ||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0" /> | ||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.194" /> | ||
<Manifest Include="$(ApplicationManifest)" /> | ||
</ItemGroup> | ||
|
||
<!-- Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging | ||
Tools extension to be activated for this project even if the Windows App SDK Nuget | ||
package has not yet been restored --> | ||
<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnablePreviewMsixTooling)'=='true'"> | ||
<ProjectCapability Include="Msix" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\ForgetMeLock.Backend\ForgetMeLock.Backend.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Page Update="Views\NotesDuePage.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
</Page> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Page Update="Views\InputPage.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
</Page> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Page Update="UserControls\MarkdownInputBox.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
</Page> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Window | ||
x:Class="ForgetMeLock.UI.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:ForgetMeLock.UI" | ||
xmlns:views="using:ForgetMeLock.UI.Views" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d"> | ||
<views:NotesDuePage/> | ||
|
||
</Window> |
Oops, something went wrong.