Optimize UI more and fix some layout weirdness
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.0.195.514")]
|
||||
[assembly: AssemblyFileVersion("1.0.195.514")]
|
||||
[assembly: AssemblyVersion("1.0.198.562")]
|
||||
[assembly: AssemblyFileVersion("1.0.198.562")]
|
@@ -1,4 +1,4 @@
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("1.0.195.514")]
|
||||
[assembly: AssemblyFileVersion("1.0.195.514")]
|
||||
[assembly: AssemblyVersion("1.1.198.562")]
|
||||
[assembly: AssemblyFileVersion("1.1.198.562")]
|
@@ -8,7 +8,7 @@ using System.Reflection;
|
||||
|
||||
<# var dt = DateTime.Now;
|
||||
int major = 1;
|
||||
int minor = 0;
|
||||
int minor = 1;
|
||||
int build = dt.DayOfYear;
|
||||
int rev = (int)dt.TimeOfDay.TotalMinutes / 2;
|
||||
#>
|
||||
|
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using Sandbox.Game.Entities;
|
||||
using Sandbox.Game.Multiplayer;
|
||||
using Sandbox.Game.World;
|
||||
using Sandbox.ModAPI;
|
||||
using Torch.Server.ViewModels.Blocks;
|
||||
|
||||
|
@@ -5,12 +5,12 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Torch.Server"
|
||||
mc:Ignorable="d">
|
||||
<DockPanel>
|
||||
<DockPanel DockPanel.Dock="Bottom">
|
||||
<Button x:Name="Send" Content="Send" DockPanel.Dock="Right" Width="50" Margin="5,5,5,5" Click="SendButton_Click"></Button>
|
||||
<TextBox x:Name="Message" DockPanel.Dock="Left" Margin="5,5,5,5" KeyDown="Message_OnKeyDown"></TextBox>
|
||||
</DockPanel>
|
||||
<ListView x:Name="ChatItems" ItemsSource="{Binding ChatHistory}" Margin="5,5,5,5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListView Grid.Row="0" x:Name="ChatItems" ItemsSource="{Binding ChatHistory}" Margin="5,5,5,5">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled"/>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
@@ -24,5 +24,13 @@
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</DockPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="1" x:Name="Send" Content="Send" DockPanel.Dock="Right" Width="50" Margin="5,5,5,5" Click="SendButton_Click"></Button>
|
||||
<TextBox Grid.Column="0" x:Name="Message" DockPanel.Dock="Left" Margin="5,5,5,5" KeyDown="Message_OnKeyDown"></TextBox>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
@@ -10,15 +10,27 @@
|
||||
<UserControl.DataContext>
|
||||
<viewModels:ConfigDedicatedViewModel />
|
||||
</UserControl.DataContext>
|
||||
<DockPanel>
|
||||
<DockPanel DockPanel.Dock="Top">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<DockPanel Grid.Row="0">
|
||||
<Label Content="World:" DockPanel.Dock="Left" />
|
||||
<Button Content="New World" Margin="3" DockPanel.Dock="Right" Click="NewWorld_OnClick"/>
|
||||
<ComboBox Text="{Binding LoadWorld}" ItemsSource="{Binding WorldPaths}" IsEditable="True" Margin="3" SelectionChanged="Selector_OnSelectionChanged"/>
|
||||
</DockPanel>
|
||||
<DockPanel DockPanel.Dock="Bottom">
|
||||
<StackPanel DockPanel.Dock="Left">
|
||||
<ScrollViewer IsEnabled="True">
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer Grid.Row="0" Margin="3">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel Margin="3" DockPanel.Dock="Left">
|
||||
<Label Content="Server Name" />
|
||||
@@ -37,24 +49,6 @@
|
||||
<CheckBox IsChecked="{Binding PauseGameWhenEmpty}" Content="Pause When Empty" Margin="3" />
|
||||
</StackPanel>
|
||||
<StackPanel Margin="3">
|
||||
<!--
|
||||
<ListBox ItemsSource="{Binding Banned}" Width="130" Margin="3,0,3,3" Height="100"
|
||||
MouseDoubleClick="Banned_OnMouseDoubleClick" /> -->
|
||||
<!--
|
||||
<ListBox ItemsSource="{Binding Administrators}" Width="130" Margin="3,0,3,3" Height="100"
|
||||
MouseDoubleClick="Administrators_OnMouseDoubleClick">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding SteamId}" Width="100"/>
|
||||
<Label Content="{Binding Name}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox> -->
|
||||
<!--
|
||||
<ListBox ItemsSource="{Binding Mods}" Width="130" Margin="3,0,3,3" Height="100"
|
||||
MouseDoubleClick="Mods_OnMouseDoubleClick" /> -->
|
||||
<Label Content="Mods" />
|
||||
<TextBox Text="{Binding Mods}" Margin="3" Height="100" AcceptsReturn="true" VerticalScrollBarVisibility="Auto"/>
|
||||
<Label Content="Administrators" />
|
||||
@@ -64,20 +58,20 @@
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
<Button Content="Save Config" Margin="3" Click="Save_OnClick" />
|
||||
</StackPanel>
|
||||
<ScrollViewer Margin="3" DockPanel.Dock="Right" IsEnabled="True">
|
||||
<Button Grid.Row="1" Content="Save Config" Margin="3" Click="Save_OnClick" />
|
||||
</Grid>
|
||||
<ScrollViewer Grid.Column="1" Margin="3">
|
||||
<StackPanel DataContext="{Binding SessionSettings}">
|
||||
<Expander Header="Block Limits">
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding MaxBlocksPerPlayer}" Margin="3" Width="70" />
|
||||
<Label Content="Max Blocks Per Player" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding MaxGridSize}" Margin="3" Width="70" />
|
||||
<Label Content="Max Grid Size" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<Button Content="Add" Margin="3" Click="AddLimit_OnClick" />
|
||||
<ListView ItemsSource="{Binding BlockLimits}" Margin="3">
|
||||
<ListView.ItemTemplate>
|
||||
@@ -94,30 +88,30 @@
|
||||
</Expander>
|
||||
<Expander Header="Multipliers">
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding InventorySizeMultiplier}" Margin="3" Width="70" />
|
||||
<Label Content="Inventory Size" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding RefinerySpeedMultiplier}" Margin="3" Width="70" />
|
||||
<Label Content="Refinery Speed" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding AssemblerEfficiencyMultiplier}" Margin="3" Width="70" />
|
||||
<Label Content="Assembler Efficiency" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding AssemblerSpeedMultiplier}" Margin="3" Width="70" />
|
||||
<Label Content="Assembler Speed" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding GrinderSpeedMultiplier}" Margin="3" Width="70" />
|
||||
<Label Content="Grinder Speed" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding HackSpeedMultiplier}" Margin="3" Width="70" />
|
||||
<Label Content="Hacking Speed" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
<Expander Header="NPCs">
|
||||
@@ -131,14 +125,14 @@
|
||||
</Expander>
|
||||
<Expander Header="Environment">
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<DockPanel ToolTip="Increases physics precision at the cost of performance.">
|
||||
<StackPanel Orientation="Horizontal" ToolTip="Increases physics precision at the cost of performance.">
|
||||
<TextBox Text="{Binding PhysicsIterations}" Margin="3" Width="70" />
|
||||
<Label Content="Physics Iterations" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding MaxFloatingObjects}" Margin="3" Width="70" />
|
||||
<Label Content="Max Floating Objects" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<CheckBox IsChecked="{Binding EnableRealisticSound}" Content="Enable Realistic Sound"
|
||||
Margin="3" />
|
||||
<CheckBox IsChecked="{Binding EnableAirtightness}" Content="Enable Airtightness" Margin="3" />
|
||||
@@ -149,41 +143,41 @@
|
||||
<CheckBox IsChecked="{Binding EnableVoxelDestruction}" Content="Enable Voxel Destruction"
|
||||
Margin="3" />
|
||||
<CheckBox IsChecked="{Binding EnableSunRotation}" Content="Enable Sun Rotation" Margin="3" />
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding SunRotationInterval}" Margin="3" Width="70" />
|
||||
<Label Content="Sun Rotation Interval (mins)" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<CheckBox IsChecked="{Binding EnableFlora}" Content="Enable Flora" Margin="3" />
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding FloraDensity}" Margin="3" Width="70" />
|
||||
<Label Content="Flora Density" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding FloraDensityMultiplier}" Margin="3" Width="70" />
|
||||
<Label Content="Flora Density Multiplier" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding ViewDistance}" Margin="3" Width="70" />
|
||||
<Label Content="View Distance (meters)" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding WorldSize}" Margin="3" Width="70" />
|
||||
<Label Content="World Size (km)" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ComboBox SelectedItem="{Binding EnvironmentHostility}"
|
||||
ItemsSource="{Binding EnvironmentHostilityValues}" Margin="3" Width="100"
|
||||
DockPanel.Dock="Left" />
|
||||
<Label Content="Environment Hostility" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
<Expander Header="Players">
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding MaxPlayers}" Margin="3" Width="70" />
|
||||
<Label Content="Max Players" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<CheckBox IsChecked="{Binding EnableThirdPerson}" Content="Enable 3rd Person Camera"
|
||||
Margin="3" />
|
||||
<CheckBox IsChecked="{Binding EnableJetpack}" Content="Enable Jetpack" Margin="3" />
|
||||
@@ -191,20 +185,20 @@
|
||||
<CheckBox IsChecked="{Binding EnableCopyPaste}" Content="Enable Copy/Paste" Margin="3" />
|
||||
<CheckBox IsChecked="{Binding ShowPlayerNamesOnHud}" Content="Show Player Names on HUD"
|
||||
Margin="3" />
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding SpawnTimeMultiplier}" Margin="3" Width="70" />
|
||||
<Label Content="Respawn Time Multiplier" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<CheckBox IsChecked="{Binding ResetOwnership}" Content="Reset Ownership" Margin="3" />
|
||||
<CheckBox IsChecked="{Binding SpawnWithTools}" Content="Spawn With Tools" Margin="3" />
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
<Expander Header="Miscellaneous">
|
||||
<StackPanel Margin="10,0,0,0">
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding AutosaveInterval}" Margin="3" Width="70" />
|
||||
<Label Content="Autosave Interval (minutes)" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
<CheckBox IsChecked="{Binding EnableConvertToStation}" Content="Enable Convert to Station"
|
||||
Margin="3" />
|
||||
|
||||
@@ -223,19 +217,19 @@
|
||||
<CheckBox IsChecked="{Binding EnableWeapons}" Content="Enable Weapons" Margin="3" />
|
||||
<CheckBox IsChecked="{Binding EnableIngameScripts}" Content="Enable Ingame Scripts"
|
||||
Margin="3" />
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<ComboBox SelectedItem="{Binding GameMode}" ItemsSource="{Binding GameModeValues}"
|
||||
Margin="3" Width="100" DockPanel.Dock="Left" />
|
||||
<Label Content="Game Mode" />
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Text="{Binding MaxBackupSaves}" Margin="3" Width="70" />
|
||||
<Label Content="Max Backup Saves" />
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
@@ -9,8 +9,12 @@
|
||||
<UserControl.DataContext>
|
||||
<blocks:BlockViewModel />
|
||||
</UserControl.DataContext>
|
||||
<DockPanel x:Name="Stack" Margin="3">
|
||||
<StackPanel DockPanel.Dock="Top">
|
||||
<Grid Margin="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<Label Content="{Binding FullName}" FontSize="16" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Label Content="Built By: "/>
|
||||
@@ -18,7 +22,7 @@
|
||||
</StackPanel>
|
||||
<Label Content="Properties"/>
|
||||
</StackPanel>
|
||||
<ListView ItemsSource="{Binding Properties}" Margin="3" IsEnabled="True" DockPanel.Dock="Bottom">
|
||||
<ListView Grid.Row="1" ItemsSource="{Binding Properties}" Margin="3" IsEnabled="True">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<local:PropertyView />
|
||||
@@ -35,5 +39,5 @@
|
||||
</Style>
|
||||
</ListView.ItemContainerStyle>
|
||||
</ListView>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
@@ -10,13 +10,17 @@
|
||||
<UserControl.Resources>
|
||||
<converters:StringIdConverter x:Key="StringIdConverter"/>
|
||||
</UserControl.Resources>
|
||||
<DockPanel x:Name="Dock">
|
||||
<Label x:Name="Label" Width="150" VerticalAlignment="Center" DockPanel.Dock="Left">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0" x:Name="Label" Width="150" VerticalAlignment="Center">
|
||||
<Label.Content>
|
||||
<TextBlock Text="{Binding Name, StringFormat={}{0}: }" />
|
||||
</Label.Content>
|
||||
</Label>
|
||||
<Frame x:Name="Frame" DockPanel.Dock="Right" NavigationUIVisibility="Hidden"/>
|
||||
</DockPanel>
|
||||
<Frame Grid.Column="1" x:Name="Frame" NavigationUIVisibility="Hidden"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
|
@@ -32,10 +32,10 @@ namespace Torch.Server.Views.Blocks
|
||||
{
|
||||
switch (args.NewValue)
|
||||
{
|
||||
case PropertyViewModel<bool> vmBool:
|
||||
case PropertyViewModel<bool> _:
|
||||
InitBool();
|
||||
break;
|
||||
case PropertyViewModel<StringBuilder> vmSb:
|
||||
case PropertyViewModel<StringBuilder> _:
|
||||
InitStringBuilder();
|
||||
break;
|
||||
default:
|
||||
|
@@ -8,14 +8,17 @@
|
||||
xmlns:entities="clr-namespace:Torch.Server.ViewModels.Entities"
|
||||
xmlns:blocks="clr-namespace:Torch.Server.ViewModels.Blocks"
|
||||
mc:Ignorable="d">
|
||||
<DockPanel>
|
||||
<DockPanel DockPanel.Dock="Left">
|
||||
<StackPanel DockPanel.Dock="Bottom">
|
||||
<Button Content="Delete" Click="Delete_OnClick" IsEnabled="{Binding CurrentEntity.CanDelete}"
|
||||
Margin="3" />
|
||||
<Button Content="Stop" Click="Stop_OnClick" IsEnabled="{Binding CurrentEntity.CanStop}" Margin="3" />
|
||||
</StackPanel>
|
||||
<TreeView Width="300" Margin="3" DockPanel.Dock="Top" SelectedItemChanged="TreeView_OnSelectedItemChanged" TreeViewItem.Expanded="TreeViewItem_OnExpanded">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition MinWidth="300" Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TreeView Grid.Row="0" Margin="3" DockPanel.Dock="Top" SelectedItemChanged="TreeView_OnSelectedItemChanged" TreeViewItem.Expanded="TreeViewItem_OnExpanded">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type entities:GridViewModel}" ItemsSource="{Binding Blocks}">
|
||||
<TextBlock Text="{Binding DescriptiveName}" />
|
||||
@@ -63,7 +66,12 @@
|
||||
</TreeViewItem.ItemTemplate>
|
||||
</TreeViewItem>
|
||||
</TreeView>
|
||||
</DockPanel>
|
||||
<Frame x:Name="EditorFrame" Margin="3" NavigationUIVisibility="Hidden" />
|
||||
</DockPanel>
|
||||
<StackPanel Grid.Row="1" DockPanel.Dock="Bottom">
|
||||
<Button Content="Delete" Click="Delete_OnClick" IsEnabled="{Binding CurrentEntity.CanDelete}"
|
||||
Margin="3" />
|
||||
<Button Content="Stop" Click="Stop_OnClick" IsEnabled="{Binding CurrentEntity.CanStop}" Margin="3" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Frame Grid.Column="1" x:Name="EditorFrame" Margin="3" NavigationUIVisibility="Hidden" />
|
||||
</Grid>
|
||||
</UserControl>
|
@@ -10,21 +10,26 @@
|
||||
<UserControl.DataContext>
|
||||
<viewModels:PluginManagerViewModel/>
|
||||
</UserControl.DataContext>
|
||||
<DockPanel>
|
||||
<DockPanel>
|
||||
<Button Content="Open Folder" Margin="3" DockPanel.Dock="Bottom" IsEnabled="false"></Button>
|
||||
<ListView Width="150" ItemsSource="{Binding Plugins}" SelectedItem="{Binding SelectedPlugin}" Margin="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListView Grid.Row="0" ItemsSource="{Binding Plugins}" SelectedItem="{Binding SelectedPlugin}" Margin="3">
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</DockPanel>
|
||||
<StackPanel Margin="3">
|
||||
<Label Content="{Binding SelectedPlugin.Name}" FontSize="16"/>
|
||||
<Frame NavigationUIVisibility="Hidden" Content="{Binding SelectedPlugin.Control}"/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
<Button Grid.Row="1" Content="Open Folder" Margin="3" DockPanel.Dock="Bottom" IsEnabled="false"/>
|
||||
</Grid>
|
||||
<Frame Grid.Column="1" NavigationUIVisibility="Hidden" Content="{Binding SelectedPlugin.Control}"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
|
@@ -9,12 +9,16 @@
|
||||
mc:Ignorable="d"
|
||||
Title="Torch">
|
||||
<Window.Resources>
|
||||
<converters:InverseBooleanConverter x:Key="inverseBool"/>
|
||||
<converters:InverseBooleanConverter x:Key="InverseBool"/>
|
||||
</Window.Resources>
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top" Margin="5,5,5,5" Orientation="Horizontal">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" 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" IsDefault="True" IsEnabled="{Binding IsRunning, Converter={StaticResource inverseBool}}"/>
|
||||
HorizontalAlignment="Left" Click="BtnStart_Click" IsDefault="True" IsEnabled="{Binding IsRunning, Converter={StaticResource InverseBool}}"/>
|
||||
<Button x:Name="BtnStop" Content="Stop" Height="24" Width="75" Margin="5,0,5,0" HorizontalAlignment="Left"
|
||||
Click="BtnStop_Click" IsEnabled="{Binding IsRunning}" />
|
||||
<Label>
|
||||
@@ -33,22 +37,34 @@
|
||||
</Label.Content>
|
||||
</Label>
|
||||
</StackPanel>
|
||||
<TabControl x:Name="TabControl" DockPanel.Dock="Bottom" Margin="5,0,5,5">
|
||||
<TabControl Grid.Row="1" Height="Auto" x:Name="TabControl" Margin="5,0,5,5">
|
||||
<TabItem Header="Configuration">
|
||||
<DockPanel>
|
||||
<DockPanel DockPanel.Dock="Top">
|
||||
<Label Content="Instance Path: " Margin="3" />
|
||||
<TextBox x:Name="InstancePathBox" Margin="3" Height="20"
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Column="0" Content="Instance Path: " Margin="3" />
|
||||
<TextBox Grid.Column="1" x:Name="InstancePathBox" Margin="3" Height="20"
|
||||
TextChanged="InstancePathBox_OnTextChanged" IsEnabled="False" />
|
||||
</DockPanel>
|
||||
<views:ConfigControl x:Name="ConfigControl" Margin="3" DockPanel.Dock="Bottom" IsEnabled="{Binding IsRunning, Converter={StaticResource inverseBool}}"/>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
<views:ConfigControl Grid.Row="1" x:Name="ConfigControl" Margin="3" DockPanel.Dock="Bottom" IsEnabled="{Binding IsRunning, Converter={StaticResource InverseBool}}"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Chat/Players">
|
||||
<DockPanel>
|
||||
<local:PlayerListControl x:Name="PlayerList" DockPanel.Dock="Right" Width="250" />
|
||||
<local:ChatControl x:Name="Chat" IsEnabled="{Binding IsRunning}"/>
|
||||
</DockPanel>
|
||||
<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">
|
||||
<views:EntitiesControl />
|
||||
@@ -57,5 +73,5 @@
|
||||
<views:PluginsControl x:Name="Plugins" />
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Window>
|
Reference in New Issue
Block a user