Restructured the VM/Vs folder layout while it's still feasible

This commit is contained in:
Robert committed 2019-11-15 15:53:55 +01:00
1 parent 48acb10db4
commit 002cc6a6db
48 files changed
+397 -469

No files matched your search

@@ -0,0 +1,34 @@
<mah:MetroWindow x:Class="Artemis.UI.Screens.Splash.SplashView"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:splash="clr-namespace:Artemis.UI.Screens.Splash"
mc:Ignorable="d"
Title="Artemis"
Height="450"
Width="450"
ShowTitleBar="False"
ShowMaxRestoreButton="False"
ShowCloseButton="False"
ShowMinButton="False"
WindowStartupLocation="CenterScreen"
GlowBrush="{DynamicResource AccentColorBrush}"
FontFamily="{StaticResource DefaultFont}"
d:DataContext="{d:DesignInstance splash:SplashViewModel}">
<Grid Background="{DynamicResource PrimaryHueMidBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="250" />
<RowDefinition Height="50" />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Image Source="{StaticResource BowIcon}" Stretch="Uniform" Margin="6,50,6,6" />
<TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Bottom" Foreground="White" FontSize="16">
Artemis is initializing...
</TextBlock>
<TextBlock Grid.Row="2" HorizontalAlignment="Center" Foreground="#FFDDDDDD" Text="{Binding Status}" />
<ProgressBar Grid.Row="3" IsIndeterminate="True" Maximum="1" Minimum="1" Margin="16 0" />
</Grid>
</mah:MetroWindow>
@@ -0,0 +1,27 @@
using Artemis.Core.Services.Interfaces;
using Ninject;
using Stylet;
namespace Artemis.UI.Screens.Splash
{
public class SplashViewModel : Screen
{
private readonly IKernel _kernel;
public SplashViewModel(IKernel kernel)
{
_kernel = kernel;
Status = "Initializing Core";
}
public string Status { get; set; }
public void ListenToEvents()
{
var pluginService = _kernel.Get<IPluginService>();
pluginService.CopyingBuildInPlugins += (sender, args) => Status = "Updating built-in plugins";
pluginService.PluginLoading += (sender, args) => Status = "Loading plugin: " + args.PluginInfo.Name;
pluginService.PluginLoaded += (sender, args) => Status = "Initializing UI";
}
}
}