mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Add a reset to default button to discord bot section.
Added Discord Bot section to the profile sync list.
This commit is contained in:
parent
fd0c04db9d
commit
a6f2b6f912
19 changed files with 254 additions and 118 deletions
|
|
@ -1451,6 +1451,19 @@ namespace ServerManagerTool.Lib
|
|||
this.ClearValue(LauncherArgsProperty);
|
||||
this.ClearValue(AdditionalArgsProperty);
|
||||
}
|
||||
|
||||
public void ResetDiscordBotSection()
|
||||
{
|
||||
this.ClearValue(DiscordChannelIdProperty);
|
||||
this.ClearValue(DiscordAliasProperty);
|
||||
|
||||
this.ClearValue(AllowDiscordBackupProperty);
|
||||
this.ClearValue(AllowDiscordRestartProperty);
|
||||
this.ClearValue(AllowDiscordShutdownProperty);
|
||||
this.ClearValue(AllowDiscordStartProperty);
|
||||
this.ClearValue(AllowDiscordStopProperty);
|
||||
this.ClearValue(AllowDiscordUpdateProperty);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Sync Methods
|
||||
|
|
@ -1467,6 +1480,9 @@ namespace ServerManagerTool.Lib
|
|||
case ServerProfileCategory.AutomaticManagement:
|
||||
SyncAutomaticManagement(sourceProfile);
|
||||
break;
|
||||
case ServerProfileCategory.DiscordBot:
|
||||
SyncDiscordBot(sourceProfile);
|
||||
break;
|
||||
case ServerProfileCategory.ServerFiles:
|
||||
SyncServerFiles(sourceProfile);
|
||||
break;
|
||||
|
|
@ -1516,6 +1532,19 @@ namespace ServerManagerTool.Lib
|
|||
this.SetValue(AutoRestartIfShutdownProperty, sourceProfile.AutoRestartIfShutdown);
|
||||
}
|
||||
|
||||
private void SyncDiscordBot(ServerProfile sourceProfile)
|
||||
{
|
||||
this.SetValue(DiscordChannelIdProperty, sourceProfile.DiscordChannelId);
|
||||
this.SetValue(DiscordAliasProperty, sourceProfile.DiscordAlias);
|
||||
|
||||
this.SetValue(AllowDiscordBackupProperty, sourceProfile.AllowDiscordBackup);
|
||||
this.SetValue(AllowDiscordRestartProperty, sourceProfile.AllowDiscordRestart);
|
||||
this.SetValue(AllowDiscordShutdownProperty, sourceProfile.AllowDiscordShutdown);
|
||||
this.SetValue(AllowDiscordStartProperty, sourceProfile.AllowDiscordStart);
|
||||
this.SetValue(AllowDiscordStopProperty, sourceProfile.AllowDiscordStop);
|
||||
this.SetValue(AllowDiscordUpdateProperty, sourceProfile.AllowDiscordUpdate);
|
||||
}
|
||||
|
||||
private void SyncServerFiles(ServerProfile sourceProfile)
|
||||
{
|
||||
this.SetValue(ServerFilesBlacklistedProperty, sourceProfile.ServerFilesBlacklisted);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue