mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
source code checkin
This commit is contained in:
parent
5f8fb2c825
commit
7e57b72e35
675 changed files with 168433 additions and 0 deletions
127
src/ConanServerManager/Windows/WorldSaveRestoreWindow.xaml
Normal file
127
src/ConanServerManager/Windows/WorldSaveRestoreWindow.xaml
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
<Window x:Class="ServerManagerTool.WorldSaveRestoreWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:com="clr-namespace:ServerManagerTool.Common;assembly=ServerManager.Common"
|
||||
MinWidth="700" MinHeight="480" Width="800" Height="480" ResizeMode="CanResize" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
||||
Loaded="Window_Loaded"
|
||||
Icon="../Art/favicon.ico" Title="{DynamicResource WorldSaveRestore_Title}">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="..\Globalization\en-US\en-US.xaml"/>
|
||||
<ResourceDictionary Source="..\Styles\Default.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<LinearGradientBrush x:Key="BeigeGradient" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#FFECE1D4" Offset="1"/>
|
||||
<GradientStop Color="#FFEAE8E6"/>
|
||||
</LinearGradientBrush>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid Background="{StaticResource BeigeGradient}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="200*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Top" Click="Reload_Click" Margin="5,5,5,0" Width="22" Height="22" ToolTip="{DynamicResource WorldSaveRestore_ReloadTooltip}">
|
||||
<Image Source="{com:Icon Path=/ConanServerManager;component/Art/Reload.ico,Size=32}" />
|
||||
</Button>
|
||||
|
||||
<DataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" ItemsSource="{Binding WorldSaveFiles}" Margin="5" AutoGenerateColumns="False" CanUserAddRows="False" CanUserReorderColumns="False" CanUserSortColumns="True" RowHeaderWidth="0" SelectionMode="Single">
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Style.Resources>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{x:Static SystemColors.HighlightColor}"/>
|
||||
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{x:Static SystemColors.HighlightTextColor}"/>
|
||||
</Style.Resources>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsActiveFile}" Value="True">
|
||||
<Setter Property="Background" Value="#FFF5DFB8" />
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsArchiveFile}" Value="True">
|
||||
<Setter Property="Foreground" Value="Blue" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGrid.Resources>
|
||||
|
||||
<DataGrid.HorizontalGridLinesBrush>
|
||||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.HorizontalGridLinesBrush>
|
||||
<DataGrid.VerticalGridLinesBrush>
|
||||
<SolidColorBrush Color="#FFB4B4B4"/>
|
||||
</DataGrid.VerticalGridLinesBrush>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="1*" Binding="{Binding FileName, Mode=OneWay}" Header="{DynamicResource WorldSaveRestore_NameColumnLabel}"/>
|
||||
<DataGridTextColumn Width="130" Binding="{Binding CreatedDate, Mode=OneWay}" Header="{DynamicResource WorldSaveRestore_CreatedDateColumnLabel}">
|
||||
<DataGridTextColumn.HeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.HeaderStyle>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Width="130" Binding="{Binding UpdatedDate, Mode=OneWay}" Header="{DynamicResource WorldSaveRestore_UpdatedDateColumnLabel}">
|
||||
<DataGridTextColumn.HeaderStyle>
|
||||
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.HeaderStyle>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
|
||||
<Setter Property="HorizontalAlignment" Value="Right"/>
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTemplateColumn Width="30" CanUserReorder="False" CanUserResize="False">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Width="22" Height="22" Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center" Click="Restore_Click" ToolTip="{DynamicResource WorldSaveRestore_RestoreTooltip}">
|
||||
<Image Source="{com:Icon Path=/ConanServerManager;component/Art/Download.ico,Size=32}" />
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsActiveFile}" Value="True">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGridTemplateColumn.CellStyle>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Width="30" CanUserReorder="False" CanUserResize="False">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Width="22" Height="22" Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center" Click="Delete_Click" ToolTip="{DynamicResource WorldSaveRestore_DeleteTooltip}">
|
||||
<Image Source="{com:Icon Path=/ConanServerManager;component/Art/Delete.ico,Size=32}" />
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
<DataGridTemplateColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsActiveFile}" Value="True">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</DataGridTemplateColumn.CellStyle>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</Window>
|
||||
Loading…
Add table
Add a link
Reference in a new issue