Added reset button to the Data Directory Location.

This commit is contained in:
Brett Hewitson 2021-12-08 16:23:53 +10:00
parent cd801a2334
commit cd2dbe9628
20 changed files with 301 additions and 75 deletions

View file

@ -424,8 +424,7 @@ namespace ServerManagerTool
Config.Default.ConfigDirectory = Path.Combine(Config.Default.DataDir, Config.Default.ProfilesDir);
System.IO.Directory.CreateDirectory(Config.Default.ConfigDirectory);
Config.Default.Save();
CommonConfig.Default.Save();
SaveConfigFiles();
if (restartRequired)
{
@ -527,13 +526,31 @@ namespace ServerManagerTool
MessageBox.Show(String.Format(_globalizer.GetResourceString("Application_Profile_SaveFailedLabel"), server.Profile.ProfileName, ex.Message, ex.StackTrace), _globalizer.GetResourceString("Application_Profile_SaveFailedTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
}
}
Config.Default.Save();
CommonConfig.Default.Save();
SaveConfigFiles();
}
PluginHelper.Instance?.Dispose();
ApplicationStarted = false;
}
public static void SaveConfigFiles(bool includeBackup = true)
{
Config.Default.Save();
CommonConfig.Default.Save();
Config.Default.Reload();
CommonConfig.Default.Reload();
var installFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var backupFolder = includeBackup
? IOUtils.NormalizePath(string.IsNullOrWhiteSpace(Config.Default.BackupPath)
? Path.Combine(Config.Default.DataDir, Config.Default.BackupDir)
: Path.Combine(Config.Default.BackupPath))
: null;
SettingsUtils.BackupUserConfigSettings(Config.Default, "userconfig.json", installFolder, backupFolder);
SettingsUtils.BackupUserConfigSettings(CommonConfig.Default, "commonconfig.json", installFolder, backupFolder);
}
}
}

View file

@ -679,6 +679,8 @@
<sys:String x:Key="GlobalSettings_DataDirectoryChange_ConfirmLabel">Changing the data directory will move any existing profiles to the new location, but it will not move any server installations. Do you still want to change this directory?</sys:String>
<sys:String x:Key="GlobalSettings_DataDirectoryChange_FailedTitle">Failed to change data directory</sys:String>
<sys:String x:Key="GlobalSettings_DataDirectoryChange_FailedLabel">There was an error changing the data directory: {0}\r\nPlease correct the error and try again, or contact technical support for assistance.</sys:String>
<sys:String x:Key="GlobalSettings_ResetDataDirectory_ConfirmTitle">Confirm Data Directory Reset</sys:String>
<sys:String x:Key="GlobalSettings_ResetDataDirectory_ConfirmLabel">Click 'Yes' to confirm you want to reset the location of the data directory. Once reset, the server manager will shutdown and you will need to restart.</sys:String>
<sys:String x:Key="GlobalSettings_DataDirectoryTitle">Select Backup Directory</sys:String>
<sys:String x:Key="GlobalSettings_CacheDirectoryTitle">Select Cache Directory</sys:String>

View file

@ -104,7 +104,8 @@
<sys:String x:Key="Application_DataDirectory_ConfirmLabel">O Ark Server Manager armazenará os perfis e o SteamCMD nos seguintes diretórios:\r\n\r\nProfiles: {0}\r\nSteamCMD: {1}\r\n\r\n Está tudo bem?</sys:String>
<sys:String x:Key="Application_DataDirectory_DataDirectoryFolderErrorTitle">Erro na seleção do diretório de dados</sys:String>
<sys:String x:Key="Application_DataDirectory_DataDirectoryWithinInstallFolderErrorLabel">O diretório que você escolheu está dentro da pasta de instalação do gerenciador de servidor. Isso não é recomendado, escolha outra pasta.</sys:String>
<sys:String x:Key="Application_Profile_SaveFailedTitle">Não foi possível guardar o perfil</sys:String>
<sys:String x:Key="Application_DataDirectory_DataDirectoryWithinDesktopFolderErrorLabel">O diretório que você escolheu está na área de trabalho. Isso não é recomendado, escolha outra pasta.</sys:String>
<sys:String x:Key="Application_Profile_SaveFailedTitle">Não foi possível guardar o perfil</sys:String>
<sys:String x:Key="Application_Profile_SaveFailedLabel">Não foi possível guardar o perfil {0}. {1}\n{2}</sys:String>
<sys:String x:Key="Application_NotifyIcon_ShowMainWindow">Mostrar janela principal</sys:String>
@ -164,6 +165,25 @@
<sys:String x:Key="ProcessorAffinity_DescriptionColumnLabel">Processador</sys:String>
<!--#endregion-->
<!--#region Data Directory Window -->
<sys:String x:Key="DataDirectory_Title">Seleção da pasta de dados</sys:String>
<sys:String x:Key="DataDirectory_InformationLabel">Parece que você não tem um conjunto de diretórios de dados. O diretório de dados é onde seus perfis e o SteamCMD serão armazenados. Não é o mesmo que o diretório de instalação do servidor, que você pode escolher para cada perfil.</sys:String>
<sys:String x:Key="DataDirectory_SelectionLabel">Selecione a unidade onde a pasta de dados deve estar localizada.</sys:String>
<sys:String x:Key="DataDirectory_FolderLabel">Nome da pasta de dados:</sys:String>
<sys:String x:Key="DataDirectory_FolderTooltip">O nome da pasta de dados do server manager.</sys:String>
<sys:String x:Key="DataDirectory_LocalDiskLabel">Disco local</sys:String>
<sys:String x:Key="DataDirectory_DriveLine2Label">{0} livre de {1}</sys:String>
<sys:String x:Key="DataDirectory_OkButtonLabel">Ok</sys:String>
<sys:String x:Key="DataDirectory_CancelButtonLabel">Cancelar</sys:String>
<sys:String x:Key="DataDirectory_RefreshButtonLabel">Atualizar</sys:String>
<sys:String x:Key="DataDirectory_ErrorTitle">Erro de seleção no diretório de dados</sys:String>
<sys:String x:Key="DataDirectory_FolderErrorLabel">O nome da pasta de dados que você digitou não é válido.</sys:String>
<sys:String x:Key="DataDirectory_RestartTitle">Reinicialização do Server Manager necessária</sys:String>
<sys:String x:Key="DataDirectory_RestartLabel">A pasta de dados foi configurada, você deve agora reiniciar o server manager para usar as novas configurações.</sys:String>
<!--#endregion-->
<!--#region PlayerListWindow Window -->
<sys:String x:Key="PlayerList_CloseButtonLabel">Fechar</sys:String>
@ -591,6 +611,23 @@
<sys:String x:Key="GlobalSettings_ShutdownAllMessagesShowReasonLabel">Mostrar o motivo de desligamento com TODAS as mensagens de desligamento</sys:String>
<sys:String x:Key="GlobalSettings_ShutdownAllMessagesShowReasonTooltip">Se habilitado, o motivo do desligamento será mostrado com todas as mensagens de desligamento; caso contrário, ele será mostrado apenas no início do encerramento do servidor.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotLabel">Habilitar Discord Bot</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotInformationLabel">Você precisará reiniciar o server manager se alterar alguma configuração do Discord Bot.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotTokenLabel">Token:</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotTokenTooltip">O token associado ao bot discord.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotServerLabel">Server Id:</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotServerTooltip">O id do servidor discord que o bot usará.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotPrefixLabel">Prefix:</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotPrefixTooltip">O prefixo que deve ser usado ao enviar um comando via discord.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotApplyButtonLabel">Obter Token...</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotHelpButtonLabel">Ajuda...</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotAllowBackupTooltip">Se ativado, o comando de backup pode ser enviado do discord.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotAllowRestartTooltip">Se ativado, o comando de reiniciar pode ser enviado do discord.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotAllowShutdownTooltip">Se habilitado, o comando de desligar pode ser enviado do discord.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotAllowStartTooltip">Se habilitado, o comando de iniciar pode ser enviado do discord.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotAllowStopTooltip">Se habilitado, o comando de parar pode ser enviado do discord.</sys:String>
<sys:String x:Key="GlobalSettings_DiscordBotAllowUpdateTooltip">Se ativado, o comando de atualizar pode ser enviado do discord.</sys:String>
<sys:String x:Key="GlobalSettings_EmailSettingsLabel">Configurações de email SMTP</sys:String>
<sys:String x:Key="GlobalSettings_EmailHostLabel">Host:</sys:String>
<sys:String x:Key="GlobalSettings_EmailHostTooltip">O nome ou endereço IP do host usado para transmissões de SMTP.</sys:String>
@ -755,6 +792,9 @@
<sys:String x:Key="MainWindow_SteamCmd_FailedTitle">Reinstale o erro do SteamCMD</sys:String>
<sys:String x:Key="MainWindow_SteamCmd_FailedLabel">Ocorreu um erro ao tentar reinstalar o SteamCMD. Isso deixou o SteamCmd em um estado instável, tente reinstalar novamente ou informe isso.\R\nException: {0}</sys:String>
<sys:String x:Key="MainWindow_DiscordBot_RunningCommandsTitle">Discord Bot executando comandos</sys:String>
<sys:String x:Key="MainWindow_DiscordBot_RunningCommandsLabel">O bot discord tem um ou mais comandos em execução. Quer continuar fechando o server manager?</sys:String>
<sys:String x:Key="MainWindow_ServerStatus_StartServerActionTitle">Iniciar a confirmação do servidor</sys:String>
<sys:String x:Key="MainWindow_ServerStatus_StartServerActionLabel">Você está prestes a iniciar o servidor, deseja continuar?</sys:String>
<sys:String x:Key="MainWindow_ServerStatus_ShutdownServerActionTitle">Confirmação do servidor de desligamento</sys:String>
@ -1159,6 +1199,24 @@
<sys:String x:Key="ServerSettings_RestartIfShutdownTooltip">Se ativado, o servidor será reiniciado mesmo se o desligamento for Reinicializações Automáticas e Atualizações Automáticas.</sys:String>
<!--#endregion-->
<!--#region Server Settings - Discord Bot Details -->
<sys:String x:Key="ServerSettings_DiscordBotLabel">Detalhes do Discord Bot</sys:String>
<sys:String x:Key="ServerSettings_DiscordBotChannelLabel">Id do canal:</sys:String>
<sys:String x:Key="ServerSettings_DiscordBotChannelTooltip">O id do canal do discord que este perfil irá usar.</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordBackupLabel">Permitir backup</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordBackupTooltip">Se ativado, o perfil usará os comandos de backup pelo discord.</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordRestartLabel">Permitir Reinício</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordRestartTooltip">Se ativado, o perfil usará comandos de reinicialização pelo discord.</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordShutdownLabel">Permitir desligamento</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordShutdownTooltip">Se ativado, o perfil usará comandos de desligamento pelo discord.</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordStartLabel">Permitir iníciar</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordStartTooltip">Se ativado, o perfil usará os comandos de iníciar pelo discord.</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordStopLabel">Permitir parar</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordStopTooltip">Se ativado, o perfil usará os comandos de parar pelo discord.</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordUpdateLabel">Permitir atualização</sys:String>
<sys:String x:Key="ServerSettings_AllowDiscordUpdateTooltip">Se ativado, o perfil usará os comandos de atualização pelo discord.</sys:String>
<!--#endregion-->
<!--#region Server Settings - Rules -->
<sys:String x:Key="ServerSettings_RulesLabel">Regras</sys:String>
<sys:String x:Key="ServerSettings_EnableHardcoreLabel">Ativar o modo Hardcore</sys:String>
@ -5520,4 +5578,32 @@
<sys:String x:Key="ServerUpdate_WarningLabel">Ocorreu um problema ao executar a atualização do servidor. Isso pode deixar o servidor em um estado incompleto.\r\n\r\nDeseja continuar com a inicialização do servidor, isso pode causar problemas?</sys:String>
<!--#endregion-->
<!--#region Discord Bot -->
<sys:String x:Key="DiscordBot_ErrorTitle">Discord Bot Error</sys:String>
<sys:String x:Key="DiscordBot_MissingTokenError">O discord bot requer um token válido para que possa se conectar ao servidor discord\r\nIsso pode ser definido nas configurações globais.</sys:String>
<sys:String x:Key="DiscordBot_InvalidPrefixError">O prefixo discord bot contém caracteres inválidos. Somente letras e números são permitidos.</sys:String>
<sys:String x:Key="DiscordBot_CommandNotEnabled">O comando '{0}' não foi habilitado.</sys:String>
<sys:String x:Key="DiscordBot_CommandUnknown">Comando desconhecido '{0}'.</sys:String>
<sys:String x:Key="DiscordBot_CommandRunning">Outro comando está sendo processado.</sys:String>
<sys:String x:Key="DiscordBot_CommandRunningProfile">Outro comando '{0}' está em execução no perfil '{1}'.</sys:String>
<sys:String x:Key="DiscordBot_CommandDisabledProfile">O comando '{0}' foi desativado para o perfil '{1}'.</sys:String>
<sys:String x:Key="DiscordBot_ProfileMissing">O comando '{0}' requer um id de perfil.</sys:String>
<sys:String x:Key="DiscordBot_ProfileNotFound">O perfil '{0}' não foi encontrado ou não está associado ao canal.</sys:String>
<sys:String x:Key="DiscordBot_ProfileBadStatus">O perfil '{0}' está em um estado '{1}' que não pode executar este comando.</sys:String>
<sys:String x:Key="DiscordBot_ProfileUpdating">O perfil '{0}' está sendo atualizado.</sys:String>
<sys:String x:Key="DiscordBot_InfoFailed">A chamada para o servidor '{0}' falhou.</sys:String>
<sys:String x:Key="DiscordBot_BackupRequested">Uma solicitação de backup para o servidor '{0}' foi enviada.</sys:String>
<sys:String x:Key="DiscordBot_RestartRequested">Um pedido de reinicialização do servidor '{0}' foi enviado.</sys:String>
<sys:String x:Key="DiscordBot_ShutdownRequested">Um pedido de desligamento do servidor '{0}' foi enviado.</sys:String>
<sys:String x:Key="DiscordBot_StartRequested">Uma solicitação de iníciar para o servidor '{0}' foi enviada.</sys:String>
<sys:String x:Key="DiscordBot_StopRequested">Uma solicitação de parar o servidor '{0}' foi enviada.</sys:String>
<sys:String x:Key="DiscordBot_UpdateRequested">Uma solicitação de atualização para o servidor '{0}' foi enviada.</sys:String>
<sys:String x:Key="DiscordBot_CountLabel">Quantidade:</sys:String>
<sys:String x:Key="DiscordBot_MapLabel">Mapa:</sys:String>
<!--#endregion-->
</Globalization:GlobalizationResourceDictionary>

View file

@ -9,11 +9,11 @@
<!--#region Generic -->
<sys:String x:Key="Generic_TranslatedByLabel">翻译:</sys:String>
<sys:String x:Key="Generic_TranslatedBy">2021.11.30(龍柒)</sys:String>
<sys:String x:Key="Generic_TranslatedBy">2021.12.07(龍柒)</sys:String>
<sys:String x:Key="Generic_ErrorLabel">错误</sys:String>
<!--#endregion-->
<!--#游戏地图名称 -->
<!--#游戏地图名称 -->
<sys:String x:Key="Map_TheIsland">孤岛(The Island)</sys:String>
<sys:String x:Key="Map_TheCenter">中心岛地图(The Center)</sys:String>
<sys:String x:Key="Map_ScorchedEarth_P">焦土地图(Scorched Earth)</sys:String>
@ -21,8 +21,8 @@
<sys:String x:Key="Map_Aberration_P">畸变地图(Aberration)</sys:String>
<sys:String x:Key="Map_Extinction">灭绝地图(Extinction)</sys:String>
<sys:String x:Key="Map_Valguero_P">瓦尔盖罗(Valguero)</sys:String>
<sys:String x:Key="Map_Genesis">创世纪(Genesis)</sys:String>
<sys:String x:Key="Map_Gen2">创世纪 2Genesis: Part 2</sys:String>
<sys:String x:Key="Map_Genesis">创世纪 1(Genesis: Part 1)</sys:String>
<sys:String x:Key="Map_Gen2">创世纪 2Genesis: Part 2</sys:String>
<sys:String x:Key="Map_CrystalIsles">水晶岛(Crystal Isles)</sys:String>
<!--#endregion-->
@ -34,8 +34,8 @@
<sys:String x:Key="Branch_live">生存</sys:String>
<!--#endregion-->
<!--#region Event Names -->
<sys:String x:Key="Event_none">无节日</sys:String>
<!--#region 活动名称 -->
<sys:String x:Key="Event_none">无节日</sys:String>
<sys:String x:Key="Event_vday">情人节</sys:String>
<sys:String x:Key="Event_Easter">复活节</sys:String>
<sys:String x:Key="Event_FearEvolved">恐惧进化(万圣节)</sys:String>
@ -43,7 +43,7 @@
<sys:String x:Key="Event_WinterWonderland">冬季仙境(圣诞节)</sys:String>
<!--#endregion-->
<!--#region Mod Names -->
<!--#region Mods -->
<sys:String x:Key="Mod_All">所有</sys:String>
<sys:String x:Key="Mod_Unknown">未知</sys:String>
<sys:String x:Key="Mod_ArkPrime">方舟主体</sys:String>
@ -163,6 +163,25 @@
<sys:String x:Key="ProcessorAffinity_SelectedColumnLabel">选择</sys:String>
<sys:String x:Key="ProcessorAffinity_DescriptionColumnLabel">处理器</sys:String>
<!--#endregion-->
<!--#数据目录窗口 -->
<sys:String x:Key="DataDirectory_Title">数据文件夹选择</sys:String>
<sys:String x:Key="DataDirectory_InformationLabel">您似乎没有数据目录集. 数据目录是存储配置文件和streamcmd的地方.它与服务器安装目录不同,您可以为每个配置文件选择.</sys:String>
<sys:String x:Key="DataDirectory_SelectionLabel">选择数据文件夹的硬盘号.</sys:String>
<sys:String x:Key="DataDirectory_FolderLabel">数据文件夹名称:</sys:String>
<sys:String x:Key="DataDirectory_FolderTooltip">服务器管理器数据文件夹的名称.</sys:String>
<sys:String x:Key="DataDirectory_LocalDiskLabel">本地磁盘</sys:String>
<sys:String x:Key="DataDirectory_DriveLine2Label">{0} free of {1}</sys:String>
<sys:String x:Key="DataDirectory_OkButtonLabel">Ok</sys:String>
<sys:String x:Key="DataDirectory_CancelButtonLabel">取消</sys:String>
<sys:String x:Key="DataDirectory_RefreshButtonLabel">刷新</sys:String>
<sys:String x:Key="DataDirectory_ErrorTitle">数据目录选择错误</sys:String>
<sys:String x:Key="DataDirectory_FolderErrorLabel">您输入的数据文件夹名称无效.</sys:String>
<sys:String x:Key="DataDirectory_RestartTitle">需要重新启动服务器管理器</sys:String>
<sys:String x:Key="DataDirectory_RestartLabel">数据文件夹已设置,现在必须重新启动服务器管理器才能使用新设置.</sys:String>
<!--#endregion-->
<!-- 玩家列表窗口 -->

View file

@ -688,6 +688,11 @@
<Label Content="{DynamicResource GlobalSettings_SetLocationButtonLabel}" VerticalAlignment="Center" Margin="0,-2,0,-2"/>
</StackPanel>
</ContentControl>
<ContentControl x:Key="DataDirectoryResetButtonContent">
<StackPanel Orientation="Horizontal">
<Label Content="{DynamicResource GlobalSettings_ResetButtonLabel}" VerticalAlignment="Center" Margin="0,-2,0,-2"/>
</StackPanel>
</ContentControl>
<ContentControl x:Key="BackupDirectoryButtonContent">
<StackPanel Orientation="Horizontal">
<Label Content="{DynamicResource GlobalSettings_SetLocationButtonLabel}" VerticalAlignment="Center" Margin="0,-2,0,-2"/>

View file

@ -5,14 +5,14 @@
<title>Ark Server Manager Version Feed</title>
<subtitle>This is the Ark Server Manager release version feed.</subtitle>
<link href="http://arkservermanager.freeforums.net/" />
<updated>2021-12-06T00:00:00Z</updated>
<updated>2021-12-08T00:00:00Z</updated>
<entry>
<id>urn:uuid:DBAFCE91-2235-4B6C-AE9B-5E4EF9FEC8F5</id>
<title>1.1.411 (1.1.411.1)</title>
<summary>1.1.411.1</summary>
<title>1.1.411 (1.1.411.2)</title>
<summary>1.1.411.2</summary>
<link href="" />
<updated>2021-12-06T00:00:00Z</updated>
<updated>2021-12-08T00: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>
@ -21,13 +21,22 @@
<ul>
<li>
A new Discord Bot has been added to the server manager.<br/>
This new discord bot will allow you to send <font color="#0094FF">Start, Stop, Shutdown, Restart, Backup and Update</font> commands to the server manager from within your discord client.
To setup the new discord bot, open the global settings and scroll down to the Discord section.
This new discord bot will allow you to send <font color="#0094FF">Start, Stop, Shutdown, Restart, Backup and Update</font> commands to the server manager from within your discord client.<br/>
To setup the new discord bot, open the global settings and scroll down to the Discord section.<br/>
<font color="#e62919">
NOTE: This is long process to get the discord bot working, and I have created a forum post with detailed instructions how to do it.
</font>
</li>
</ul>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>
<li>Global Settings - Added reset button to the Data Directory Location.</li>
<li>pt-BR Translation file updated.</li>
<li>zh-CN Translation file updated.</li>
</li>
</ul>
</p>
</div>
</content>

View file

@ -5,7 +5,34 @@
<title>Ark Server Manager Version Feed</title>
<subtitle>This is the Ark Server Manager beta version feed.</subtitle>
<link href="http://arkservermanager.freeforums.net/" />
<updated>2021-12-06T00:00:00Z</updated>
<updated>2021-12-08T00:00:00Z</updated>
<entry>
<id>urn:uuid:ADBF3FE0-017C-4E23-8FE8-EFE75E7C8BA1</id>
<title>1.1.411 (1.1.411.2)</title>
<summary>1.1.411.2</summary>
<link href="" />
<updated>2021-12-08T00: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>
<li>Global Settings - Added reset button to the Data Directory Location.</li>
<li>pt-BR Translation file updated.</li>
<li>zh-CN Translation file updated.</li>
</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:DBAFCE91-2235-4B6C-AE9B-5E4EF9FEC8F5</id>
@ -19,9 +46,10 @@
<u style="font-size: .9em;">NEW</u>
<br/>
<ul>
<li>A new Discord Bot has been added to the server manager.<br/>
This new discord bot will allow you to send <font color="#0094FF">Start, Stop, Shutdown, Restart, Backup and Update</font> commands to the server manager from within your discord client.
To setup the new discord bot, open the global settings and scroll down to the Discord section.
<li>
A new Discord Bot has been added to the server manager.<br/>
This new discord bot will allow you to send <font color="#0094FF">Start, Stop, Shutdown, Restart, Backup and Update</font> commands to the server manager from within your discord client.<br/>
To setup the new discord bot, open the global settings and scroll down to the Discord section.<br/>
<font color="#e62919">
NOTE: This is long process to get the discord bot working, and I have created a forum post with detailed instructions how to do it.
</font>

View file

@ -71,11 +71,12 @@
<Label Grid.Row="4" Grid.Column="0" Margin="1" Content="{DynamicResource GlobalSettings_DataDirectoryLabel}" VerticalAlignment="Center"/>
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Margin="1" Text="{Binding CurrentConfig.DataDir, Mode=TwoWay}" IsReadOnly="True" IsReadOnlyCaretVisible="True" VerticalContentAlignment="Center" />
<Button Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="2" Margin="5,1,0,1" VerticalAlignment="Center" HorizontalAlignment="Left" Content="{DynamicResource DataDirectoryButtonContent}" Click="SetDataDir_Click" Visibility="Hidden"/>
<Button Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="2" Margin="5,1,0,1" VerticalAlignment="Center" HorizontalAlignment="Right" Content="{DynamicResource DataDirectoryButtonContent}" Click="SetDataDir_Click" Visibility="Hidden" />
<Button Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="2" Margin="5,1,0,1" VerticalAlignment="Center" HorizontalAlignment="Right" Content="{DynamicResource DataDirectoryResetButtonContent}" Click="ResetDataDir_Click" />
<Label Grid.Row="5" Grid.Column="0" Margin="1" Content="{DynamicResource GlobalSettings_BackupDirectoryLabel}" VerticalAlignment="Center"/>
<TextBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Margin="1" Text="{Binding CurrentConfig.BackupPath, Mode=TwoWay}" IsReadOnly="True" IsReadOnlyCaretVisible="True" VerticalContentAlignment="Center"/>
<StackPanel Grid.Row="5" Grid.Column="3" Orientation="Horizontal">
<StackPanel Grid.Row="5" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Margin="5,1,0,1" VerticalAlignment="Center" Content="{DynamicResource BackupDirectoryButtonContent}" Click="SetBackupDir_Click"/>
<Button Margin="5,1,0,1" VerticalAlignment="Center" Content="{DynamicResource ClearButtonContent}" Click="ClearBackupDir_Click"/>
</StackPanel>

View file

@ -203,6 +203,21 @@ namespace ServerManagerTool
}
}
private void ResetDataDir_Click(object sender, RoutedEventArgs e)
{
// Confirm the reset with the user.
if (MessageBox.Show(_globalizer.GetResourceString("GlobalSettings_ResetDataDirectory_ConfirmLabel"), _globalizer.GetResourceString("GlobalSettings_ResetDataDirectory_ConfirmTitle"), MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
return;
// Update the config
Config.Default.DataDir = string.Empty;
Config.Default.ConfigDirectory = string.Empty;
App.SaveConfigFiles(false);
Environment.Exit(0);
}
private void SetBackupDir_Click(object sender, RoutedEventArgs e)
{
var dialog = new CommonOpenFileDialog();
@ -384,13 +399,11 @@ namespace ServerManagerTool
{
Config.Default.Reset();
Config.Default.UpgradeConfig = false;
Config.Default.Save();
Config.Default.Reload();
CommonConfig.Default.Reset();
CommonConfig.Default.UpgradeConfig = false;
CommonConfig.Default.Save();
CommonConfig.Default.Reload();
App.SaveConfigFiles(false);
}
catch (Exception ex)
{
@ -400,7 +413,7 @@ namespace ServerManagerTool
}
finally
{
App.Current.Shutdown(exitCode);
Environment.Exit(0);
}
}

View file

@ -251,13 +251,6 @@ namespace ServerManagerTool
PlayerListWindow.CloseAllWindows();
ServerMonitorWindow.CloseAllWindows();
this.versionChecker.DisposeAsync().DoNotWait();
var installFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var backupFolder = IOUtils.NormalizePath(string.IsNullOrWhiteSpace(Config.Default.BackupPath)
? Path.Combine(Config.Default.DataDir, Config.Default.BackupDir)
: Path.Combine(Config.Default.BackupPath));
SettingsUtils.BackupUserConfigSettings(Config.Default, "userconfig.json", installFolder, backupFolder);
SettingsUtils.BackupUserConfigSettings(CommonConfig.Default, "commonconfig.json", installFolder, backupFolder);
}
private void ResourceDictionaryChangedEvent(object source, ResourceDictionaryChangedEventArgs e)

View file

@ -1,5 +1,4 @@
using ServerManagerTool.Common;
using ServerManagerTool.Common.Utils;
using ServerManagerTool.Common.Utils;
using System;
using System.IO;
using System.Reflection;
@ -84,11 +83,7 @@ namespace ServerManagerTool
Config.Default.SteamCmd_UseAnonymousCredentials = true;
}
Config.Default.Save();
CommonConfig.Default.Save();
Config.Default.Reload();
CommonConfig.Default.Reload();
App.SaveConfigFiles(false);
base.OnClosed(e);
}

View file

@ -408,8 +408,7 @@ namespace ServerManagerTool
Config.Default.ConfigPath = Path.Combine(Config.Default.DataPath, Config.Default.ProfilesRelativePath);
System.IO.Directory.CreateDirectory(Config.Default.ConfigPath);
Config.Default.Save();
CommonConfig.Default.Save();
SaveConfigFiles();
if (restartRequired)
{
@ -508,13 +507,31 @@ namespace ServerManagerTool
MessageBox.Show(String.Format(_globalizer.GetResourceString("Application_Profile_SaveFailedLabel"), server.Profile.ProfileName, ex.Message, ex.StackTrace), _globalizer.GetResourceString("Application_Profile_SaveFailedTitle"), MessageBoxButton.OK, MessageBoxImage.Error);
}
}
Config.Default.Save();
CommonConfig.Default.Save();
App.SaveConfigFiles();
}
PluginHelper.Instance?.Dispose();
this.ApplicationStarted = false;
}
public static void SaveConfigFiles(bool includeBackup = true)
{
Config.Default.Save();
CommonConfig.Default.Save();
Config.Default.Reload();
CommonConfig.Default.Reload();
var installFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var backupFolder = includeBackup
? IOUtils.NormalizePath(string.IsNullOrWhiteSpace(Config.Default.BackupPath)
? Path.Combine(Config.Default.DataPath, Config.Default.BackupRelativePath)
: Path.Combine(Config.Default.BackupPath))
: null;
SettingsUtils.BackupUserConfigSettings(Config.Default, "userconfig.json", installFolder, backupFolder);
SettingsUtils.BackupUserConfigSettings(CommonConfig.Default, "commonconfig.json", installFolder, backupFolder);
}
}
}

View file

@ -835,6 +835,8 @@
<sys:String x:Key="GlobalSettings_DataDirectoryChange_ConfirmLabel">Changing the data directory will move any existing profiles to the new location, but it will not move any server installations. Do you still want to change this directory?</sys:String>
<sys:String x:Key="GlobalSettings_DataDirectoryChange_FailedTitle">Failed to change data directory</sys:String>
<sys:String x:Key="GlobalSettings_DataDirectoryChange_FailedLabel">There was an error changing the data directory: {0}\r\nPlease correct the error and try again, or contact technical support for assistance.</sys:String>
<sys:String x:Key="GlobalSettings_ResetDataDirectory_ConfirmTitle">Confirm Data Directory Reset</sys:String>
<sys:String x:Key="GlobalSettings_ResetDataDirectory_ConfirmLabel">Click 'Yes' to confirm you want to reset the location of the data directory. Once reset, the server manager will shutdown and you will need to restart.</sys:String>
<sys:String x:Key="GlobalSettings_DataDirectoryTitle">Select Backup Directory</sys:String>
<sys:String x:Key="GlobalSettings_CacheDirectoryTitle">Select Cache Directory</sys:String>

View file

@ -641,6 +641,11 @@
<Label Content="{DynamicResource GlobalSettings_SetLocationButtonLabel}" VerticalAlignment="Center" Margin="0,-2,0,-2"/>
</StackPanel>
</ContentControl>
<ContentControl x:Key="DataDirectoryResetButtonContent">
<StackPanel Orientation="Horizontal">
<Label Content="{DynamicResource GlobalSettings_ResetButtonLabel}" VerticalAlignment="Center" Margin="0,-2,0,-2"/>
</StackPanel>
</ContentControl>
<ContentControl x:Key="BackupDirectoryButtonContent">
<StackPanel Orientation="Horizontal">
<Label Content="{DynamicResource GlobalSettings_SetLocationButtonLabel}" VerticalAlignment="Center" Margin="0,-2,0,-2"/>

View file

@ -5,14 +5,14 @@
<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-12-02T00:00:00Z</updated>
<updated>2021-12-08T00:00:00Z</updated>
<entry>
<id>urn:uuid:F8A08616-749B-48E7-87D5-D97E86AB3926</id>
<title>1.1.56 (1.1.56.1)</title>
<summary>1.1.56.1</summary>
<title>1.1.56 (1.1.56.2)</title>
<summary>1.1.56.2</summary>
<link href="" />
<updated>2021-12-06T00:00:00Z</updated>
<updated>2021-12-08T00: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>
@ -21,13 +21,20 @@
<ul>
<li>
A new Discord Bot has been added to the server manager.<br/>
This new discord bot will allow you to send <font color="#0094FF">Start, Stop, Shutdown, Restart, Backup and Update</font> commands to the server manager from within your discord client.
To setup the new discord bot, open the global settings and scroll down to the Discord section.
This new discord bot will allow you to send <font color="#0094FF">Start, Stop, Shutdown, Restart, Backup and Update</font> commands to the server manager from within your discord client.<br/>
To setup the new discord bot, open the global settings and scroll down to the Discord section.<br/>
<font color="#e62919">
NOTE: This is long process to get the discord bot working, and I have created a forum post with detailed instructions how to do it.
</font>
</li>
</ul>
<u style="font-size: .9em;">CHANGE</u>
<br/>
<ul>
<li>
<li>Global Settings - Added reset button to the Data Directory Location.</li>
</li>
</ul>
</p>
</div>
</content>

View file

@ -5,7 +5,32 @@
<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-12-06T00:00:00Z</updated>
<updated>2021-12-08T00:00:00Z</updated>
<entry>
<id>urn:uuid:F8A08616-749B-48E7-87D5-D97E86AB3926</id>
<title>1.1.56 (1.1.56.2)</title>
<summary>1.1.56.2</summary>
<link href="" />
<updated>2021-12-08T00: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>
<li>Global Settings - Added reset button to the Data Directory Location.</li>
</li>
</ul>
</p>
</div>
</content>
<author>
<name>bletch</name>
<email>bletch1971@hotmail.com</email>
</author>
</entry>
<entry>
<id>urn:uuid:F8A08616-749B-48E7-87D5-D97E86AB3926</id>
@ -21,8 +46,8 @@
<ul>
<li>
A new Discord Bot has been added to the server manager.<br/>
This new discord bot will allow you to send <font color="#0094FF">Start, Stop, Shutdown, Restart, Backup and Update</font> commands to the server manager from within your discord client.
To setup the new discord bot, open the global settings and scroll down to the Discord section.
This new discord bot will allow you to send <font color="#0094FF">Start, Stop, Shutdown, Restart, Backup and Update</font> commands to the server manager from within your discord client.<br/>
To setup the new discord bot, open the global settings and scroll down to the Discord section.<br/>
<font color="#e62919">
NOTE: This is long process to get the discord bot working, and I have created a forum post with detailed instructions how to do it.
</font>

View file

@ -76,6 +76,7 @@
<Label Grid.Row="4" Grid.Column="0" Margin="1" Content="{DynamicResource GlobalSettings_DataDirectoryLabel}" VerticalAlignment="Center"/>
<TextBox Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Margin="1" Text="{Binding Config.DataPath, Mode=TwoWay}" IsReadOnly="True" IsReadOnlyCaretVisible="True" VerticalContentAlignment="Center" />
<Button Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="2" Margin="5,1,0,1" VerticalAlignment="Center" HorizontalAlignment="Left" Content="{DynamicResource DataDirectoryButtonContent}" Click="SetDataDir_Click" Visibility="Hidden"/>
<Button Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="2" Margin="5,1,0,1" VerticalAlignment="Center" HorizontalAlignment="Right" Content="{DynamicResource DataDirectoryResetButtonContent}" Click="ResetDataDir_Click" />
<Label Grid.Row="5" Grid.Column="0" Margin="1" Content="{DynamicResource GlobalSettings_BackupDirectoryLabel}" VerticalAlignment="Center"/>
<TextBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Margin="1" Text="{Binding Config.BackupPath, Mode=TwoWay}" IsReadOnly="True" IsReadOnlyCaretVisible="True" VerticalContentAlignment="Center" />

View file

@ -213,6 +213,21 @@ namespace ServerManagerTool
}
}
private void ResetDataDir_Click(object sender, RoutedEventArgs e)
{
// Confirm the reset with the user.
if (MessageBox.Show(_globalizer.GetResourceString("GlobalSettings_ResetDataDirectory_ConfirmLabel"), _globalizer.GetResourceString("GlobalSettings_ResetDataDirectory_ConfirmTitle"), MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
return;
// Update the config
Config.Default.DataPath = string.Empty;
Config.Default.ConfigPath = string.Empty;
App.SaveConfigFiles(false);
Environment.Exit(0);
}
private void SetBackupDir_Click(object sender, RoutedEventArgs e)
{
var dialog = new CommonOpenFileDialog();
@ -393,13 +408,11 @@ namespace ServerManagerTool
{
Config.Default.Reset();
Config.Default.UpgradeConfig = false;
Config.Default.Save();
Config.Default.Reload();
CommonConfig.Default.Reset();
CommonConfig.Default.UpgradeConfig = false;
CommonConfig.Default.Save();
CommonConfig.Default.Reload();
App.SaveConfigFiles(false);
}
catch (Exception ex)
{
@ -409,7 +422,7 @@ namespace ServerManagerTool
}
finally
{
App.Current.Shutdown(exitCode);
Environment.Exit(0);
}
}

View file

@ -244,13 +244,6 @@ namespace ServerManagerTool
PlayerListWindow.CloseAllWindows();
ServerMonitorWindow.CloseAllWindows();
this.versionChecker.DisposeAsync().DoNotWait();
var installFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var backupFolder = IOUtils.NormalizePath(string.IsNullOrWhiteSpace(Config.Default.BackupPath)
? Path.Combine(Config.Default.DataPath, Config.Default.BackupRelativePath)
: Path.Combine(Config.Default.BackupPath));
SettingsUtils.BackupUserConfigSettings(Config.Default, "userconfig.json", installFolder, backupFolder);
SettingsUtils.BackupUserConfigSettings(CommonConfig.Default, "commonconfig.json", installFolder, backupFolder);
}
private void ResourceDictionaryChangedEvent(object source, ResourceDictionaryChangedEventArgs e)

View file

@ -1,5 +1,4 @@
using ServerManagerTool.Common;
using ServerManagerTool.Common.Utils;
using ServerManagerTool.Common.Utils;
using System;
using System.ComponentModel;
using System.IO;
@ -101,11 +100,7 @@ namespace ServerManagerTool
Config.Default.SteamCmd_UseAnonymousCredentials = true;
}
Config.Default.Save();
CommonConfig.Default.Save();
Config.Default.Reload();
CommonConfig.Default.Reload();
App.SaveConfigFiles(false);
base.OnClosed(e);
}