- add: Settings, start
This commit is contained in:
17
Nebula.Launcher/Views/Config/StringConfigurationView.axaml
Normal file
17
Nebula.Launcher/Views/Config/StringConfigurationView.axaml
Normal file
@@ -0,0 +1,17 @@
|
||||
<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:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.Config.StringConfigurationView"
|
||||
x:DataType="pages:StringConfigurationViewModel">
|
||||
<Design.DataContext>
|
||||
<pages:StringConfigurationViewModel />
|
||||
</Design.DataContext>
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" Margin="5">
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding ConfigName}"/>
|
||||
<TextBlock VerticalAlignment="Center" Text=":"/>
|
||||
<TextBox Text="{Binding ConfigText}"/>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,20 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Nebula.Launcher.ViewModels.Pages;
|
||||
|
||||
namespace Nebula.Launcher.Views.Config;
|
||||
|
||||
public partial class StringConfigurationView : UserControl
|
||||
{
|
||||
public StringConfigurationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public StringConfigurationView(StringConfigurationViewModel viewModel)
|
||||
: this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
40
Nebula.Launcher/Views/Pages/ConfigurationView.axaml
Normal file
40
Nebula.Launcher/Views/Pages/ConfigurationView.axaml
Normal file
@@ -0,0 +1,40 @@
|
||||
<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:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.Pages.ConfigurationView"
|
||||
x:DataType="pages:ConfigurationViewModel">
|
||||
<Design.DataContext>
|
||||
<pages:ConfigurationViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
<Panel>
|
||||
<Border
|
||||
VerticalAlignment="Top"
|
||||
Margin="5" Padding="5,2,5,2">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="50%,100%" StartPoint="50%,0%">
|
||||
<GradientStop Color="#222222" Offset="0.0" />
|
||||
<GradientStop Color="#292222" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<ScrollViewer >
|
||||
<StackPanel>
|
||||
<ItemsControl
|
||||
ItemsSource="{Binding ConfigurationVerbose}"
|
||||
Padding="0" />
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<Button
|
||||
VerticalAlignment="Bottom"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="5"
|
||||
Margin="5"
|
||||
Command="{Binding InvokeUpdateConfiguration}"
|
||||
>Save
|
||||
</Button>
|
||||
</Panel>
|
||||
</UserControl>
|
||||
20
Nebula.Launcher/Views/Pages/ConfigurationView.axaml.cs
Normal file
20
Nebula.Launcher/Views/Pages/ConfigurationView.axaml.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Nebula.Launcher.ViewModels.Pages;
|
||||
|
||||
namespace Nebula.Launcher.Views.Pages;
|
||||
|
||||
public partial class ConfigurationView : UserControl
|
||||
{
|
||||
public ConfigurationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ConfigurationView(ConfigurationViewModel viewModel)
|
||||
: this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user