private void bResetTab_Click( object sender, EventArgs e )
{
if ( MessageBox.Show( "Are you sure you want to reset this tab to defaults?", "Warning",
MessageBoxButtons.OKCancel ) != DialogResult.OK )
return;
switch ( tabs.SelectedIndex ) {
case 0:// General
Config.LoadDefaults( ConfigSection.General );
ApplyTabGeneral();
break;
case 1: // Chat
Config.LoadDefaults( ConfigSection.Chat );
ApplyTabChat();
break;
case 2:// Worlds
Config.LoadDefaults( ConfigSection.Worlds );
ApplyTabWorlds(); // also reloads world list
break;
case 3:// Ranks
Config.ResetRanks();
ApplyTabWorlds();
ApplyTabRanks();
RebuildRankList();
break;
case 4:// Security
Config.LoadDefaults( ConfigSection.Security );
ApplyTabSecurity();
break;
case 5:// Saving and Backup
Config.LoadDefaults( ConfigSection.SavingAndBackup );
ApplyTabSavingAndBackup();
break;
case 6:// Logging
Config.LoadDefaults( ConfigSection.Logging );
Config.ResetLogOptions();
ApplyTabLogging();
break;
case 7:// IRC
Config.LoadDefaults( ConfigSection.IRC );
ApplyTabIRC();
break;
case 8:// Advanced
Config.LoadDefaults( ConfigSection.Logging );
ApplyTabAdvanced();
break;
}
}