- add: Service think
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Padding="10">
|
||||
<Label>Server name</Label>
|
||||
<TextBlock x:Name="ServerNameLabel">Server name</TextBlock>
|
||||
</Border>
|
||||
<Border
|
||||
BorderThickness="2,0,0,0"
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
||||
namespace Nebula.Launcher.Views.Controls;
|
||||
|
||||
public partial class ServerContainerControl : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<string> ServerNameProperty
|
||||
= AvaloniaProperty.Register<ServerContainerControl, string>(nameof (ServerName));
|
||||
|
||||
public string ServerName
|
||||
{
|
||||
get => GetValue(ServerNameProperty);
|
||||
set
|
||||
{
|
||||
SetValue(ServerNameProperty, value);
|
||||
ServerNameLabel.Text = value;
|
||||
}
|
||||
}
|
||||
|
||||
public ServerContainerControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -2,29 +2,34 @@
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
x:Class="Nebula.Launcher.Views.Pages.ServerListView"
|
||||
x:DataType="pages:ServerListView"
|
||||
x:Class="Nebula.Launcher.Views.Pages.ServerListView"
|
||||
x:DataType="viewModels:ServerListViewModel"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:controls="clr-namespace:Nebula.Launcher.Views.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:pages="clr-namespace:Nebula.Launcher.Views.Pages">
|
||||
xmlns:models="clr-namespace:Nebula.Launcher.Models"
|
||||
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Design.DataContext>
|
||||
<viewModels:ServerListViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
<Grid ColumnDefinitions="*" RowDefinitions="*,40">
|
||||
<ScrollViewer Margin="0,0,0,10" Padding="0,0,8,0">
|
||||
<StackPanel>
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
<controls:ServerContainerControl />
|
||||
</StackPanel>
|
||||
<ListBox
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding ServerInfos}"
|
||||
Padding="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:ServerInfo}">
|
||||
<controls:ServerContainerControl ServerName="{Binding StatusData.Name}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
|
||||
<Border
|
||||
BorderThickness="2,0,0,0"
|
||||
CornerRadius="10"
|
||||
|
||||
Reference in New Issue
Block a user