- add: Content manipulation think
This commit is contained in:
@@ -7,60 +7,15 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
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:viewModels="clr-namespace:Nebula.Launcher.ViewModels" IsEnabled="{Binding PageEnabled}">
|
||||
xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.DataContext>
|
||||
<viewModels:AccountInfoViewModel />
|
||||
</Design.DataContext>
|
||||
<Grid ColumnDefinitions="*,1.5*" RowDefinitions="*" Margin="15">
|
||||
<StackPanel Grid.Column="0" Grid.Row="0">
|
||||
<Border
|
||||
CornerRadius="10"
|
||||
Margin="5"
|
||||
Padding="15">
|
||||
<StackPanel HorizontalAlignment="Center" Spacing="15">
|
||||
<Image
|
||||
Height="100"
|
||||
Margin="0,0,0,20"
|
||||
Source="/Assets/account.png" />
|
||||
<Grid ColumnDefinitions="100, 100" RowDefinitions="Auto, Auto, Auto, Auto" VerticalAlignment="Center">
|
||||
<Label Grid.Column="0" Grid.Row="0" VerticalAlignment="Center">Login:</Label>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Text="{Binding CurrentLogin}"/>
|
||||
<Label Grid.Column="0" Grid.Row="1" VerticalAlignment="Center">Password:</Label>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
PasswordChar="#"
|
||||
Text="{Binding CurrentPassword}" />
|
||||
<Label Grid.Column="0" Grid.Row="2" VerticalAlignment="Center">Auth server:</Label>
|
||||
<TextBox
|
||||
Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Text="{Binding CurrentAuthServer}"/>
|
||||
<ScrollViewer Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Height="80">
|
||||
<ListBox Margin="15" Background="#00000000" ItemsSource="{Binding AuthUrls}" SelectedItem="{Binding AuthItemSelect}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label><TextBlock Text="{Binding}"/></Label>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
Margin="5" Spacing="5"
|
||||
Orientation="Horizontal">
|
||||
<Button Command="{Binding OnSaveProfile}"><Label>Save profile</Label></Button>
|
||||
<Button Command="{Binding DoAuth}"><Label>Auth</Label></Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="*,1.5*"
|
||||
Margin="15"
|
||||
RowDefinitions="*">
|
||||
<StackPanel Grid.Column="1" Grid.Row="0">
|
||||
<Border
|
||||
CornerRadius="10,10,0,0"
|
||||
@@ -71,28 +26,36 @@
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<ListBox
|
||||
Background="#00000000"
|
||||
Classes="AccountSelector"
|
||||
ItemsSource="{Binding Accounts}"
|
||||
Padding="0" Classes="AccountSelector">
|
||||
Padding="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type viewModels:AuthLoginPasswordModel}">
|
||||
<Border Margin="5,5,5,0"
|
||||
<Border
|
||||
CornerRadius="0,10,0,10"
|
||||
Margin="5,5,5,0"
|
||||
VerticalAlignment="Center">
|
||||
<Panel>
|
||||
<StackPanel Margin="10,5,5,5" Orientation="Horizontal">
|
||||
<Label>Name:</Label>
|
||||
<Label><TextBlock Text="{Binding Login}"/></Label>
|
||||
<Label>
|
||||
<TextBlock Text="{Binding Login}" />
|
||||
</Label>
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
|
||||
<Button CornerRadius="0,0,0,10" Padding="5" Command="{Binding OnSelect}">
|
||||
<Button
|
||||
Command="{Binding OnSelect}"
|
||||
CornerRadius="0,0,0,10"
|
||||
Padding="5">
|
||||
<Label>
|
||||
Select
|
||||
</Label>
|
||||
</Button>
|
||||
<Button
|
||||
BorderThickness="2,0,0,0"
|
||||
Command="{Binding OnDelete}"
|
||||
CornerRadius="0,10,0,0"
|
||||
Padding="5" Command="{Binding OnDelete}">
|
||||
Padding="5">
|
||||
<Label>
|
||||
Delete
|
||||
</Label>
|
||||
@@ -102,8 +65,107 @@
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="{Binding AuthViewSpan}"
|
||||
Grid.Row="0">
|
||||
<Border
|
||||
CornerRadius="10"
|
||||
Margin="5"
|
||||
Padding="15">
|
||||
<Panel>
|
||||
<StackPanel IsVisible="{Binding !IsLogged}" Spacing="15">
|
||||
<Image
|
||||
Height="100"
|
||||
Margin="0,0,0,20"
|
||||
Source="/Assets/account.png" />
|
||||
<StackPanel HorizontalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center">
|
||||
Login:
|
||||
</Label>
|
||||
<TextBox Text="{Binding CurrentLogin}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label HorizontalAlignment="Left" VerticalAlignment="Center">
|
||||
Password:
|
||||
</Label>
|
||||
<TextBox PasswordChar="#" Text="{Binding CurrentPassword}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label VerticalAlignment="Center">
|
||||
Auth server:
|
||||
</Label>
|
||||
<TextBox Text="{Binding CurrentAuthServer}" />
|
||||
<Button Command="{Binding ExpandAuthUrlCommand}" VerticalAlignment="Stretch">
|
||||
<Label>+</Label>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<Border
|
||||
Background="#333333"
|
||||
CornerRadius="10"
|
||||
IsVisible="{Binding AuthUrlConfigExpand}">
|
||||
<ScrollViewer Height="80">
|
||||
<ListBox
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding AuthUrls}"
|
||||
Margin="5"
|
||||
SelectedItem="{Binding AuthItemSelect}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label>
|
||||
<TextBlock Text="{Binding}" />
|
||||
</Label>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<Button
|
||||
Command="{Binding DoAuth}"
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center">
|
||||
<Label>Auth</Label>
|
||||
</Button>
|
||||
<Button Command="{Binding ExpandAuthViewCommand}" HorizontalAlignment="Right">
|
||||
<Label>
|
||||
>
|
||||
</Label>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel IsVisible="{Binding IsLogged}">
|
||||
<Image
|
||||
Height="100"
|
||||
Margin="0,0,0,20"
|
||||
Source="/Assets/account.png" />
|
||||
<Label>
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
||||
<TextBlock>Hello:</TextBlock>
|
||||
<TextBlock Text="{Binding CurrentLogin}" />
|
||||
</StackPanel>
|
||||
</Label>
|
||||
<StackPanel
|
||||
HorizontalAlignment="Center"
|
||||
Margin="5"
|
||||
Orientation="Horizontal"
|
||||
Spacing="5">
|
||||
<Button Command="{Binding Logout}">
|
||||
<Label>Logout</Label>
|
||||
</Button>
|
||||
<Button Command="{Binding SaveProfileCommand}">
|
||||
<Label>Save profile</Label>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
ItemsSource="{Binding ServerInfos}"
|
||||
Padding="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:ServerHubInfo}">
|
||||
<DataTemplate DataType="{x:Type viewModels:ServerEntryModelView}">
|
||||
<Grid
|
||||
ColumnDefinitions="*,90"
|
||||
Margin="0,5,0,5"
|
||||
@@ -34,7 +34,7 @@
|
||||
Grid.Row="0"
|
||||
Padding="10,0,0,0">
|
||||
<Label VerticalAlignment="Center">
|
||||
<TextBlock Text="{Binding StatusData.Name}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.Name}" />
|
||||
</Label>
|
||||
</Border>
|
||||
<Border
|
||||
@@ -48,11 +48,11 @@
|
||||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center">
|
||||
<Label>
|
||||
<TextBlock Text="{Binding StatusData.Players}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.Players}" />
|
||||
</Label>
|
||||
<Label>/</Label>
|
||||
<Label>
|
||||
<TextBlock Text="{Binding StatusData.SoftMaxPlayers}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.SoftMaxPlayers}" />
|
||||
</Label>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
@@ -83,37 +83,37 @@
|
||||
<Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="0,0,5,0">RoundStart:</TextBlock>
|
||||
<TextBlock Text="{Binding StatusData.RoundStartTime}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.RoundStartTime}" />
|
||||
</StackPanel>
|
||||
</Label>
|
||||
<Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="0,0,5,0">Map:</TextBlock>
|
||||
<TextBlock Text="{Binding StatusData.Map}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.Map}" />
|
||||
</StackPanel>
|
||||
</Label>
|
||||
<Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="0,0,5,0">Preset:</TextBlock>
|
||||
<TextBlock Text="{Binding StatusData.Preset}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.Preset}" />
|
||||
</StackPanel>
|
||||
</Label>
|
||||
<Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="0,0,5,0">PanicBunker:</TextBlock>
|
||||
<TextBlock Text="{Binding StatusData.PanicBunker}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.PanicBunker}" />
|
||||
</StackPanel>
|
||||
</Label>
|
||||
<Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="0,0,5,0">Round Id:</TextBlock>
|
||||
<TextBlock Text="{Binding StatusData.RoundId}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.RoundId}" />
|
||||
</StackPanel>
|
||||
</Label>
|
||||
<Label>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="0,0,5,0">Run Level:</TextBlock>
|
||||
<TextBlock Text="{Binding StatusData.RunLevel}" />
|
||||
<TextBlock Text="{Binding ServerHubInfo.StatusData.RunLevel}" />
|
||||
</StackPanel>
|
||||
</Label>
|
||||
</UniformGrid>
|
||||
@@ -123,6 +123,7 @@
|
||||
<Panel Grid.Column="1" Grid.Row="1">
|
||||
<Border Classes="ButtonBack" CornerRadius="0,0,10,0">
|
||||
<Button
|
||||
Command="{Binding OnConnectRequired}"
|
||||
CornerRadius="0,0,10,0"
|
||||
HorizontalAlignment="Stretch"
|
||||
Padding="0"
|
||||
@@ -143,14 +144,25 @@
|
||||
BorderThickness="2,0,0,0"
|
||||
CornerRadius="10"
|
||||
Grid.Row="1">
|
||||
<Grid ColumnDefinitions="*,40" RowDefinitions="*">
|
||||
<Grid ColumnDefinitions="*,40,40" RowDefinitions="*">
|
||||
<TextBox
|
||||
Margin="0"
|
||||
Text="{Binding SearchText}"
|
||||
TextChanged="TextBox_OnTextChanged"
|
||||
VerticalAlignment="Center"
|
||||
Watermark="Server name..." Text="{Binding SearchText}" TextChanged="TextBox_OnTextChanged"/>
|
||||
<Button Grid.Column="1" Padding="10">
|
||||
Watermark="Server name..." />
|
||||
<Button
|
||||
Command="{Binding FilterRequired}"
|
||||
Grid.Column="1"
|
||||
Padding="10">
|
||||
<Image Source="/Assets/filter.png" />
|
||||
</Button>
|
||||
<Button
|
||||
Command="{Binding UpdateRequired}"
|
||||
Grid.Column="2"
|
||||
Padding="10">
|
||||
<Image Source="/Assets/refresh.png" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user