mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Added globalization to the Main Window Start Mode setting in the Global Settings.
This commit is contained in:
parent
ae4241e757
commit
01f0cc2bb6
5 changed files with 45 additions and 26 deletions
|
|
@ -57,6 +57,12 @@
|
|||
<sys:String x:Key="ProcessorAffinity_All">All</sys:String>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Processor Window States -->
|
||||
<sys:String x:Key="WindowState_Normal">Normal</sys:String>
|
||||
<sys:String x:Key="WindowState_Minimized">Minimized</sys:String>
|
||||
<sys:String x:Key="WindowState_Maximized">Maximized</sys:String>
|
||||
<!--#endregion-->
|
||||
|
||||
<!--#region Unit strings -->
|
||||
<sys:String x:Key="SliderUnits_Multiplier">x</sys:String>
|
||||
<sys:String x:Key="SliderUnits_Percentage">%</sys:String>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,30 @@
|
|||
<title>Conan Server Manager Version Feed</title>
|
||||
<subtitle>This is the Conan Server Manager release version feed.</subtitle>
|
||||
<link href="http://servermanagers.freeforums.net/" />
|
||||
<updated>2021-11-24T00:00:00Z</updated>
|
||||
<updated>2021-11-30T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:38961ED8-0964-4C1A-B09C-8AE2C5FCF76E</id>
|
||||
<title>1.1.54 (1.1.54.1)</title>
|
||||
<summary>1.1.54.1</summary>
|
||||
<link href="" />
|
||||
<updated>2021-11-30T00: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>Added globalization to the Main Window Start Mode setting in the Global Settings.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
</content>
|
||||
<author>
|
||||
<name>bletch</name>
|
||||
<email>bletch1971@hotmail.com</email>
|
||||
</author>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:80B2DFDC-E9BE-4B56-A1FE-DD57E64647D1</id>
|
||||
|
|
|
|||
|
|
@ -5,33 +5,21 @@
|
|||
<title>Conan Server Manager Version Feed</title>
|
||||
<subtitle>This is the Conan Server Manager beta version feed.</subtitle>
|
||||
<link href="http://servermanagers.freeforums.net/" />
|
||||
<updated>2021-11-24T00:00:00Z</updated>
|
||||
<updated>2021-11-30T00:00:00Z</updated>
|
||||
|
||||
<entry>
|
||||
<id>urn:uuid:80B2DFDC-E9BE-4B56-A1FE-DD57E64647D1</id>
|
||||
<title>1.1.53 (1.1.53.1)</title>
|
||||
<summary>1.1.53.1</summary>
|
||||
<id>urn:uuid:38961ED8-0964-4C1A-B09C-8AE2C5FCF76E</id>
|
||||
<title>1.1.54 (1.1.54.1)</title>
|
||||
<summary>1.1.54.1</summary>
|
||||
<link href="" />
|
||||
<updated>2021-11-24T00:00:00Z</updated>
|
||||
<updated>2021-11-30T00: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;">BUGFIX</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Fixed a crashing bug when CSM closes and is unable to find the backup location to save the config settings.</li>
|
||||
</ul>
|
||||
<u style="font-size: .9em;">NEW</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Global Settings - added option to set the Main Window start mode - Normal, Maximized, Minimized.</li>
|
||||
<li>Main Window - now stores the Left and Top positions of the window, when in Normal mode. Will restore the window position when started. Defaults to 50,50.</li>
|
||||
<li>Server Settings - added resizing to all the grids, so the height can be increased/decreased. The height is also remembered, so when you reopen, it will size the grid correctly.</li>
|
||||
</ul>
|
||||
<u style="font-size: .9em;">CHANGE</u>
|
||||
<br/>
|
||||
<ul>
|
||||
<li>Fixed the steamcmd warning about 'Please use force_install_dir before login!'.</li>
|
||||
<li>Added globalization to the Main Window Start Mode setting in the Global Settings.</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@
|
|||
<CheckBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="5" Content="{DynamicResource GlobalSettings_RunAsAdministratorLabel}" IsChecked="{Binding Config.RunAsAdministratorPrompt, Mode=TwoWay}" HorizontalAlignment="Left"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Margin="1" Content="{DynamicResource GlobalSettings_StartModeLabel}" VerticalAlignment="Center"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" Margin="5" ItemsSource="{Binding ElementName=GlobalSettings, Path=WindowStates}" SelectedValue="{Binding Config.MainWindow_WindowState}" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="1" Margin="5" ItemsSource="{Binding ElementName=GlobalSettings, Path=WindowStates}" SelectedValue="{Binding Config.MainWindow_WindowState}" SelectedValuePath="ValueMember" DisplayMemberPath="DisplayMember" PreviewMouseWheel="ComboBox_PreviewMouseWheel"/>
|
||||
<CheckBox Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" Margin="5" Content="{DynamicResource GlobalSettings_MinimizeToTrayLabel}" IsChecked="{Binding Config.MainWindow_MinimizeToTray, Mode=TwoWay}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
|
||||
<CheckBox Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Margin="5" Content="{DynamicResource GlobalSettings_ManageFirewallLabel}" IsChecked="{Binding Config.ManageFirewallAutomatically, Mode=TwoWay}" HorizontalAlignment="Left"/>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using NLog;
|
||||
using ServerManagerTool.Common;
|
||||
using ServerManagerTool.Common.Lib;
|
||||
using ServerManagerTool.Common.Model;
|
||||
using ServerManagerTool.Common.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
@ -28,7 +29,7 @@ namespace ServerManagerTool
|
|||
|
||||
public static readonly DependencyProperty AppInstanceProperty = DependencyProperty.Register(nameof(AppInstance), typeof(App), typeof(GlobalSettingsControl), new PropertyMetadata(null));
|
||||
public static readonly DependencyProperty IsAdministratorProperty = DependencyProperty.Register(nameof(IsAdministrator), typeof(bool), typeof(GlobalSettingsControl), new PropertyMetadata(false));
|
||||
public static readonly DependencyProperty WindowStatesProperty = DependencyProperty.Register(nameof(WindowStates), typeof(List<WindowState>), typeof(GlobalSettingsControl), new PropertyMetadata(new List<WindowState>()));
|
||||
public static readonly DependencyProperty WindowStatesProperty = DependencyProperty.Register(nameof(WindowStates), typeof(ComboBoxItemList), typeof(GlobalSettingsControl), new PropertyMetadata(null));
|
||||
|
||||
public GlobalSettingsControl()
|
||||
{
|
||||
|
|
@ -38,10 +39,11 @@ namespace ServerManagerTool
|
|||
this.IsAdministrator = SecurityUtils.IsAdministrator();
|
||||
this.Version = GetDeployedVersion();
|
||||
|
||||
this.WindowStates = new List<WindowState>();
|
||||
foreach (var windowState in Enum.GetValues(typeof(WindowState)))
|
||||
this.WindowStates = new ComboBoxItemList();
|
||||
foreach (WindowState windowState in Enum.GetValues(typeof(WindowState)))
|
||||
{
|
||||
this.WindowStates.Add((WindowState)windowState);
|
||||
var displayMember = _globalizer.GetResourceString($"WindowState_{windowState}") ?? windowState.ToString();
|
||||
this.WindowStates.Add(new Common.Model.ComboBoxItem(windowState.ToString(), displayMember));
|
||||
}
|
||||
|
||||
InitializeComponent();
|
||||
|
|
@ -74,9 +76,9 @@ namespace ServerManagerTool
|
|||
set { SetValue(IsAdministratorProperty, value); }
|
||||
}
|
||||
|
||||
public List<WindowState> WindowStates
|
||||
public ComboBoxItemList WindowStates
|
||||
{
|
||||
get { return (List<WindowState>)GetValue(WindowStatesProperty); }
|
||||
get { return (ComboBoxItemList)GetValue(WindowStatesProperty); }
|
||||
set { SetValue(WindowStatesProperty, value); }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue