Skip to content

Commit 4083e2d

Browse files
sample added
1 parent d3f3564 commit 4083e2d

23 files changed

+570
-0
lines changed

SQLiteWinUI/SQLiteWinUI.sln

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.8.34309.116
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLiteWinUI", "SQLiteWinUI\SQLiteWinUI.csproj", "{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|ARM64 = Debug|ARM64
11+
Debug|x64 = Debug|x64
12+
Debug|x86 = Debug|x86
13+
Release|ARM64 = Release|ARM64
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|ARM64.ActiveCfg = Debug|ARM64
19+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|ARM64.Build.0 = Debug|ARM64
20+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|ARM64.Deploy.0 = Debug|ARM64
21+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|x64.ActiveCfg = Debug|x64
22+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|x64.Build.0 = Debug|x64
23+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|x64.Deploy.0 = Debug|x64
24+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|x86.ActiveCfg = Debug|x86
25+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|x86.Build.0 = Debug|x86
26+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Debug|x86.Deploy.0 = Debug|x86
27+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|ARM64.ActiveCfg = Release|ARM64
28+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|ARM64.Build.0 = Release|ARM64
29+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|ARM64.Deploy.0 = Release|ARM64
30+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|x64.ActiveCfg = Release|x64
31+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|x64.Build.0 = Release|x64
32+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|x64.Deploy.0 = Release|x64
33+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|x86.ActiveCfg = Release|x86
34+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|x86.Build.0 = Release|x86
35+
{E4C46402-0497-4360-BCC8-F56E8F4EC1E6}.Release|x86.Deploy.0 = Release|x86
36+
EndGlobalSection
37+
GlobalSection(SolutionProperties) = preSolution
38+
HideSolutionNode = FALSE
39+
EndGlobalSection
40+
GlobalSection(ExtensibilityGlobals) = postSolution
41+
SolutionGuid = {ABA61518-0F49-4FC5-B4E7-78565597E24B}
42+
EndGlobalSection
43+
EndGlobal

SQLiteWinUI/SQLiteWinUI/App.xaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Application
3+
x:Class="SQLiteWinUI.App"
4+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6+
xmlns:local="using:SQLiteWinUI">
7+
<Application.Resources>
8+
<ResourceDictionary>
9+
<ResourceDictionary.MergedDictionaries>
10+
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
11+
<!-- Other merged dictionaries here -->
12+
</ResourceDictionary.MergedDictionaries>
13+
<!-- Other app resources here -->
14+
</ResourceDictionary>
15+
</Application.Resources>
16+
</Application>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
using Microsoft.UI.Xaml;
2+
using Microsoft.UI.Xaml.Controls;
3+
using Microsoft.UI.Xaml.Controls.Primitives;
4+
using Microsoft.UI.Xaml.Data;
5+
using Microsoft.UI.Xaml.Input;
6+
using Microsoft.UI.Xaml.Media;
7+
using Microsoft.UI.Xaml.Navigation;
8+
using Microsoft.UI.Xaml.Shapes;
9+
using System;
10+
using System.Collections.Generic;
11+
using System.IO;
12+
using System.Linq;
13+
using System.Runtime.InteropServices.WindowsRuntime;
14+
using Windows.ApplicationModel;
15+
using Windows.ApplicationModel.Activation;
16+
using Windows.Foundation;
17+
using Windows.Foundation.Collections;
18+
19+
// To learn more about WinUI, the WinUI project structure,
20+
// and more about our project templates, see: http://aka.ms/winui-project-info.
21+
22+
namespace SQLiteWinUI
23+
{
24+
/// <summary>
25+
/// Provides application-specific behavior to supplement the default Application class.
26+
/// </summary>
27+
public partial class App : Application
28+
{
29+
/// <summary>
30+
/// Initializes the singleton application object. This is the first line of authored code
31+
/// executed, and as such is the logical equivalent of main() or WinMain().
32+
/// </summary>
33+
public App()
34+
{
35+
this.InitializeComponent();
36+
}
37+
38+
static SchedulerDatabase database;
39+
40+
public static SchedulerDatabase Database
41+
{
42+
get
43+
{
44+
if (database == null)
45+
{
46+
database = new SchedulerDatabase(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "WPFSchedulerDatabase5.db3"));
47+
}
48+
return database;
49+
}
50+
}
51+
52+
/// <summary>
53+
/// Invoked when the application is launched.
54+
/// </summary>
55+
/// <param name="args">Details about the launch request and process.</param>
56+
protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
57+
{
58+
m_window = new MainWindow();
59+
m_window.Activate();
60+
}
61+
62+
private Window m_window;
63+
}
64+
}
432 Bytes
Loading
5.25 KB
Loading
1.71 KB
Loading
637 Bytes
Loading
283 Bytes
Loading
456 Bytes
Loading
2.05 KB
Loading

0 commit comments

Comments
 (0)