Files
Torch/Torch.Server/Views/TorchUI.xaml
z__ 1c92f69bd4 updated NLog to v5
fixed most of issues with world creating/loading
fixed log window lags
fixed some compiler warnings
fixed empty log files creating
fixed logging performance
added better logging of load process
commands autocomplete in torch GUI
chat in torch GUI now has entered history (like console, use up/down arrows)
abstraction of instance manager
session name now correctly displaying in torchSessionManager messages
TorchSession now has loaded world property (as torch now has more control about world load process)
now only dedicated config locks after session start
2022-02-02 14:28:53 +07:00

101 lines
4.7 KiB
XML

<Window x:Class="Torch.Server.TorchUI"
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:local="clr-namespace:Torch.Server"
xmlns:views="clr-namespace:Torch.Server.Views"
xmlns:converters="clr-namespace:Torch.Server.Views.Converters"
mc:Ignorable="d"
Title="Torch"
Name="MainWindow">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources.xaml"/>
</ResourceDictionary.MergedDictionaries>
<converters:InverseBooleanConverter x:Key="InverseBool"/>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" Margin="5,5,5,5" Orientation="Horizontal">
<Button x:Name="BtnStart" Content="Start" Height="24" Width="75" Margin="5,0,5,0"
HorizontalAlignment="Left" Click="BtnStart_Click">
<Button.IsEnabled>
<MultiBinding Converter="{StaticResource BooleanAndConverter}">
<Binding ElementName="MainWindow" Path="DataContext.CanRun"/>
<Binding ElementName="ConfigControl" Path="ConfigValid"/>
</MultiBinding>
</Button.IsEnabled>
</Button>
<Button x:Name="BtnStop" Content="Stop" Height="24" Width="75" Margin="5,0,5,0" HorizontalAlignment="Left"
Click="BtnStop_Click" IsEnabled="{Binding IsRunning}"/>
<Label>
<Label.Content>
<TextBlock Text="{Binding State, StringFormat=Status: {0}}"></TextBlock>
</Label.Content>
</Label>
<Label x:Name="LabelSimulation">
<Label.Content>
<TextBlock Text="{Binding SimulationRatio, StringFormat=Simulation: {0:0.00}}" />
</Label.Content>
</Label>
<Label x:Name="LabelUptime">
<Label.Content>
<TextBlock Text="{Binding ElapsedPlayTime, StringFormat=Uptime: {0:g}}"/>
</Label.Content>
</Label>
<Label x:Name="LabelPlayers">
<Label.Content>
<TextBlock Text="{Binding OnlinePlayers, StringFormat=Players: {0}}"/>
</Label.Content>
</Label>
</StackPanel>
<TabControl Grid.Row="2" Height="Auto" x:Name="TabControl" Margin="5,10,5,5">
<TabItem Header="Log">
<views:LogViewerControl x:Name="ConsoleText" Margin="3" />
</TabItem>
<TabItem Header="Configuration">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
</Grid>
<views:ConfigControl Grid.Row="1" x:Name="ConfigControl" Margin="3" DockPanel.Dock="Bottom" IsEnabled="{Binding CanRun}"/>
</Grid>
</TabItem>
<TabItem Header="Mods">
<views:ModListControl/>
</TabItem>
<TabItem Header="Chat/Players">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="250"/>
</Grid.ColumnDefinitions>
<local:ChatControl Grid.Column="0" x:Name="Chat" IsEnabled="{Binding IsRunning}"/>
<local:PlayerListControl Grid.Column="1" x:Name="PlayerList" DockPanel.Dock="Right"/>
</Grid>
</TabItem>
<TabItem Header="Entity Manager" x:Name="EntityManagerTab" IsEnabled="{Binding Config.EntityManagerEnabled}">
</TabItem>
<TabItem Header="Plugins">
<views:PluginsControl x:Name="Plugins" />
</TabItem>
<TabItem Header="Themes">
<views:ThemeControl x:Name="Themes" />
</TabItem>
</TabControl>
</Grid>
</Window>