mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Main Windows Cleanup
This commit is contained in:
parent
40b85340ae
commit
a3dbf0842a
3 changed files with 145 additions and 133 deletions
|
|
@ -106,7 +106,7 @@
|
|||
|
||||
<Style x:Key="ButtonStyle1" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Background" Value="#00ffffff"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="Width" Value="22"/>
|
||||
<Setter Property="Height" Value="22"/>
|
||||
<Setter Property="Margin" Value="2"/>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Background="Transparent" Foreground="White" FontSize="20" FontWeight="Bold" Margin="5,0,5,0" Content="{DynamicResource MainWindow_ArkNameLabel}" BorderThickness="0"/>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Bottom">
|
||||
<Label Margin="5,0,0,0" Background="Transparent" Foreground="White" FontSize="12" HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||
<Label.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="{x:Type Label}">
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid DockPanel.Dock="Right" VerticalAlignment="Top" Margin="5" MinWidth="130">
|
||||
<Grid DockPanel.Dock="Right" Margin="5,0,5,0" MinWidth="130">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition MinHeight="22"/>
|
||||
<RowDefinition MinHeight="22"/>
|
||||
|
|
@ -135,29 +135,34 @@
|
|||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto" MinWidth="50"/>
|
||||
<ColumnDefinition Width="Auto" MinWidth="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Margin="0,-2,0,-3" Background="Transparent" Foreground="White" FontSize="11" Content="{DynamicResource MainWindow_TaskStatusLabel}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,-2,0,-3" Background="Transparent" Foreground="White" FontWeight="Bold" FontSize="11" Content="{DynamicResource MainWindow_TaskStatusLabel}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<Label Margin="0" Background="Transparent" Foreground="White" FontSize="10" Content="{DynamicResource MainWindow_AutoBackupTaskLabel}" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="{Binding AutoBackupNextRunTime}" ToolTipService.IsEnabled="{Binding AutoBackupNextRunTime, Converter={StaticResource HasStringValueConverter}}"/>
|
||||
<Label Margin="0" Background="Transparent" FontSize="10" Content="{Binding AutoBackupStateString}" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="{Binding AutoBackupNextRunTime}" ToolTipService.IsEnabled="{Binding AutoBackupNextRunTime, Converter={StaticResource HasStringValueConverter}}">
|
||||
<Label.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding AutoBackupState}" Value="{x:Static tsk:TaskState.Disabled}">
|
||||
<Setter Property="Foreground" Value="Orange"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AutoBackupState}" Value="{x:Static tsk:TaskState.Ready}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AutoBackupState}" Value="{x:Static tsk:TaskState.Running}">
|
||||
<Setter Property="Foreground" Value="LightGreen"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Label.Style>
|
||||
</Label>
|
||||
<Label Grid.Row="1" Grid.Column="0" Margin="0" Background="Transparent" Foreground="White" FontSize="10" Content="{DynamicResource MainWindow_AutoBackupTaskLabel}" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="{Binding AutoBackupNextRunTime}" ToolTipService.IsEnabled="{Binding AutoBackupNextRunTime, Converter={StaticResource HasStringValueConverter}}"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Margin="0" Background="Transparent" FontSize="10" Content="{Binding AutoBackupStateString}" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="{Binding AutoBackupNextRunTime}" ToolTipService.IsEnabled="{Binding AutoBackupNextRunTime, Converter={StaticResource HasStringValueConverter}}">
|
||||
<Label.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding AutoBackupState}" Value="{x:Static tsk:TaskState.Disabled}">
|
||||
<Setter Property="Foreground" Value="Orange"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AutoBackupState}" Value="{x:Static tsk:TaskState.Ready}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AutoBackupState}" Value="{x:Static tsk:TaskState.Running}">
|
||||
<Setter Property="Foreground" Value="LightGreen"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Label.Style>
|
||||
</Label>
|
||||
<StackPanel Grid.Row="1" Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<Button Margin="5,0,0,0" Background="#00AA00" Foreground="White" Padding="1" Content="{DynamicResource MainWindow_AutoBackupTaskRunLabel}" BorderThickness="1" BorderBrush="White" Click="AutoBackupTaskRun_Click" VerticalAlignment="Center" ToolTip="{DynamicResource MainWindow_AutoBackupTaskRunTooltip}">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
|
|
@ -199,26 +204,26 @@
|
|||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<Label Margin="0" Background="Transparent" Foreground="White" FontSize="10" Content="{DynamicResource MainWindow_AutoUpdateTaskLabel}" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="{Binding AutoUpdateNextRunTime}" ToolTipService.IsEnabled="{Binding AutoUpdateNextRunTime, Converter={StaticResource HasStringValueConverter}}"/>
|
||||
<Label Margin="0" Background="Transparent" FontSize="10" Content="{Binding AutoUpdateStateString}" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="{Binding AutoUpdateNextRunTime}" ToolTipService.IsEnabled="{Binding AutoUpdateNextRunTime, Converter={StaticResource HasStringValueConverter}}">
|
||||
<Label.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding AutoUpdateState}" Value="{x:Static tsk:TaskState.Disabled}">
|
||||
<Setter Property="Foreground" Value="Orange"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AutoUpdateState}" Value="{x:Static tsk:TaskState.Ready}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AutoUpdateState}" Value="{x:Static tsk:TaskState.Running}">
|
||||
<Setter Property="Foreground" Value="LightGreen"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Label.Style>
|
||||
</Label>
|
||||
<Label Grid.Row="2" Grid.Column="0" Margin="0" Background="Transparent" Foreground="White" FontSize="10" Content="{DynamicResource MainWindow_AutoUpdateTaskLabel}" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="{Binding AutoUpdateNextRunTime}" ToolTipService.IsEnabled="{Binding AutoUpdateNextRunTime, Converter={StaticResource HasStringValueConverter}}"/>
|
||||
<Label Grid.Row="2" Grid.Column="1" Margin="0" Background="Transparent" FontSize="10" Content="{Binding AutoUpdateStateString}" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="{Binding AutoUpdateNextRunTime}" ToolTipService.IsEnabled="{Binding AutoUpdateNextRunTime, Converter={StaticResource HasStringValueConverter}}">
|
||||
<Label.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding AutoUpdateState}" Value="{x:Static tsk:TaskState.Disabled}">
|
||||
<Setter Property="Foreground" Value="Orange"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AutoUpdateState}" Value="{x:Static tsk:TaskState.Ready}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding AutoUpdateState}" Value="{x:Static tsk:TaskState.Running}">
|
||||
<Setter Property="Foreground" Value="LightGreen"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Label.Style>
|
||||
</Label>
|
||||
<StackPanel Grid.Row="2" Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<Button Margin="5,0,0,0" Background="#00AA00" Foreground="White" Padding="1" Content="{DynamicResource MainWindow_AutoUpdateTaskRunLabel}" BorderThickness="1" BorderBrush="White" Click="AutoUpdateTaskRun_Click" VerticalAlignment="Center" ToolTip="{DynamicResource MainWindow_AutoUpdateTaskRunTooltip}">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
|
|
@ -260,26 +265,26 @@
|
|||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<Label Margin="0" Background="Transparent" Foreground="White" FontSize="10" Content="{DynamicResource MainWindow_DiscordBotStatusLabel}" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<Label Margin="0" Background="Transparent" FontSize="10" Content="{Binding DiscordBotStateString}" VerticalAlignment="Center" HorizontalAlignment="Left">
|
||||
<Label.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DiscordBotState}" Value="{x:Static botenum:BotState.Disabled}">
|
||||
<Setter Property="Foreground" Value="Orange"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DiscordBotState}" Value="{x:Static botenum:BotState.Stopped}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DiscordBotState}" Value="{x:Static botenum:BotState.Running}">
|
||||
<Setter Property="Foreground" Value="LightGreen"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Label.Style>
|
||||
</Label>
|
||||
<Label Grid.Row="3" Grid.Column="0" Margin="0" Background="Transparent" Foreground="White" FontSize="10" Content="{DynamicResource MainWindow_DiscordBotStatusLabel}" VerticalAlignment="Center" HorizontalAlignment="Left"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" Margin="0" Background="Transparent" FontSize="10" Content="{Binding DiscordBotStateString}" VerticalAlignment="Center" HorizontalAlignment="Left">
|
||||
<Label.Style>
|
||||
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="{x:Type Label}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding DiscordBotState}" Value="{x:Static botenum:BotState.Disabled}">
|
||||
<Setter Property="Foreground" Value="Orange"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DiscordBotState}" Value="{x:Static botenum:BotState.Stopped}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding DiscordBotState}" Value="{x:Static botenum:BotState.Running}">
|
||||
<Setter Property="Foreground" Value="LightGreen"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Label.Style>
|
||||
</Label>
|
||||
<StackPanel Grid.Row="3" Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<Button Margin="5,0,0,0" Padding="1" BorderThickness="1" BorderBrush="White" Click="DiscordBotTaskState_Click" VerticalAlignment="Center">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
|
|
@ -321,7 +326,7 @@
|
|||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Margin="0" Background="Transparent" Foreground="White" FontSize="11" Content="{DynamicResource MainWindow_MyIpLabel}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<Label Grid.Row="0" Margin="0,-2,0,-3" Background="Transparent" Foreground="White" FontWeight="Bold" FontSize="11" Content="{DynamicResource MainWindow_MyIpLabel}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<TextBox FontSize="12" Height="22" Width="120" VerticalAlignment="Bottom" Margin="0" VerticalContentAlignment="Center" ToolTip="{DynamicResource MainWindow_MyIpTooltip}">
|
||||
<Validation.ErrorTemplate>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue