Main Window Changes

- added discord button
- reorganised the buttons
This commit is contained in:
Brett Hewitson 2022-06-18 22:10:39 +10:00
parent 738332dca2
commit a2d5c92c00
22 changed files with 202 additions and 79 deletions

View file

@ -376,6 +376,7 @@
<Resource Include="Art\Collapse.ico" />
<Resource Include="Art\Expand.ico" />
<Resource Include="Art\Restart.ico" />
<Resource Include="Art\Discord.ico" />
<Content Include="GameData\Genesis2.gamedata">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

View file

@ -359,6 +359,9 @@
<setting name="SaveGamesRelativePath" serializeAs="String">
<value>SaveGames</value>
</setting>
<setting name="DiscordUrl" serializeAs="String">
<value>https://discord.gg/cJdHJSG</value>
</setting>
</ServerManagerTool.Config>
<ServerManagerTool.Common.CommonConfig>
<setting name="DefaultSteamAPIKey" serializeAs="String">

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View file

@ -3243,5 +3243,14 @@ namespace ServerManagerTool {
this["AutoStart_TaskPriority"] = value;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("https://discord.gg/cJdHJSG")]
public string DiscordUrl {
get {
return ((string)(this["DiscordUrl"]));
}
}
}
}

View file

@ -890,5 +890,8 @@
<Setting Name="AutoStart_TaskPriority" Type="System.Diagnostics.ProcessPriorityClass" Scope="User">
<Value Profile="(Default)">Normal</Value>
</Setting>
<Setting Name="DiscordUrl" Type="System.String" Scope="Application">
<Value Profile="(Default)">https://discord.gg/cJdHJSG</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -854,6 +854,7 @@
<sys:String x:Key="MainWindow_OpenPluginsTooltip">Open Plugins</sys:String>
<sys:String x:Key="MainWindow_OpenHelpTooltip">Open Help</sys:String>
<sys:String x:Key="MainWindow_OpenServerMonitorTooltip">Open Server Monitor</sys:String>
<sys:String x:Key="MainWindow_JoinDiscordTooltip">Join the Discord Server</sys:String>
<sys:String x:Key="MainWindow_UpdateToLabelFormat">Upgrade to {0} now!</sys:String>
<sys:String x:Key="MainWindow_TaskStatusLabel">Task Status</sys:String>
<sys:String x:Key="MainWindow_TaskAdminErrorTitle">Requires Administration Permissions</sys:String>

View file

@ -130,8 +130,10 @@
</Style>
<Style x:Key="ButtonStyle4" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Background" Value="#00ffffff"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Height" Value="22"/>
<Setter Property="Height" Value="50"/>
<Setter Property="Height" Value="50"/>
<Setter Property="Margin" Value="2"/>
<Setter Property="Padding" Value="0"/>
</Style>
@ -572,8 +574,8 @@
<ContentControl x:Key="ServerMonitorButtonContent">
<StackPanel Orientation="Horizontal" Height="20" Margin="0,0,5,0">
<Image Margin="5,1,5,0" Source="{com:Icon Path=/Ark Server Manager;component/Art/Servers.ico,Size=32}" Width="16" VerticalAlignment="Center"/>
<Label Content="{DynamicResource ServerMonitor_Title}" VerticalAlignment="Center" Padding="0"/>
<Image Margin="5,1,5,0" Source="{com:Icon Path=/Ark Server Manager;component/Art/Servers.ico,Size=64}" Width="20" VerticalAlignment="Center"/>
<Label Content="{DynamicResource ServerMonitor_Title}" VerticalAlignment="Center" Padding="0" FontWeight="Bold"/>
</StackPanel>
</ContentControl>
<ContentControl x:Key="SettingFindButtonContent">

View file

@ -25,6 +25,8 @@
<br/>
<ul>
<li>Gamedata Files - when adding, deleteing or reloading the gamedata files via the gamedata window, the server manager will reload them and update the settings window.</li>
<li>Main Window - added discord server button.</li>
<li>Main Window - re-organised the buttons.</li>
<li>pt-BR Translation file updated.</li>
<li>zh-CN Translation file updated.</li>
</ul>

View file

@ -7,6 +7,30 @@
<link href="http://arkservermanager.freeforums.net/" />
<updated>2022-06-18T00:00:00Z</updated>
<entry>
<id>urn:uuid:1AE0925B-64EB-4177-B834-7A75FA46E807</id>
<title>1.1.433 (1.1.433.4)</title>
<summary>1.1.433.4</summary>
<link href="" />
<updated>2022-06-18T00:00:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml" style="font-family: Arial, Verdana, Helvetica, Sans-Serif;font-size: .8em;">
<p>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>Main Window - added discord server button.</li>
<li>Main Window - re-organised the buttons.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:1AE0925B-64EB-4177-B834-7A75FA46E807</id>
<title>1.1.433 (1.1.433.3)</title>

View file

@ -103,17 +103,19 @@
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Help.ico,Size=32}"/>
</Button>
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="6" Margin="5,0,0,0" Height="26" HorizontalAlignment="Right" Click="ServerMonitor_Click" Content="{StaticResource ServerMonitorButtonContent}" ToolTip="{DynamicResource MainWindow_OpenServerMonitorTooltip}"/>
<Button Grid.Row="2" Grid.Column="0" Margin="5,0,0,0" HorizontalAlignment="Right" Click="GameData_Click" ToolTip="{DynamicResource MainWindow_OpenGameDataTooltip}" Style="{StaticResource ButtonStyle1}">
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Grid.RowSpan="2" Margin="5,0,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Click="Discord_Click" ToolTip="{DynamicResource MainWindow_JoinDiscordTooltip}" Style="{StaticResource ButtonStyle4}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Discord.ico,Size=64}"/>
</Button>
<Button Grid.Row="1" Grid.Column="3" Margin="5,0,0,0" HorizontalAlignment="Right" Click="GameData_Click" ToolTip="{DynamicResource MainWindow_OpenGameDataTooltip}" Style="{StaticResource ButtonStyle1}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Document.ico,Size=32}"/>
</Button>
<Button Grid.Row="2" Grid.Column="1" Margin="5,0,0,0" HorizontalAlignment="Right" Click="Plugins_Click" ToolTip="{DynamicResource MainWindow_OpenPluginsTooltip}" Style="{StaticResource ButtonStyle1}">
<Button Grid.Row="1" Grid.Column="4" Margin="5,0,0,0" HorizontalAlignment="Right" Click="Plugins_Click" ToolTip="{DynamicResource MainWindow_OpenPluginsTooltip}" Style="{StaticResource ButtonStyle1}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Plugin.ico,Size=32}"/>
</Button>
<Button Grid.Row="2" Grid.Column="2" Margin="5,0,0,0" HorizontalAlignment="Right" Click="OpenLogFolder_Click" ToolTip="{DynamicResource MainWindow_OpenLogFolderTooltip}" Style="{StaticResource ButtonStyle1}">
<Button Grid.Row="1" Grid.Column="5" Margin="5,0,0,0" HorizontalAlignment="Right" Click="OpenLogFolder_Click" ToolTip="{DynamicResource MainWindow_OpenLogFolderTooltip}" Style="{StaticResource ButtonStyle1}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Logs.ico,Size=32}"/>
</Button>
<Button Grid.Row="2" Grid.Column="3" Margin="5,0,0,0" HorizontalAlignment="Right" Click="RCON_Click" ToolTip="{DynamicResource MainWindow_OpenRCONTooltip}" Style="{StaticResource ButtonStyle1}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Command.ico,Size=32}"/>
</Button>
@ -318,35 +320,42 @@
</StackPanel>
</Grid>
<Grid DockPanel.Dock="Top" VerticalAlignment="Top" Margin="10,0,10,0" HorizontalAlignment="Center">
<Grid DockPanel.Dock="Top" VerticalAlignment="Top" Margin="10,0,10,0" HorizontalAlignment="Center" Height="88" Width="180">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<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>
<ControlTemplate>
<StackPanel>
<!-- Placeholder for the TextBox itself -->
<AdornedElementPlaceholder x:Name="textBox"/>
<TextBlock Text="{DynamicResource MainWindow_MyIpError}" Background="Red" Foreground="White"/>
</StackPanel>
</ControlTemplate>
</Validation.ErrorTemplate>
<TextBox.Text>
<Binding Path="Config.MachinePublicIP" ElementName="Main">
<Binding.ValidationRules>
<cvr:IpValidationRule ValidatesOnTargetUpdated="true" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<Button Grid.Row="1" Margin="5,0,0,0" VerticalAlignment="Center" Click="RefreshPublicIP_Click" ToolTip="{DynamicResource MainWindow_RefreshMyIpTooltip}" Style="{StaticResource ButtonStyle2}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Reload.ico,Size=32}"/>
</Button>
</StackPanel>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<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_MyIpLabel}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBox Grid.Row="1" Grid.Column="0" Margin="0" FontSize="12" VerticalAlignment="Bottom" VerticalContentAlignment="Center" ToolTip="{DynamicResource MainWindow_MyIpTooltip}">
<Validation.ErrorTemplate>
<ControlTemplate>
<StackPanel>
<!-- Placeholder for the TextBox itself -->
<AdornedElementPlaceholder x:Name="textBox"/>
<TextBlock Text="{DynamicResource MainWindow_MyIpError}" Background="Red" Foreground="White"/>
</StackPanel>
</ControlTemplate>
</Validation.ErrorTemplate>
<TextBox.Text>
<Binding Path="Config.MachinePublicIP" ElementName="Main">
<Binding.ValidationRules>
<cvr:IpValidationRule ValidatesOnTargetUpdated="true" />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
<Button Grid.Row="1" Grid.Column="1" Margin="2,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Center" Click="RefreshPublicIP_Click" ToolTip="{DynamicResource MainWindow_RefreshMyIpTooltip}" Style="{StaticResource ButtonStyle2}">
<Image Source="{com:Icon Path=/Ark Server Manager;component/Art/Reload.ico,Size=32}"/>
</Button>
<Button Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,0,2" Height="26" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Click="ServerMonitor_Click" Content="{StaticResource ServerMonitorButtonContent}" ToolTip="{DynamicResource MainWindow_OpenServerMonitorTooltip}"/>
</Grid>
</DockPanel>
@ -354,7 +363,7 @@
<eo:TabControl.HeaderTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Height="20">
<Button Margin="0" Command="{Binding StatusButtonCommand, ElementName=Main}" CommandParameter="{Binding}">
<Button Margin="-5,0,0,0" Command="{Binding StatusButtonCommand, ElementName=Main}" CommandParameter="{Binding}">
<Button.Style>
<Style BasedOn="{StaticResource ButtonStyle5}" TargetType="{x:Type Button}">
<Style.Triggers>
@ -456,7 +465,7 @@
</Image.Style>
</Image>
</Button>
<TextBlock Margin="0" VerticalAlignment="Center" Text="{Binding Profile.ProfileName}">
<TextBlock Margin="2,0,0,0" VerticalAlignment="Center" Text="{Binding Profile.ProfileName}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="Black"/>
@ -502,7 +511,7 @@
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Image Margin="2" VerticalAlignment="Center" Source="{com:Icon Path=/Ark Server Manager;component/Art/Delete.ico,Size=32}" Width="10" Height="10" ToolTip="{DynamicResource MainWindow_CloseProfileTooltip}"/>
<Image Margin="10,2,0,0" VerticalAlignment="Top" Source="{com:Icon Path=/Ark Server Manager;component/Art/Delete.ico,Size=32}" Width="8" Height="8" ToolTip="{DynamicResource MainWindow_CloseProfileTooltip}"/>
</ControlTemplate>
</Setter.Value>
</Setter>

View file

@ -513,6 +513,14 @@ namespace ServerManagerTool
}
}
private void Discord_Click(object sender, RoutedEventArgs e)
{
if (string.IsNullOrWhiteSpace(Config.Default.DiscordUrl))
return;
Process.Start(Config.Default.DiscordUrl);
}
public void Servers_AddNew(object sender, NewItemRequestedEventArgs e)
{
var index = this.ServerManager.AddNew();