Changed the project namespace from `Ghost.Editor` to `Ghost.App` across multiple files. Changed the `InternalsVisibleTo` attribute in `AssemblyInfo.cs` to include `Ghost.App`. Changed the `ProjectRepository` class to add new asynchronous methods for retrieving projects by ID, name, and metadata path. Changed the `ProjectService` class to utilize the new asynchronous project loading methods. Changed the `SceneGraph` classes to improve node management and serialization. Changed the `EntityManager` class to enhance entity management with new component handling methods. Added new test classes, `EntityTest` and `SerializationTest`, to ensure reliability in entity and serialization systems. Added the `Ghost.App` project file to establish a modular project structure. Added the `Ghost.Generator` project for automated component serialization code generation. Updated UI components to reflect the new namespace for proper functionality.
165 lines
7.0 KiB
XML
165 lines
7.0 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<Page
|
|
x:Class="Ghost.App.View.Pages.Landing.OpenProjectPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="using:Ghost.Editor.Utilities.Converters"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:data="using:Ghost.Data.Models"
|
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
|
xmlns:local="using:Ghost.App.View.Pages.Landing"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
NavigationCacheMode="Enabled"
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
|
<converters:GetDirectoryNameConverter x:Key="DirNameConverter" />
|
|
</Page.Resources>
|
|
|
|
<Grid x:Name="MainContainer">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" Margin="16,4">
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
Text="Projects" />
|
|
<AutoSuggestBox
|
|
Width="300"
|
|
HorizontalAlignment="Right"
|
|
PlaceholderText="Search project by name"
|
|
QueryIcon="Find" />
|
|
</Grid>
|
|
|
|
<!-- Header for the ListView -->
|
|
<Grid Grid.Row="1" Margin="28,16,45,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition Width="165" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Column="0"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="NAME" />
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Right"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="LAST OPEN" />
|
|
<TextBlock
|
|
Grid.Column="2"
|
|
HorizontalAlignment="Right"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="ENGINE VERSION" />
|
|
</Grid>
|
|
|
|
<!-- Project ListView -->
|
|
<Grid
|
|
Grid.Row="2"
|
|
Padding="8"
|
|
AllowDrop="True"
|
|
DragEnter="ProjectContainer_DragEnter"
|
|
DragLeave="ProjectContainer_DragLeave"
|
|
DragOver="ProjectContainer_DragOver"
|
|
Drop="ProjectContainer_Drop">
|
|
<ListView
|
|
Padding="4,8"
|
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
|
IsItemClickEnabled="True"
|
|
ItemClick="ListView_ItemClick"
|
|
ItemsSource="{x:Bind ViewModel.projects}"
|
|
SelectionMode="None">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate x:DataType="data:ProjectMetadataInfo">
|
|
<Grid Height="64" Padding="4,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition Width="100" />
|
|
<ColumnDefinition Width="65" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Grid.Column="0" VerticalAlignment="Center">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
Grid.Row="0"
|
|
VerticalAlignment="Center"
|
|
FontSize="16"
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
Text="{x:Bind Metadata.Name}" />
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
Margin="0,4,0,0"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="{x:Bind Path, Converter={StaticResource DirNameConverter}}" />
|
|
</Grid>
|
|
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Margin="16,4"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind Metadata.LastOpened}" />
|
|
<TextBlock
|
|
Grid.Column="2"
|
|
Margin="16,4"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{x:Bind Metadata.EngineVersion}" />
|
|
<Button
|
|
Grid.Column="3"
|
|
HorizontalAlignment="Right"
|
|
Background="Transparent"
|
|
BorderThickness="0">
|
|
<FontIcon Glyph="" />
|
|
</Button>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
|
|
<!-- Drag Visual -->
|
|
<Grid
|
|
x:Name="DragVisual"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="{ThemeResource CardStrokeColorDefaultBrush}"
|
|
BorderBrush="{ThemeResource ControlStrongStrokeColorDefaultBrush}"
|
|
BorderThickness="2"
|
|
CornerRadius="{StaticResource OverlayCornerRadius}"
|
|
Visibility="{x:Bind ViewModel.DragVisibility, Mode=OneWay}">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
|
Style="{StaticResource TitleTextBlockStyle}"
|
|
Text="Drage Project Folder Here" />
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<!-- Empty Place Holder -->
|
|
<Grid
|
|
x:Name="EmptyPlaceHolder"
|
|
Grid.Row="2"
|
|
Visibility="{x:Bind ViewModel.EmptyVisibility, Mode=OneWay}">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Style="{StaticResource TitleTextBlockStyle}"
|
|
Text="No projects found" />
|
|
</Grid>
|
|
</Grid>
|
|
</Page> |