added option to disable the running instance check.

This commit is contained in:
Brett Hewitson 2021-12-23 16:33:03 +10:00
parent 31fd479919
commit ec6eb847da
16 changed files with 102 additions and 6 deletions

View file

@ -870,6 +870,9 @@
<setting name="ServerCallUrlLast" serializeAs="String">
<value>2000-01-01</value>
</setting>
<setting name="CheckIfServerManagerRunningOnStartup" serializeAs="String">
<value>True</value>
</setting>
</ServerManagerTool.Config>
</userSettings>
</configuration>

View file

@ -458,7 +458,7 @@ namespace ServerManagerTool
}
// check if application is already running
if (ProcessUtils.IsAlreadyRunning())
if (Config.Default.CheckIfServerManagerRunningOnStartup && ProcessUtils.IsAlreadyRunning())
{
var result = MessageBox.Show(_globalizer.GetResourceString("Application_SingleInstanceLabel"), _globalizer.GetResourceString("Application_SingleInstanceTitle"), MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)

View file

@ -3078,5 +3078,17 @@ namespace ServerManagerTool {
this["ServerCallUrlLast"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool CheckIfServerManagerRunningOnStartup {
get {
return ((bool)(this["CheckIfServerManagerRunningOnStartup"]));
}
set {
this["CheckIfServerManagerRunningOnStartup"] = value;
}
}
}
}

View file

@ -848,5 +848,8 @@
<Setting Name="ServerCallUrlLast" Type="System.DateTime" Scope="User">
<Value Profile="(Default)">2000-01-01</Value>
</Setting>
<Setting Name="CheckIfServerManagerRunningOnStartup" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -489,6 +489,7 @@
<sys:String x:Key="GlobalSettings_ResetButtonLabel">Reset</sys:String>
<sys:String x:Key="GlobalSettings_ResetButtonTooltip">This will reset ALL the user global settings for the server manager. The server manager will be closed if successful.</sys:String>
<sys:String x:Key="GlobalSettings_RunAsAdministratorLabel">Enable Run as Administrator Prompt on Startup</sys:String>
<sys:String x:Key="GlobalSettings_CheckIfServerManagerRunningOnStartupLabel">Check if Server Manager Running on Startup</sys:String>
<sys:String x:Key="GlobalSettings_StartModeLabel">Main Window Start Mode:</sys:String>
<sys:String x:Key="GlobalSettings_MinimizeToTrayLabel">Minimize To Tray</sys:String>
<sys:String x:Key="GlobalSettings_ManageFirewallLabel">Manage firewall settings automatically</sys:String>

View file

@ -61,6 +61,7 @@
</DockPanel>
<CheckBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="5" Content="{DynamicResource GlobalSettings_RunAsAdministratorLabel}" IsChecked="{Binding Config.RunAsAdministratorPrompt, Mode=TwoWay}" HorizontalAlignment="Left"/>
<CheckBox Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Margin="5" Content="{DynamicResource GlobalSettings_CheckIfServerManagerRunningOnStartupLabel}" IsChecked="{Binding Config.CheckIfServerManagerRunningOnStartup, Mode=TwoWay}" HorizontalAlignment="Left"/>
<Label Grid.Row="2" Grid.Column="0" Margin="1" Content="{DynamicResource GlobalSettings_StartModeLabel}" VerticalAlignment="Center"/>
<ComboBox Name="WindowStateComboBox" 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"/>

View file

@ -9,8 +9,8 @@
<entry>
<id>urn:uuid:A58CA1BE-3474-480D-9DCF-3B217C47F4B0</id>
<title>1.1.415 (1.1.415.1)</title>
<summary>1.1.415.1</summary>
<title>1.1.415 (1.1.415.2)</title>
<summary>1.1.415.2</summary>
<link href="" />
<updated>2021-12-23T00:00:00Z</updated>
<content type="xhtml">
@ -21,6 +21,11 @@
<ul>
<li>Fixed an error when deleting from a list while iterating over it.</li>
</ul>
<u style="font-size: .9em;">NEW</u>
<br/>
<ul>
<li>Added option to enable/disable the check for running server manager instance on startup.</li>
</ul>
</p>
</div>
</content>

View file

@ -7,6 +7,29 @@
<link href="http://arkservermanager.freeforums.net/" />
<updated>2021-12-23T00:00:00Z</updated>
<entry>
<id>urn:uuid:0A99681B-B2F1-4149-A9C4-1B06FCC8494D</id>
<title>1.1.415 (1.1.415.2)</title>
<summary>1.1.415.2</summary>
<link href="" />
<updated>2021-12-23T00: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;">NEW</u>
<br/>
<ul>
<li>Added option to enable/disable the check for running server manager instance on startup.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:A58CA1BE-3474-480D-9DCF-3B217C47F4B0</id>
<title>1.1.415 (1.1.415.1)</title>

View file

@ -645,6 +645,9 @@
<setting name="ServerCallUrlLast" serializeAs="String">
<value>2000-01-01</value>
</setting>
<setting name="CheckIfServerManagerRunningOnStartup" serializeAs="String">
<value>True</value>
</setting>
</ServerManagerTool.Config>
</userSettings>
</configuration>

View file

@ -450,7 +450,7 @@ namespace ServerManagerTool
}
// check if application is already running
if (ProcessUtils.IsAlreadyRunning())
if (Config.Default.CheckIfServerManagerRunningOnStartup && ProcessUtils.IsAlreadyRunning())
{
var result = MessageBox.Show(_globalizer.GetResourceString("Application_SingleInstanceLabel"), _globalizer.GetResourceString("Application_SingleInstanceTitle"), MessageBoxButton.YesNo, MessageBoxImage.Question);
if (result == MessageBoxResult.Yes)

View file

@ -2261,5 +2261,17 @@ namespace ServerManagerTool {
this["ServerCallUrlLast"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool CheckIfServerManagerRunningOnStartup {
get {
return ((bool)(this["CheckIfServerManagerRunningOnStartup"]));
}
set {
this["CheckIfServerManagerRunningOnStartup"] = value;
}
}
}
}

View file

@ -623,5 +623,8 @@
<Setting Name="ServerCallUrlLast" Type="System.DateTime" Scope="User">
<Value Profile="(Default)">2000-01-01</Value>
</Setting>
<Setting Name="CheckIfServerManagerRunningOnStartup" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -669,6 +669,7 @@
<sys:String x:Key="GlobalSettings_ResetButtonLabel">Reset</sys:String>
<sys:String x:Key="GlobalSettings_ResetButtonTooltip">This will reset ALL the user global settings for the server manager. The server manager will be closed if successful.</sys:String>
<sys:String x:Key="GlobalSettings_RunAsAdministratorLabel">Enable Run as Administrator Prompt on Startup</sys:String>
<sys:String x:Key="GlobalSettings_CheckIfServerManagerRunningOnStartupLabel">Check if Server Manager Running on Startup</sys:String>
<sys:String x:Key="GlobalSettings_StartModeLabel">Main Window Start Mode:</sys:String>
<sys:String x:Key="GlobalSettings_MinimizeToTrayLabel">Minimize To Tray</sys:String>
<sys:String x:Key="GlobalSettings_ManageFirewallLabel">Manage firewall settings automatically</sys:String>

View file

@ -65,6 +65,7 @@
</DockPanel>
<CheckBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="5" Content="{DynamicResource GlobalSettings_RunAsAdministratorLabel}" IsChecked="{Binding Config.RunAsAdministratorPrompt, Mode=TwoWay}" HorizontalAlignment="Left"/>
<CheckBox Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Margin="5" Content="{DynamicResource GlobalSettings_CheckIfServerManagerRunningOnStartupLabel}" IsChecked="{Binding Config.CheckIfServerManagerRunningOnStartup, Mode=TwoWay}" HorizontalAlignment="Left"/>
<Label Grid.Row="2" Grid.Column="0" Margin="1" Content="{DynamicResource GlobalSettings_StartModeLabel}" VerticalAlignment="Center"/>
<ComboBox Name="WindowStateComboBox" 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"/>

View file

@ -9,8 +9,8 @@
<entry>
<id>urn:uuid:656D558C-0D7C-47CF-BB80-527443B0EA5E</id>
<title>1.1.60 (1.1.60.1)</title>
<summary>1.1.60.1</summary>
<title>1.1.60 (1.1.60.2)</title>
<summary>1.1.60.2</summary>
<link href="" />
<updated>2021-12-23T00:00:00Z</updated>
<content type="xhtml">
@ -21,6 +21,11 @@
<ul>
<li>Fixed an error when deleting from a list while iterating over it.</li>
</ul>
<u style="font-size: .9em;">NEW</u>
<br/>
<ul>
<li>Added option to enable/disable the check for running server manager instance on startup.</li>
</ul>
</p>
</div>
</content>

View file

@ -7,6 +7,29 @@
<link href="http://servermanagers.freeforums.net/" />
<updated>2021-12-23T00:00:00Z</updated>
<entry>
<id>urn:uuid:832E12C1-F632-4B02-A5DF-21BF85D056ED</id>
<title>1.1.60 (1.1.60.2)</title>
<summary>1.1.60.2</summary>
<link href="" />
<updated>2021-12-23T00: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;">NEW</u>
<br/>
<ul>
<li>Added option to enable/disable the check for running server manager instance on startup.</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:656D558C-0D7C-47CF-BB80-527443B0EA5E</id>
<title>1.1.60 (1.1.60.1)</title>