Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
add modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Pd233 committed Jan 2, 2024
1 parent ab396a3 commit c6554af
Show file tree
Hide file tree
Showing 10 changed files with 617 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/LipUI/LipUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
</ItemGroup>
<ItemGroup>
<None Remove="Pages\HomePage.xaml" />
<None Remove="Pages\HomePageModules\BdsPropertiesEditorPage.xaml" />
<None Remove="Pages\HomePageModules\ModulesPage.xaml" />
<None Remove="Pages\IndexPage.xaml" />
<None Remove="Pages\LipExecutionPanelPage.xaml" />
<None Remove="Pages\LocalPackagePage.xaml" />
Expand All @@ -47,6 +49,7 @@
<None Remove="VIews\LipIndexToothView.xaml" />
<None Remove="VIews\LipInstallerView.xaml" />
<None Remove="VIews\LocalToothView.xaml" />
<None Remove="VIews\ModuleIcon.xaml" />
<None Remove="VIews\ServerInstanceEditView.xaml" />
<None Remove="VIews\ServerInstanceView.xaml" />
<None Remove="VIews\ToothVersionView.xaml" />
Expand Down Expand Up @@ -112,6 +115,16 @@
<LastGenOutput>LanguageFiles.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Page Update="VIews\ModuleIcon.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Pages\HomePageModules\BdsPropertiesEditorPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="VIews\LocalToothView.xaml">
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -191,6 +204,11 @@
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Page Update="Pages\HomePageModules\ModulesPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>

<!--
Defining the "HasPackageAndPublishMenuAddedByProject" property here allows the Solution
Expand Down
61 changes: 61 additions & 0 deletions src/LipUI/Pages/HomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:LipUI.Pages"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Expand Down Expand Up @@ -75,5 +77,64 @@
</Grid>

</Border>

<Grid
Grid.Column="1">

<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition/>
</Grid.RowDefinitions>

<Grid
Grid.Row="0"
ColumnSpacing="4">

<Grid.ColumnDefinitions>
<ColumnDefinition Width="40"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>

<Button
Grid.Column="0"
Height="32"
x:Name="BackButton"
IsEnabled="False"
PointerEntered="BackButton_PointerEntered"
PointerExited="BackButton_PointerExited"
Click="BackButton_Click"
CornerRadius="0"
Background="Transparent"
BorderBrush="Transparent">

<AnimatedIcon x:Name='BackAnimatedIcon'>
<AnimatedIcon.Source>
<animatedvisuals:AnimatedBackVisualSource/>
</AnimatedIcon.Source>
<AnimatedIcon.FallbackIconSource>
<SymbolIconSource Symbol='Back'/>
</AnimatedIcon.FallbackIconSource>
</AnimatedIcon>

</Button>

<TextBlock
Grid.Column="1"
Foreground="{ThemeResource TextFillColorPrimary}"
Style="{StaticResource SubtitleTextBlockStyle}"
Text="Title"/>

</Grid>

<Frame
Grid.Row="1"
x:Name="ContentFrame"
NavigationFailed="ContentFrame_NavigationFailed"
Loading="ContentFrame_Loading"
Navigated="ContentFrame_Navigated">
</Frame>

</Grid>

</Grid>
</Page>
21 changes: 21 additions & 0 deletions src/LipUI/Pages/HomePage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using LipUI.Models;
using LipUI.Pages.HomePageModules;
using LipUI.VIews;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Diagnostics;
using System.IO;
Expand Down Expand Up @@ -75,4 +78,22 @@ private void StartServerButton_Click(object sender, RoutedEventArgs e)
Process.Start(path);
}
}

private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
=> throw new Exception("Failed to load Page " + e.SourcePageType.FullName);

private void ContentFrame_Loading(FrameworkElement sender, object args)
=> ContentFrame.Navigate(typeof(ModulesPage));

private void BackButton_PointerEntered(object sender, PointerRoutedEventArgs e)
=> AnimatedIcon.SetState(BackAnimatedIcon, "PointerOver");

private void BackButton_PointerExited(object sender, PointerRoutedEventArgs e)
=> AnimatedIcon.SetState(BackAnimatedIcon, "Normal");

private void BackButton_Click(object sender, RoutedEventArgs e)
=> ContentFrame.GoBack();

private void ContentFrame_Navigated(object sender, NavigationEventArgs e)
=> BackButton.IsEnabled = ContentFrame.CanGoBack;
}
71 changes: 71 additions & 0 deletions src/LipUI/Pages/HomePageModules/BdsPropertiesEditorPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="LipUI.Pages.HomePageModules.BdsPropertiesEditorPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:LipUI.Pages.HomePageModules"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="Transparent"
Loaded="Page_Loaded"
KeyDown="Page_KeyDown"
KeyUp="Page_KeyUp">

<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="ButtonDisabledBorderThemeBrush" Color="Transparent"/>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>
</Page.Resources>

<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>

<ScrollViewer
Grid.Row="0"
x:Name="Viewer">

<ListView
CharacterSpacing="16"
x:Name="PropertiesView">

</ListView>

</ScrollViewer>

<StackPanel
Grid.Row="1"
Orientation="Horizontal"
Height="32">

<Button
Click="SaveButton_Click"
Width="44"
Height="32"
Background="Transparent"
BorderBrush="Transparent">

<SymbolIcon
Symbol="Save"
Height="18"/>

</Button>

<InfoBar
x:Name="Bar">

</InfoBar>



</StackPanel>

</Grid>
</Page>
Loading

0 comments on commit c6554af

Please sign in to comment.