Refactor application structure and add database support

Changed App.xaml.cs to implement dependency injection with Microsoft.Extensions.Hosting, initializing services for LandingWindow and LandingViewModel.

Removed MainWindow.xaml and MainWindow.xaml.cs, shifting to a new landing window structure.

Added Ghost.Database project with necessary database functionality and created ProjectRepository for project management.

Added ProjectInfo and TemplateInfo data models for project attributes.

Added CreateProjectViewModel and LandingViewModel for managing view models using Community Toolkit for MVVM.

Created new XAML pages for project creation, opening projects, and the landing window, along with their corresponding code-behind files.

Added AssemblyInfo.cs for internal visibility to facilitate testing.
This commit is contained in:
2025-03-25 13:13:04 +09:00
parent e63c43dbb2
commit 23a08bc8e0
19 changed files with 491 additions and 63 deletions

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8" ?>
<Window
x:Class="Ghost.Editor.View.Windows.LandingWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:Ghost.Editor.View.Windows"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="Landing"
mc:Ignorable="d">
<Grid Padding="4">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<SelectorBar
Grid.Row="0"
HorizontalAlignment="Right"
SelectionChanged="SelectorBar_SelectionChanged">
<SelectorBarItem IsSelected="True" Text="Open">
<SelectorBarItem.Icon>
<FontIcon Glyph="&#xE8A7;" />
</SelectorBarItem.Icon>
</SelectorBarItem>
<SelectorBarItem Text="Create">
<SelectorBarItem.Icon>
<FontIcon Glyph="&#xE8F4;" />
</SelectorBarItem.Icon>
</SelectorBarItem>
</SelectorBar>
<Frame
x:Name="ContentFrame"
Grid.Row="1"
Padding="24,8"
IsNavigationStackEnabled="False" />
</Grid>
</Window>