- tweak: file managment
This commit is contained in:
32
Nebula.Launcher/Views/Popup/ExceptionView.axaml
Normal file
32
Nebula.Launcher/Views/Popup/ExceptionView.axaml
Normal file
@@ -0,0 +1,32 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
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:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.Popup.ExceptionView"
|
||||
x:DataType="viewModels:ExceptionViewModel">
|
||||
<Design.DataContext>
|
||||
<viewModels:ExceptionViewModel />
|
||||
</Design.DataContext>
|
||||
<ScrollViewer Margin="10" Padding="0,0,8,0">
|
||||
<ItemsControl
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding Errors}"
|
||||
Padding="0">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type system:Exception}">
|
||||
<Border Background="#333333" CornerRadius="5" Margin="0,0,0,5">
|
||||
<StackPanel>
|
||||
<Border Background="#aa2222" CornerRadius="5,5,0,0">
|
||||
<Label Margin="4"><TextBlock Text="{Binding Message}"/></Label>
|
||||
</Border>
|
||||
<Label Margin="4"><TextBlock Text="{Binding StackTrace}"/></Label>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
20
Nebula.Launcher/Views/Popup/ExceptionView.axaml.cs
Normal file
20
Nebula.Launcher/Views/Popup/ExceptionView.axaml.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Nebula.Launcher.ViewModels;
|
||||
|
||||
namespace Nebula.Launcher.Views.Popup;
|
||||
|
||||
public partial class ExceptionView : UserControl
|
||||
{
|
||||
public ExceptionView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ExceptionView(ExceptionViewModel viewModel) : this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
32
Nebula.Launcher/Views/Popup/LoadingContextView.axaml
Normal file
32
Nebula.Launcher/Views/Popup/LoadingContextView.axaml
Normal file
@@ -0,0 +1,32 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
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:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.Popup.LoadingContextView"
|
||||
x:DataType="viewModels:LoadingContextViewModel">
|
||||
<Design.DataContext>
|
||||
<viewModels:LoadingContextViewModel />
|
||||
</Design.DataContext>
|
||||
<StackPanel Margin="25" Spacing="15">
|
||||
<ProgressBar Height="40" Maximum="{Binding CurrJobs}" Value="{Binding ResolvedJobs}"/>
|
||||
<Panel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||
<Label>
|
||||
<TextBlock Text="{Binding ResolvedJobs}"/>
|
||||
</Label>
|
||||
<Label>
|
||||
/
|
||||
</Label>
|
||||
<Label>
|
||||
<TextBlock Text="{Binding CurrJobs}"/>
|
||||
</Label>
|
||||
</StackPanel>
|
||||
|
||||
<Button HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<Label>Cancel</Label>
|
||||
</Button>
|
||||
</Panel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
17
Nebula.Launcher/Views/Popup/LoadingContextView.axaml.cs
Normal file
17
Nebula.Launcher/Views/Popup/LoadingContextView.axaml.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Avalonia.Controls;
|
||||
using Nebula.Launcher.ViewModels;
|
||||
|
||||
namespace Nebula.Launcher.Views.Popup;
|
||||
|
||||
public partial class LoadingContextView : UserControl
|
||||
{
|
||||
public LoadingContextView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public LoadingContextView(LoadingContextViewModel viewModel): this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user