Showing preview only (3,636K chars total). Download the full file or copy to clipboard to get everything.
Repository: CnCNet/xna-cncnet-client
Branch: develop
Commit: 05d6760f6287
Files: 482
Total size: 3.4 MB
Directory structure:
gitextract_dgog0ci0/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug-report.yml
│ │ ├── config.yml
│ │ └── feature-request.yml
│ ├── copilot-coding-agent-setup.md
│ ├── copilot-instructions.md
│ └── workflows/
│ ├── build.yml
│ ├── copilot-setup-steps.yml
│ ├── pr-build-comment.yml
│ └── release-build.yml
├── .gitignore
├── .gitmodules
├── AdditionalFiles/
│ ├── UpdateServerScripts/
│ │ ├── preupdateexec
│ │ └── updateexec
│ └── VersionFileWriter/
│ └── VersionConfig.ini
├── ClientCore/
│ ├── CCIniFile.cs
│ ├── ClientConfiguration.cs
│ ├── ClientCore.csproj
│ ├── Enums/
│ │ ├── AllowPrivateMessagesFromEnum.cs
│ │ ├── ClientType.cs
│ │ ├── ClientTypeHelper.cs
│ │ └── SortDirection.cs
│ ├── Extensions/
│ │ ├── ArrayExtensions.cs
│ │ ├── EnumExtensions.cs
│ │ ├── EnumerableExtensions.cs
│ │ ├── FileExtensions.cs
│ │ ├── IniFileExtensions.cs
│ │ └── StringExtensions.cs
│ ├── I18N/
│ │ ├── Translation.cs
│ │ └── TranslationGameFile.cs
│ ├── INIProcessing/
│ │ ├── IniPreprocessInfoStore.cs
│ │ ├── IniPreprocessor.cs
│ │ └── PreprocessorBackgroundTask.cs
│ ├── LoadingScreenController.cs
│ ├── OSVersion.cs
│ ├── PlatformShim/
│ │ └── EncodingExt.cs
│ ├── ProcessLauncher.cs
│ ├── ProfanityFilter.cs
│ ├── ProgramConstants.cs
│ ├── SavedGameManager.cs
│ ├── Settings/
│ │ ├── BoolSetting.cs
│ │ ├── DoubleSetting.cs
│ │ ├── IIniSetting.cs
│ │ ├── INISetting.cs
│ │ ├── IntRangeSetting.cs
│ │ ├── IntSetting.cs
│ │ ├── StringListSetting.cs
│ │ ├── StringSetting.cs
│ │ └── UserINISettings.cs
│ └── Statistics/
│ ├── DataWriter.cs
│ ├── GameParsers/
│ │ └── LogFileStatisticsParser.cs
│ ├── GenericMatchParser.cs
│ ├── GenericStatisticsManager.cs
│ ├── MatchStatistics.cs
│ ├── PlayerStatistics.cs
│ └── StatisticsManager.cs
├── ClientGUI/
│ ├── ClientGUI.csproj
│ ├── ClientGUICreator.cs
│ ├── DarkeningPanel.cs
│ ├── GameProcessLogic.cs
│ ├── HotkeyConfigurationWindow.cs
│ ├── ICompositeControl.cs
│ ├── IME/
│ │ ├── DummyIMEHandler.cs
│ │ ├── IMEHandler.cs
│ │ ├── SdlIMEHandler.cs
│ │ └── WinFormsIMEHandler.cs
│ ├── INIConfigException.cs
│ ├── INItializableWindow.cs
│ ├── IToolTipContainer.cs
│ ├── Parser.cs
│ ├── ScreenResolution.cs
│ ├── Settings/
│ │ ├── FileSettingCheckBox.cs
│ │ ├── FileSettingDropDown.cs
│ │ ├── FileSourceDestinationInfo.cs
│ │ ├── IFileSetting.cs
│ │ ├── IUserSetting.cs
│ │ ├── SettingCheckBox.cs
│ │ ├── SettingCheckBoxBase.cs
│ │ ├── SettingDropDown.cs
│ │ └── SettingDropDownBase.cs
│ ├── ToolTip.cs
│ ├── TranslationGUIExtensions.cs
│ ├── TranslationINIParser.cs
│ ├── UIDesignConstants.cs
│ ├── XNAChatTextBox.cs
│ ├── XNAClientButton.cs
│ ├── XNAClientCheckBox.cs
│ ├── XNAClientColorDropDown.cs
│ ├── XNAClientDropDown.cs
│ ├── XNAClientLinkLabel.cs
│ ├── XNAClientPreferredItemDropDown.cs
│ ├── XNAClientStateButton.cs
│ ├── XNAClientTabControl.cs
│ ├── XNAClientToggleButton.cs
│ ├── XNAExtraPanel.cs
│ ├── XNALinkButton.cs
│ ├── XNAMessageBox.cs
│ ├── XNAOptionsPanel.cs
│ ├── XNAPlayerSlotIndicator.cs
│ ├── XNAWindow.cs
│ └── XNAWindowBase.cs
├── ClientUpdater/
│ ├── ClientUpdater.csproj
│ ├── Compression/
│ │ ├── Common/
│ │ │ ├── CRC.cs
│ │ │ ├── CommandLineParser.cs
│ │ │ ├── InBuffer.cs
│ │ │ └── OutBuffer.cs
│ │ ├── CompressionHelper.cs
│ │ ├── ICoder.cs
│ │ ├── LZ/
│ │ │ ├── IMatchFinder.cs
│ │ │ ├── LzBinTree.cs
│ │ │ ├── LzInWindow.cs
│ │ │ └── LzOutWindow.cs
│ │ ├── LZMA/
│ │ │ ├── LzmaBase.cs
│ │ │ ├── LzmaDecoder.cs
│ │ │ └── LzmaEncoder.cs
│ │ └── RangeCoder/
│ │ ├── RangeCoder.cs
│ │ ├── RangeCoderBit.cs
│ │ └── RangeCoderBitTree.cs
│ ├── CustomComponent.cs
│ ├── UpdateMirror.cs
│ ├── Updater.cs
│ ├── UpdaterFileInfo.cs
│ └── VersionState.cs
├── CommonAssemblies.txt
├── CommonAssembliesNetFx.txt
├── Contributing.md
├── DXClient.slnx
├── DXMainClient/
│ ├── AdminRestarter.cs
│ ├── DXGUI/
│ │ ├── Campaign/
│ │ │ ├── CampaignCheckBox.cs
│ │ │ ├── CampaignDropDown.cs
│ │ │ ├── CampaignSelector.cs
│ │ │ ├── CampaignTagSelector.cs
│ │ │ └── CheaterWindow.cs
│ │ ├── GameClass.cs
│ │ ├── Generic/
│ │ │ ├── DropDownDataWriteMode.cs
│ │ │ ├── ExtrasWindow.cs
│ │ │ ├── GameInProgressWindow.cs
│ │ │ ├── GameLoadingWindow.cs
│ │ │ ├── GameSessionCheckBox.cs
│ │ │ ├── GameSessionDropDown.cs
│ │ │ ├── LoadingScreen.cs
│ │ │ ├── MainMenu.cs
│ │ │ ├── ManualUpdateQueryWindow.cs
│ │ │ ├── OptionPanels/
│ │ │ │ ├── AudioOptionsPanel.cs
│ │ │ │ ├── CnCNetOptionsPanel.cs
│ │ │ │ ├── ComponentsPanel.cs
│ │ │ │ ├── DisplayOptionsPanel.cs
│ │ │ │ ├── GameOptionsPanel.cs
│ │ │ │ └── UpdaterOptionsPanel.cs
│ │ │ ├── OptionsWindow.cs
│ │ │ ├── PrivacyNotification.cs
│ │ │ ├── StatisticsWindow.cs
│ │ │ ├── TopBar.cs
│ │ │ ├── URLHandler.cs
│ │ │ ├── UpdateQueryWindow.cs
│ │ │ └── UpdateWindow.cs
│ │ ├── IGameSessionSetting.cs
│ │ ├── IMessageView.cs
│ │ ├── ISwitchable.cs
│ │ └── Multiplayer/
│ │ ├── ChatListBox.cs
│ │ ├── CnCNet/
│ │ │ ├── ChoiceNotificationBox.cs
│ │ │ ├── CnCNetGameLoadingLobby.cs
│ │ │ ├── CnCNetLobby.cs
│ │ │ ├── CnCNetLoginWindow.cs
│ │ │ ├── GameCreationEventArgs.cs
│ │ │ ├── GameCreationWindow.cs
│ │ │ ├── GlobalContextMenu.cs
│ │ │ ├── GlobalContextMenuData.cs
│ │ │ ├── LoadOrSaveGameOptionPresetWindow.cs
│ │ │ ├── MapSharingConfirmationPanel.cs
│ │ │ ├── PasswordRequestWindow.cs
│ │ │ ├── PrivateMessageNotificationBox.cs
│ │ │ ├── PrivateMessagingPanel.cs
│ │ │ ├── PrivateMessagingWindow.cs
│ │ │ ├── RecentPlayerTable.cs
│ │ │ ├── RecentPlayerTableRightClickEventArgs.cs
│ │ │ ├── TunnelListBox.cs
│ │ │ └── TunnelSelectionWindow.cs
│ │ ├── GameFiltersPanel.cs
│ │ ├── GameInformationIconOnlyPanel.cs
│ │ ├── GameInformationIconPanel.cs
│ │ ├── GameInformationPanel.cs
│ │ ├── GameListBox.cs
│ │ ├── GameLoadingLobbyBase.cs
│ │ ├── GameLobby/
│ │ │ ├── ChatBoxCommand.cs
│ │ │ ├── CnCNetGameLobby.cs
│ │ │ ├── CommandHandlers/
│ │ │ │ ├── CommandHandlerBase.cs
│ │ │ │ ├── IntCommandHandler.cs
│ │ │ │ ├── IntNotificationHandler.cs
│ │ │ │ ├── NoParamCommandHandler.cs
│ │ │ │ ├── NotificationHandler.cs
│ │ │ │ └── StringCommandHandler.cs
│ │ │ ├── CoopBriefingBox.cs
│ │ │ ├── GameHostInactiveChecker.cs
│ │ │ ├── GameLaunchButton.cs
│ │ │ ├── GameLeftEventArgs.cs
│ │ │ ├── GameLobbyBase.cs
│ │ │ ├── GameLobbyCheckBox.cs
│ │ │ ├── GameLobbyDropDown.cs
│ │ │ ├── GameLobbySettingsEventArgs.cs
│ │ │ ├── GameLobbySettingsWindow.cs
│ │ │ ├── GameModeMapFilter.cs
│ │ │ ├── GameType.cs
│ │ │ ├── LANGameLobby.cs
│ │ │ ├── MapCodeHelper.cs
│ │ │ ├── MapPreviewBox.cs
│ │ │ ├── MultiplayerGameLobby.cs
│ │ │ ├── PlayerLocationIndicator.cs
│ │ │ └── SkirmishLobby.cs
│ │ ├── LANGameCreationWindow.cs
│ │ ├── LANGameLoadingLobby.cs
│ │ ├── LANLobby.cs
│ │ ├── LANLobbyBroadcastManager.cs
│ │ ├── LANLobbyBroadcastMessageReceivedEventArgs.cs
│ │ ├── LANMessageDeduplicator.cs
│ │ ├── LANPlayerManager.cs
│ │ ├── PlayerExtraOptionsPanel.cs
│ │ ├── PlayerListBox.cs
│ │ ├── TeamStartMappingPanel.cs
│ │ └── TeamStartMappingsPanel.cs
│ ├── DXMainClient.csproj
│ ├── Domain/
│ │ ├── CustomMissionHelper.cs
│ │ ├── DirectDrawCompatibilityChecker.cs
│ │ ├── DirectDrawWrapper.cs
│ │ ├── DirectDrawWrapperManager.cs
│ │ ├── DiscordHandler.cs
│ │ ├── FinalSunSettings.cs
│ │ ├── MainClientConstants.cs
│ │ ├── Mission.cs
│ │ ├── Multiplayer/
│ │ │ ├── AllianceHolder.cs
│ │ │ ├── CacheManagerBase.cs
│ │ │ ├── CnCNet/
│ │ │ │ ├── CnCNetGame.cs
│ │ │ │ ├── CnCNetPlayerCountTask.cs
│ │ │ │ ├── CnCNetTunnel.cs
│ │ │ │ ├── CustomCnCNetGame.cs
│ │ │ │ ├── DefaultCnCNetGame.cs
│ │ │ │ ├── GameCollection.cs
│ │ │ │ ├── HostedCnCNetGame.cs
│ │ │ │ ├── MapEventArgs.cs
│ │ │ │ ├── MapSharer.cs
│ │ │ │ ├── NameValidator.cs
│ │ │ │ ├── SHA1EventArgs.cs
│ │ │ │ ├── TimedHttpClient.cs
│ │ │ │ └── TunnelHandler.cs
│ │ │ ├── CoopHouseInfo.cs
│ │ │ ├── CoopMapInfo.cs
│ │ │ ├── CustomMapCache.cs
│ │ │ ├── GameMode.cs
│ │ │ ├── GameModeMap.cs
│ │ │ ├── GameModeMapBase.cs
│ │ │ ├── GameModeMapCollection.cs
│ │ │ ├── GameOptionPresets.cs
│ │ │ ├── GenericHostedGame.cs
│ │ │ ├── ICacheManager.cs
│ │ │ ├── IGameModeMap.cs
│ │ │ ├── IMapPreviewCacheManager.cs
│ │ │ ├── IReadOnlyGameModeMapCollection.cs
│ │ │ ├── LAN/
│ │ │ │ ├── ClientIntCommandHandler.cs
│ │ │ │ ├── ClientNoParamCommandHandler.cs
│ │ │ │ ├── ClientStringCommandHandler.cs
│ │ │ │ ├── HostedLANGame.cs
│ │ │ │ ├── LANClientCommandHandler.cs
│ │ │ │ ├── LANColor.cs
│ │ │ │ ├── LANLobbyUser.cs
│ │ │ │ ├── LANPlayerInfo.cs
│ │ │ │ ├── LANServerCommandHandler.cs
│ │ │ │ ├── NetworkMessageEventArgs.cs
│ │ │ │ ├── ServerNoParamCommandHandler.cs
│ │ │ │ └── ServerStringCommandHandler.cs
│ │ │ ├── Map.cs
│ │ │ ├── MapChangeEventArgs.cs
│ │ │ ├── MapFileEventArgs.cs
│ │ │ ├── MapFileWatcher.cs
│ │ │ ├── MapLoader.cs
│ │ │ ├── MapPreviewCacheManager.cs
│ │ │ ├── MapPreviewExtractor.cs
│ │ │ ├── MultiplayerColor.cs
│ │ │ ├── PlayerExtraOptions.cs
│ │ │ ├── PlayerHouseInfo.cs
│ │ │ ├── PlayerInfo.cs
│ │ │ ├── SavedGamePlayer.cs
│ │ │ ├── TeamStartMapping.cs
│ │ │ └── TeamStartMappingPreset.cs
│ │ └── SavedGame.cs
│ ├── Online/
│ │ ├── Channel.cs
│ │ ├── ChannelUser.cs
│ │ ├── ChatMessage.cs
│ │ ├── CnCNetGameCheck.cs
│ │ ├── CnCNetManager.cs
│ │ ├── CnCNetUserData.cs
│ │ ├── Connection.cs
│ │ ├── EventArguments/
│ │ │ ├── AttemptedServerEventArgs.cs
│ │ │ ├── CTCPEventArgs.cs
│ │ │ ├── ChannelCTCPEventArgs.cs
│ │ │ ├── ChannelEventArgs.cs
│ │ │ ├── ChannelModeEventArgs.cs
│ │ │ ├── ChannelTopicEventArgs.cs
│ │ │ ├── CnCNetPrivateMessageEventArgs.cs
│ │ │ ├── ConnectionLostEventArgs.cs
│ │ │ ├── FavoriteMapEventArgs.cs
│ │ │ ├── GameOptionPresetEventArgs.cs
│ │ │ ├── JoinUserEventArgs.cs
│ │ │ ├── KickEventArgs.cs
│ │ │ ├── MultiplayerNameRightClickedEventArgs.cs
│ │ │ ├── PrivateCTCPEventArgs.cs
│ │ │ ├── PrivateMessageEventArgs.cs
│ │ │ ├── ServerMessageEventArgs.cs
│ │ │ ├── UnreadMessageCountEventArgs.cs
│ │ │ ├── UserAwayEventArgs.cs
│ │ │ ├── UserListEventArgs.cs
│ │ │ └── WhoEventArgs.cs
│ │ ├── FileHashCalculator.cs
│ │ ├── IConnectionManager.cs
│ │ ├── IRCColor.cs
│ │ ├── IRCUser.cs
│ │ ├── IUserCollection.cs
│ │ ├── PrivateMessageHandler.cs
│ │ ├── PrivateMessageUser.cs
│ │ ├── QueuedMessage.cs
│ │ ├── QueuedMessageType.cs
│ │ ├── RecentPlayer.cs
│ │ ├── Server.cs
│ │ ├── SortedUserCollection.cs
│ │ └── UnsortedUserCollection.cs
│ ├── PreStartup.cs
│ ├── Program.cs
│ ├── Properties/
│ │ └── launchSettings.json
│ ├── Resources/
│ │ ├── ClientDefinitions.ini
│ │ ├── DTA/
│ │ │ ├── CampaignSelector.ini
│ │ │ ├── CheaterScreen.ini
│ │ │ ├── CnCNetGameLobby.ini
│ │ │ ├── CnCNetLobby.ini
│ │ │ ├── Compatibility/
│ │ │ │ ├── Configs/
│ │ │ │ │ ├── aqrit.cfg
│ │ │ │ │ ├── cnc-ddraw.ini
│ │ │ │ │ ├── ddraw-auto.ini
│ │ │ │ │ ├── ddraw-gdi.ini
│ │ │ │ │ ├── ddraw-opengl.ini
│ │ │ │ │ └── dxwnd.ini
│ │ │ │ └── Unix/
│ │ │ │ ├── wine-game.bat
│ │ │ │ ├── wine-game.sh
│ │ │ │ ├── wine-mapedit.bat
│ │ │ │ └── wine-mapedit.sh
│ │ │ ├── Default Theme/
│ │ │ │ ├── DTACnCNetClient.ini
│ │ │ │ ├── MainMenuTheme.bak
│ │ │ │ ├── MainMenuTheme.ogg
│ │ │ │ ├── MainMenuTheme.wma
│ │ │ │ └── MainMenuTheme.xnb
│ │ │ ├── ExtrasWindow.ini
│ │ │ ├── FScompatfix.sdb
│ │ │ ├── GameCollectionConfig.ini
│ │ │ ├── GameLobbyBase.ini
│ │ │ ├── GameOptions.ini
│ │ │ ├── GenericWindow.ini
│ │ │ ├── KeyboardCommands.ini
│ │ │ ├── LANGameLobby.ini
│ │ │ ├── LANLobby.ini
│ │ │ ├── LoadingScreen.ini
│ │ │ ├── MainMenu.ini
│ │ │ ├── MultiplayerGameLobby.ini
│ │ │ ├── OptionsWindow.ini
│ │ │ ├── ReShade Files/
│ │ │ │ └── ReShade.ini
│ │ │ ├── Renderers.ini
│ │ │ ├── SkirmishLobby.ini
│ │ │ ├── SpriteFont0.xnb
│ │ │ ├── SpriteFont1.xnb
│ │ │ ├── SpriteFont2.xnb
│ │ │ ├── SpriteFont3.xnb
│ │ │ ├── SpriteFont4.xnb
│ │ │ ├── StatisticsWindow.ini
│ │ │ ├── UpdaterConfig.ini
│ │ │ ├── UserDefaults.ini
│ │ │ ├── ZLIB.License.txt
│ │ │ ├── ZLIB.Ms-PL.txt
│ │ │ ├── arrow.cur
│ │ │ ├── cnc-ddraw.ini
│ │ │ ├── compatfix.sdb
│ │ │ ├── cursor.cur
│ │ │ ├── ddrawcompat.ini
│ │ │ ├── l480s01.pcx
│ │ │ ├── l480s02.pcx
│ │ │ ├── l480s11.pcx
│ │ │ ├── l480s12.pcx
│ │ │ ├── l600s01.pcx
│ │ │ ├── l600s02.pcx
│ │ │ ├── l600s11.pcx
│ │ │ ├── l600s12.pcx
│ │ │ ├── qres license.txt
│ │ │ ├── ts-ddraw-gdi.ini
│ │ │ └── ts-ddraw.ini
│ │ ├── INI/
│ │ │ ├── Base/
│ │ │ │ └── Instructions.txt
│ │ │ ├── Battle.ini
│ │ │ ├── Default.ini
│ │ │ ├── FSR.ini
│ │ │ ├── Game Options/
│ │ │ │ ├── Auto Deploy MCV.ini
│ │ │ │ ├── Disable Super Weapons.ini
│ │ │ │ ├── Disable Unit Queueing.ini
│ │ │ │ ├── Disable Visceroids.ini
│ │ │ │ ├── Extreme AI.ini
│ │ │ │ ├── Harder AI.ini
│ │ │ │ ├── Immune Harvesters.ini
│ │ │ │ ├── Infinite Tiberium.ini
│ │ │ │ ├── Ingame Allying.ini
│ │ │ │ ├── Instant Harvester Unload.ini
│ │ │ │ ├── Naval.ini
│ │ │ │ ├── No Baddy Crates.ini
│ │ │ │ ├── No Crew.ini
│ │ │ │ ├── No Silos.ini
│ │ │ │ ├── Replace Tiberium With Ore.ini
│ │ │ │ ├── Reveal Shroud.ini
│ │ │ │ ├── Shroud Regrows.ini
│ │ │ │ ├── Starting Units.ini
│ │ │ │ ├── Storms.ini
│ │ │ │ ├── Turbo Vehicles.ini
│ │ │ │ ├── Turtling AI.ini
│ │ │ │ ├── Uncrushable Infantry.ini
│ │ │ │ └── Veteran Balance Patch.ini
│ │ │ ├── MPMaps.ini
│ │ │ ├── Map Code/
│ │ │ │ ├── Difficulty Easy.ini
│ │ │ │ ├── Difficulty Hard.ini
│ │ │ │ ├── Difficulty Medium.ini
│ │ │ │ ├── King of the Hill.ini
│ │ │ │ ├── Naval Only AI.ini
│ │ │ │ ├── Scavenger.ini
│ │ │ │ └── Survivor.ini
│ │ │ ├── MapSel.ini
│ │ │ ├── MapSel01.ini
│ │ │ ├── Menu.ini
│ │ │ ├── ai.ini
│ │ │ ├── aifs.ini
│ │ │ ├── art.ini
│ │ │ ├── artfs.ini
│ │ │ ├── day.ini
│ │ │ ├── dusk.ini
│ │ │ ├── firestrm.ini
│ │ │ ├── ion.ini
│ │ │ ├── keyboard.ini
│ │ │ ├── morning.ini
│ │ │ ├── night.ini
│ │ │ ├── rules.ini
│ │ │ ├── snow.ini
│ │ │ ├── sound.ini
│ │ │ ├── sound01.ini
│ │ │ ├── temperat.ini
│ │ │ ├── theme.ini
│ │ │ └── tutorial.ini
│ │ ├── Map Editor/
│ │ │ └── test.txt
│ │ ├── Maps/
│ │ │ └── Custom/
│ │ │ └── custom maps.txt
│ │ └── SUN.ini
│ ├── Startup.cs
│ ├── app.PerMonitorV2.manifest
│ └── app.SystemAware.manifest
├── Directory.Build.props
├── Directory.Build.targets
├── Directory.Packages.props
├── Docs/
│ ├── Build.md
│ ├── DiscordRichPresence.md
│ ├── HowToUpdate.md
│ ├── INISystem.md
│ ├── Migration-INI.md
│ ├── Migration.md
│ ├── NewFeatures.md
│ ├── Translation.md
│ └── Updater.md
├── GitVersion.yml
├── LICENSE
├── NuGet.config
├── README.md
├── References/
│ ├── .gitkeep
│ └── Facepunch.Steamworks.2.4.1.nupkg
├── Scripts/
│ ├── Build.bat
│ ├── ClearBinAndObjDirs.bat
│ ├── Get-CommonAssemblyList.ps1
│ ├── README.md
│ └── build.ps1
├── SecondStageUpdater/
│ ├── Program.cs
│ └── SecondStageUpdater.csproj
├── TranslationNotifierGenerator/
│ ├── StringExtensions.cs
│ ├── TranslationNotifierGenerator.cs
│ └── TranslationNotifierGenerator.csproj
└── global.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
# All files
[*]
indent_style = space
# Xml files
[*.xml]
indent_size = 2
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
indent_style = space
tab_width = 4
# New line preferences
end_of_line = crlf
insert_final_newline = false
#### .NET Coding Conventions ####
[*.{cs,vb}]
# Organize usings
dotnet_separate_import_directive_groups = true
dotnet_sort_system_directives_first = true
file_header_template = unset
# this. and Me. preferences
dotnet_style_qualification_for_event = false:silent
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_property = false:silent
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
# Expression-level preferences
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
# Field preferences
dotnet_style_readonly_field = true:warning
# Parameter preferences
dotnet_code_quality_unused_parameters = all:suggestion
# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none
# CA1806: Do not ignore method results
dotnet_diagnostic.CA1806.severity = error
#### C# Coding Conventions ####
[*.cs]
# var preferences
csharp_style_var_elsewhere = false:silent
csharp_style_var_for_built_in_types = false:silent
csharp_style_var_when_type_is_apparent = false:silent
# Expression-bodied members
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_lambdas = true:suggestion
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_switch_expression = true:suggestion
# Null-checking preferences
csharp_style_conditional_delegate_call = true:suggestion
# Modifier preferences
csharp_prefer_static_local_function = true:warning
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
# Code-block preferences
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:suggestion
# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:silent
#### C# Formatting Rules ####
# New line preferences
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
#### Naming styles ####
[*.{cs,vb}]
# Naming rules
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion
dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces
dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase
dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion
dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters
dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase
dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods
dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties
dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.events_should_be_pascalcase.symbols = events
dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion
dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables
dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase
dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion
dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants
dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase
dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion
dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters
dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase
dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields
dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
# Symbol specifications
dotnet_naming_symbols.interfaces.applicable_kinds = interface
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interfaces.required_modifiers =
dotnet_naming_symbols.enums.applicable_kinds = enum
dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.enums.required_modifiers =
dotnet_naming_symbols.events.applicable_kinds = event
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.events.required_modifiers =
dotnet_naming_symbols.methods.applicable_kinds = method
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.methods.required_modifiers =
dotnet_naming_symbols.properties.applicable_kinds = property
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.properties.required_modifiers =
dotnet_naming_symbols.public_fields.applicable_kinds = field
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_fields.required_modifiers =
dotnet_naming_symbols.private_fields.applicable_kinds = field
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_fields.required_modifiers =
dotnet_naming_symbols.private_static_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_static_fields.required_modifiers = static
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types_and_namespaces.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.type_parameters.applicable_kinds = namespace
dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
dotnet_naming_symbols.type_parameters.required_modifiers =
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_constant_fields.required_modifiers = const
dotnet_naming_symbols.local_variables.applicable_kinds = local
dotnet_naming_symbols.local_variables.applicable_accessibilities = local
dotnet_naming_symbols.local_variables.required_modifiers =
dotnet_naming_symbols.local_constants.applicable_kinds = local
dotnet_naming_symbols.local_constants.applicable_accessibilities = local
dotnet_naming_symbols.local_constants.required_modifiers = const
dotnet_naming_symbols.parameters.applicable_kinds = parameter
dotnet_naming_symbols.parameters.applicable_accessibilities = *
dotnet_naming_symbols.parameters.required_modifiers =
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_constant_fields.required_modifiers = const
dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal
dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
dotnet_naming_symbols.local_functions.applicable_accessibilities = *
dotnet_naming_symbols.local_functions.required_modifiers =
# Naming styles
dotnet_naming_style.pascalcase.required_prefix =
dotnet_naming_style.pascalcase.required_suffix =
dotnet_naming_style.pascalcase.word_separator =
dotnet_naming_style.pascalcase.capitalization = pascal_case
dotnet_naming_style.ipascalcase.required_prefix = I
dotnet_naming_style.ipascalcase.required_suffix =
dotnet_naming_style.ipascalcase.word_separator =
dotnet_naming_style.ipascalcase.capitalization = pascal_case
dotnet_naming_style.tpascalcase.required_prefix = T
dotnet_naming_style.tpascalcase.required_suffix =
dotnet_naming_style.tpascalcase.word_separator =
dotnet_naming_style.tpascalcase.capitalization = pascal_case
dotnet_naming_style._camelcase.required_prefix = _
dotnet_naming_style._camelcase.required_suffix =
dotnet_naming_style._camelcase.word_separator =
dotnet_naming_style._camelcase.capitalization = camel_case
dotnet_naming_style.camelcase.required_prefix =
dotnet_naming_style.camelcase.required_suffix =
dotnet_naming_style.camelcase.word_separator =
dotnet_naming_style.camelcase.capitalization = camel_case
dotnet_naming_style.s_camelcase.required_prefix = s_
dotnet_naming_style.s_camelcase.required_suffix =
dotnet_naming_style.s_camelcase.word_separator =
dotnet_naming_style.s_camelcase.capitalization = camel_case
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
*.ps1 eol=lf
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: cncnet
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/ISSUE_TEMPLATE/bug-report.yml
================================================
name: Bug Report
description: Open an issue to ask for a XNA Client bug to be fixed.
title: "Your bug report title here"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
> [!WARNING]
> Before posting an issue, please read the **checklist at the bottom**.
Thanks for taking the time to fill out this bug report! If you need real-time help, join us on the [C&C Mod Haven Discord](https://discord.gg/Smv4JC8BUG) server in the __#xna-client-chat__ channel.
Please make sure you follow these instructions and fill in every question with as much detail as possible.
- type: textarea
id: description
attributes:
label: Description
description: |
Write a detailed description telling us what the issue is, and if/when the bug occurs.
validations:
required: true
- type: input
id: xna-client-version
attributes:
label: XNA Client Version
description: |
What version of XNA Client are you using? Please provide a link to the exact XNA Client build used, especially if it's not a release build.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps To Reproduce
description: |
Tell us how to reproduce this issue so the developer(s) can reproduce the bug.
value: |
1.
2.
3.
...
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behaviour
description: |
Tell us what should happen.
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual Behaviour
description: |
Tell us what actually happens instead.
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional Context
description: |
Attach additional files or links to content related to the bug report here, like:
- images/gifs/videos to illustrate the bug;
- files or ini configs that are needed to reproduce the bug;
- a client log (mandatory if you're submitting a crash report).
- type: checkboxes
id: checks
attributes:
label: Checklist
description: Please read and ensure you followed all the following options.
options:
- label: The issue happens on the **latest official** version of XNA Client and wasn't fixed yet.
required: true
- label: I agree to elaborate the details if requested and provide thorough testing if the bugfix is implemented.
required: true
- label: I added a very descriptive title to this issue.
required: true
- label: I used the GitHub search and read the issue list to find a similar issue and didn't find it.
required: true
- label: I have attached as much information as possible *(screenshots, gifs, videos, client logs, etc)*.
required: true
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Official channels on C&C Mod Haven
url: https://discord.gg/Smv4JC8BUG
about: If you want to discuss something with us without filing an issue.
================================================
FILE: .github/ISSUE_TEMPLATE/feature-request.yml
================================================
name: Feature Request
description: Open an issue to ask for a XNA Client feature to be implemented.
title: "Your feature request title here"
labels: ["feature"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this feature request! If you need real-time help, join us on the [C&C Mod Haven Discord](https://discord.gg/Smv4JC8BUG) server in the __#xna-client-chat__ channel.
- type: textarea
id: description
attributes:
label: Description
description: |
Write a detailed description telling us what the feature you want to be implemented in the XNA Client.
validations:
required: true
================================================
FILE: .github/copilot-coding-agent-setup.md
================================================
# GitHub Copilot coding agent setup instructions
This section only applies to the GitHub Copilot coding agent, running in a Linux runner from the GitHub Action environment. It does not apply to other environments, such as local development.
The GitHub Actions workflow `.github/workflows/copilot-setup-steps.yml` runs the setup steps mentioned in this file automatically. The commands below are the manual equivalent and **should only be run if you encounter a build failure** — for example, if GitVersion cannot determine the version, if submodules are missing, or if NuGet restore fails.
## Step 1 — Initialize git submodules
`Rampastring.XNAUI` (and its nested submodule `Rampastring.Tools`) may not be pre-initialized. Missing them causes compile errors about unknown `Rampastring.*` types.
```shell
git submodule update --init --recursive
```
## Step 2 — Unshallow the clone and fetch `develop`
The build system uses **GitVersion.MsBuild** to compute version numbers at compile time. It requires two things:
- A full (non-shallow) commit history.
- The `develop` branch reachable as a remote-tracking ref (it is the mainline branch in `GitVersion.yml`). Without it, any branch that is not `develop` or `master` fails with `Gitversion could not determine which branch to treat as the development branch`.
Run all three commands unconditionally:
- `--unshallow` is a no-op on an already-full clone (`|| true` prevents it from aborting).
- `set-branches` resets the remote's fetch refspec to the standard glob `+refs/heads/*:refs/remotes/origin/*`, removing any single-branch refspec that a shallow clone may have injected. Without this, LibGit2Sharp (used by GitVersion 5.12.0) crashes with `ref 'refs/remotes/origin/develop' doesn't match the destination` because it iterates refspecs in order and fails on the first non-matching one instead of falling through to the glob.
- The final fetch brings `refs/remotes/origin/develop` into the local ref store through that glob refspec so GitVersion can find it.
The same fix must be applied to every submodule recursively: `Rampastring.XNAUI` and its nested `Rampastring.Tools` submodule also carry `GitVersion.MsBuild` and are subject to the same crash when checked out with a narrow single-branch refspec.
```shell
git fetch --unshallow origin || true
git remote set-branches origin '*'
git fetch origin develop
git submodule foreach --recursive \
'git fetch --unshallow origin || true; git remote set-branches origin "*"; git fetch origin'
```
## Step 3 — Restore NuGet packages
Run restore from the **repo root** so that the solution file (`DXClient.slnx`) is used. This ensures all projects — including `SecondStageUpdater`, which the build pulls in transitively — are restored. Always pass the `Configuration` property; omitting it picks the wrong target frameworks.
```shell
dotnet restore -p:Configuration=UniversalGLRelease
```
## Step 4 — Build
```shell
dotnet build DXMainClient/DXMainClient.csproj -p:Configuration=UniversalGLRelease -f net8.0 --no-restore
```
A successful build ends with `0 Error(s)`.
================================================
FILE: .github/copilot-instructions.md
================================================
# Agent Instructions
## General information
### Project structure
| Path | Description |
|------|-------------|
| `DXMainClient/` | Main entry-point project — always the build target |
| `ClientCore/` | Core game-client logic |
| `ClientGUI/` | UI layer |
| `ClientUpdater/` | Auto-updater logic |
| `SecondStageUpdater/` | Secondary updater executable |
| `Rampastring.XNAUI/` | UI framework (git submodule) |
| `GitVersion.yml` | GitVersion branch and versioning strategy |
| `global.json` | Pins the required .NET SDK version (10.0, any feature band) |
| `Directory.Build.props` | MSBuild properties shared across all projects |
| `Directory.Packages.props` | Central NuGet package version management |
| `Docs/Build.md` | Human-oriented build documentation |
### Build the project
```shell
dotnet build DXMainClient/DXMainClient.csproj -p:Configuration=UniversalGLRelease -f net8.0
```
A successful build ends with `0 Error(s)`.
### Contributing guidelines
See [Contributing.md](../Contributing.md) for coding style, formatting, and other contribution guidelines. Be aware, Copilot, you MUST read and follow this file, even if the user did not explicitly ask you to.
## GitHub Copilot coding agent setup instructions
This section only applies to the GitHub Copilot coding agent, running in a Linux runner from the GitHub Action environment. It does not apply to other environments, such as local development.
The steps in the [copilot-coding-agent-setup.md](./copilot-coding-agent-setup.md) file are automatically executed via a GitHub Action workflow before the agent starts. **Only read and run them manually if you encounter a build failure**.
================================================
FILE: .github/workflows/build.yml
================================================
name: build client
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
workflow_dispatch:
jobs:
build-clients:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
global-json-file: ./global.json
- name: Build
run: ./Scripts/build.ps1
shell: pwsh
- uses: actions/upload-artifact@v4
name: Upload Artifacts
with:
name: artifacts
path: ./Compiled
================================================
FILE: .github/workflows/copilot-setup-steps.yml
================================================
name: Copilot setup steps
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout code with full history and submodules
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
# the set-branches call is required to collapse the shallow-clone's specific-branch refspec back to the glob, preventing a LibGit2Sharp crash in GitVersion 5.12.0
- name: Unshallow clone and fetch develop branch
run: |
git fetch --unshallow origin || true
git remote set-branches origin '*'
git fetch origin develop
# Apply the same fix to every submodule (including nested ones), because GitVersion.MsBuild
# runs against each submodule directory that carries it, and the same LibGit2Sharp refspec
# crash occurs there when the submodule was checked out with a narrow single-branch refspec.
git submodule foreach --recursive \
'git fetch --unshallow origin || true; git remote set-branches origin "*"; git fetch origin'
- name: Set up .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: ./global.json
- name: Restore NuGet packages
run: dotnet restore -p:Configuration=UniversalGLRelease
- name: Build
run: dotnet build DXMainClient/DXMainClient.csproj -p:Configuration=UniversalGLRelease -f net8.0 --no-restore
================================================
FILE: .github/workflows/pr-build-comment.yml
================================================
name: automatic comment on pull request
on:
workflow_run:
workflows: ['build client']
types: [completed]
jobs:
pr_comment:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-22.04
steps:
- uses: actions/github-script@v6
with:
# This snippet is public-domain, taken from
# https://github.com/oprypin/nightly.link/blob/master/.github/workflows/pr-comment.yml
script: |
const {owner, repo} = context.repo;
const run_id = ${{github.event.workflow_run.id}};
const pull_head_sha = '${{github.event.workflow_run.head_sha}}';
const pull_user_id = ${{github.event.sender.id}};
const issue_number = await (async () => {
const pulls = await github.rest.pulls.list({owner, repo});
for await (const {data} of github.paginate.iterator(pulls)) {
for (const pull of data) {
if (pull.head.sha === pull_head_sha && pull.user.id === pull_user_id) {
return pull.number;
}
}
}
})();
if (issue_number) {
core.info(`Using pull request ${issue_number}`);
} else {
return core.error(`No matching pull request found`);
}
const {data: {artifacts}} = await github.rest.actions.listWorkflowRunArtifacts({owner, repo, run_id});
if (!artifacts.length) {
return core.error(`No artifacts found`);
}
let body = `Nightly build for this pull request:\n`;
for (const art of artifacts) {
body += `\n* [${art.name}.zip](https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip)`;
}
body += `\nThis comment is automatic and is meant to allow guests to get latest automatic builds without registering. It is updated on every successful build.`;
const {data: comments} = await github.rest.issues.listComments({repo, owner, issue_number});
const existing_comment = comments.find((c) => c.user.login === 'github-actions[bot]');
if (existing_comment) {
core.info(`Updating comment ${existing_comment.id}`);
await github.rest.issues.updateComment({repo, owner, comment_id: existing_comment.id, body});
} else {
core.info(`Creating a comment`);
await github.rest.issues.createComment({repo, owner, issue_number, body});
}
================================================
FILE: .github/workflows/release-build.yml
================================================
name: release build
on:
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Setup .NET SDK
uses: actions/setup-dotnet@v5
with:
global-json-file: ./global.json
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
- name: Determine Version
uses: gittools/actions/gitversion/execute@v0
- name: Development Build Check
if: "!github.event.release.prerelease"
shell: pwsh
run: |
if ($env:GitVersion_CommitsSinceVersionSource -ne "0") {
Write-Output "::error:: This is a development build and should not be released. Did you forget to create a new tag for the release?"
exit 1
}
- name: Build
run: ./Scripts/build.ps1
shell: pwsh
- name: Zip Artifact
run: 7z a -t7z -mx=9 -m0=lzma2 -ms=on -r -- ${{ format('xna-cncnet-client-{0}.7z', env.GitVersion_SemVer) }} ./Compiled/*
shell: pwsh
- name: Upload Final Artifact to the Release
uses: softprops/action-gh-release@v2
with:
append_body: true
files: ${{ format('xna-cncnet-client-{0}.7z', env.GitVersion_SemVer) }}
================================================
FILE: .gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# ... with an exception in References folder
!**/[Rr]eferences/*.nupkg
!**/[Rr]eferences/*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
# CnCNet
Compiled/
Compiled*/
# Käyttiksen (Mac ja win) tekemiä tiedostoja joita jättää pois
._*
.DS_Store*
.Spotlight-V100
.Trashes
ehthumbs.db
Icon?
[Tt]humbs.db
# Dolphin
.directory
.idea/
# Game specific build prop files
Directory.Build.Game.*.props
================================================
FILE: .gitmodules
================================================
[submodule "Rampastring.XNAUI"]
path = Rampastring.XNAUI
url = https://github.com/CnCNet/Rampastring.XNAUI.git
================================================
FILE: AdditionalFiles/UpdateServerScripts/preupdateexec
================================================
[Rename]
OLD_FILE_PATH=NEW_FILE_PATH
[Delete]
FILE_PATH
[RenameFolder]
OLD_FOLDER_PATH=NEW_FOLDER_PATH
[RenameAndMerge]
OLD_FOLDER_PATH=NEW_FOLDER_PATH
[ForceDeleteFolder]
FOLDER_PATH
[DeleteFolderIfEmpty]
FOLDER_PATH
================================================
FILE: AdditionalFiles/UpdateServerScripts/updateexec
================================================
[Rename]
OLD_FILE_PATH=NEW_FILE_PATH
[Delete]
FILE_PATH
[RenameFolder]
OLD_FOLDER_PATH=NEW_FOLDER_PATH
[RenameAndMerge]
OLD_FOLDER_PATH=NEW_FOLDER_PATH
[ForceDeleteFolder]
FOLDER_PATH
[DeleteFolderIfEmpty]
FOLDER_PATH
================================================
FILE: AdditionalFiles/VersionFileWriter/VersionConfig.ini
================================================
; Mod version.
[Version]
1
; Mod updater version.
; Will prompt (either in update status or actual dialog prompt, see below for ManualDownloadURL) for a manual update download if set on server version file and mismatched between local & server.
; Omit or set to N/A if not wishing to use this feature.
[UpdaterVersion]
N/A
; If set client will show a dialog prompting for manual download with the provided link if a manual update download is required.
; Omit if wishing to not use this feature.
[ManualDownloadURL]
[Options]
; If set, enables the extended updater features such as archives, updater version and manual download URL.
EnableExtendedUpdaterFeatures=yes
; If set, will go through every subdirectory recursively for directories given in Include.
RecursiveDirectorySearch=yes
; If set, will always create two version files - one with everything included (version_base) and the proper, actual version file with only changed files (version).
; version_base should be kept around as it is used to compare which files have been changed next time VersionWriter is ran.
IncludeOnlyChangedFiles=no
; If set, original versions of archived files will also be copied to copied files directory.
CopyArchivedOriginalFiles=no
; If set, any directories (including all files and subdirectories in them, regardless of any other settings) and files flagged as hidden or system protected will be excluded. This also defaults to true.
ExcludeHiddenAndSystemFiles=yes
; If set, the mod version string is treated as .NET timestamp/datetime format string with current local time applied on it.
ApplyTimestampOnVersion=no
; If set, no files will be copied whatsoever, only version file(s) are generated. Setting this also disables archived files feature regardless of other settings.
NoCopyMode=no
; Files & directories to include in version file.
[Include]
test.file
test2.file
Test\
; Files (not directories) to be excluded from included files list.
; User-generated (settings etc), temporary and log files should be listed here.
[ExcludeFiles]
Test\test2.file
; Directories to be excluded from included files list
; If you include entire directory trees f.ex map editors, this is useful to exclude things like autosave or log directories.
[ExcludeDirectories]
Test\TestDir
; Files (not directories) to be included as archives.
[ArchiveFiles]
test.file
; Custom components. ID's and filenames are normally hardcoded, but also overridable through UpdaterConfig.ini.
[AddOns]
COMPONENT_ID=customcomp.mix
================================================
FILE: ClientCore/CCIniFile.cs
================================================
using Rampastring.Tools;
using System.IO;
namespace ClientCore
{
public class CCIniFile : IniFile
{
public CCIniFile(string path) : base(path)
{
foreach (IniSection section in Sections)
{
string baseSectionName = section.GetStringValue("$BaseSection", null);
if (string.IsNullOrWhiteSpace(baseSectionName))
continue;
var baseSection = Sections.Find(s => s.SectionName == baseSectionName);
if (baseSection == null)
{
Logger.Log($"Base section not found in INI file {path}, section {section.SectionName}, base section name: {baseSectionName}");
continue;
}
int addedKeyCount = 0;
foreach (var kvp in baseSection.Keys)
{
if (!section.KeyExists(kvp.Key))
{
section.Keys.Insert(addedKeyCount, kvp);
addedKeyCount++;
}
}
}
}
protected override void ApplyBaseIni()
{
string basedOnSetting = GetStringValue("INISystem", "BasedOn", string.Empty);
if (string.IsNullOrEmpty(basedOnSetting))
return;
string[] basedOns = basedOnSetting.Split(',');
foreach (string basedOn in basedOns)
ApplyBasedOnIni(basedOn);
}
private void ApplyBasedOnIni(string basedOn)
{
if (string.IsNullOrEmpty(basedOn))
return;
FileInfo baseIniFile;
if (basedOn.Contains("$THEME_DIR$"))
baseIniFile = SafePath.GetFile(basedOn.Replace("$THEME_DIR$", ProgramConstants.GetResourcePath()));
else
baseIniFile = SafePath.GetFile(SafePath.GetFileDirectoryName(FileName), basedOn);
// Consolidate with the INI file that this INI file is based on
if (!baseIniFile.Exists)
Logger.Log(FileName + ": Base INI file not found! " + baseIniFile.FullName);
CCIniFile baseIni = new CCIniFile(baseIniFile.FullName);
ConsolidateIniFiles(baseIni, this);
Sections = baseIni.Sections;
}
}
}
================================================
FILE: ClientCore/ClientConfiguration.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using ClientCore.Enums;
using ClientCore.Extensions;
using ClientCore.I18N;
using Rampastring.Tools;
namespace ClientCore
{
public class ClientConfiguration
{
private const string GENERAL = "General";
private const string AUDIO = "Audio";
private const string SETTINGS = "Settings";
private const string LINKS = "Links";
private const string TRANSLATIONS = "Translations";
private const string USER_DEFAULTS = "UserDefaults";
public const string CLIENT_SETTINGS = "DTACnCNetClient.ini";
public const string GAME_OPTIONS = "GameOptions.ini";
public const string CLIENT_DEFS = "ClientDefinitions.ini";
public const string NETWORK_DEFS_LOCAL = "NetworkDefinitions.local.ini";
public const string NETWORK_DEFS = "NetworkDefinitions.ini";
private static ClientConfiguration _instance;
private IniFile gameOptions_ini;
private IniFile DTACnCNetClient_ini;
private IniFile clientDefinitionsIni;
private IniFile networkDefinitionsIni;
protected ClientConfiguration()
{
var baseResourceDirectory = SafePath.GetDirectory(ProgramConstants.GetBaseResourcePath());
if (!baseResourceDirectory.Exists)
throw new FileNotFoundException($"Couldn't find {CLIENT_DEFS} at {baseResourceDirectory} (directory doesn't exist). Please verify that you're running the client from the correct directory.");
FileInfo clientDefinitionsFile = SafePath.GetFile(baseResourceDirectory.FullName, CLIENT_DEFS);
if (!(clientDefinitionsFile?.Exists ?? false))
throw new FileNotFoundException($"Couldn't find {CLIENT_DEFS} at {baseResourceDirectory}. Please verify that you're running the client from the correct directory.");
clientDefinitionsIni = new IniFile(clientDefinitionsFile.FullName);
DTACnCNetClient_ini = new IniFile(SafePath.CombineFilePath(ProgramConstants.GetResourcePath(), CLIENT_SETTINGS));
gameOptions_ini = new IniFile(SafePath.CombineFilePath(baseResourceDirectory.FullName, GAME_OPTIONS));
string networkDefsPathLocal = SafePath.CombineFilePath(ProgramConstants.GetResourcePath(), NETWORK_DEFS_LOCAL);
if (File.Exists(networkDefsPathLocal))
{
networkDefinitionsIni = new IniFile(networkDefsPathLocal);
Logger.Log("Loaded network definitions from NetworkDefinitions.local.ini (user override)");
}
else
{
string networkDefsPath = SafePath.CombineFilePath(ProgramConstants.GetResourcePath(), NETWORK_DEFS);
networkDefinitionsIni = new IniFile(networkDefsPath);
}
RefreshTranslationGameFiles();
}
/// <summary>
/// Singleton Pattern. Returns the object of this class.
/// </summary>
/// <returns>The object of the ClientConfiguration class.</returns>
public static ClientConfiguration Instance
{
get
{
if (_instance == null)
{
_instance = new ClientConfiguration();
}
return _instance;
}
}
public void RefreshSettings()
{
DTACnCNetClient_ini = new IniFile(SafePath.CombineFilePath(ProgramConstants.GetResourcePath(), CLIENT_SETTINGS));
}
#region Client settings
private string _mainMenuMusicName = null;
public string MainMenuMusicName => _mainMenuMusicName ??= GetMainMenuMusicName();
private string GetMainMenuMusicName()
{
string raw = DTACnCNetClient_ini.GetStringValue(GENERAL, "MainMenuTheme", "mainmenu");
string[] parts = raw.SplitWithCleanup();
string chosen = parts.Length > 0
? parts[new Random().Next(parts.Length)]
: "mainmenu";
return SafePath.CombineFilePath(chosen);
}
public float DefaultAlphaRate => DTACnCNetClient_ini.GetSingleValue(GENERAL, "AlphaRate", 0.005f);
public float CheckBoxAlphaRate => DTACnCNetClient_ini.GetSingleValue(GENERAL, "CheckBoxAlphaRate", 0.05f);
public float IndicatorAlphaRate => DTACnCNetClient_ini.GetSingleValue(GENERAL, "IndicatorAlphaRate", 0.05f);
#region Color settings
public string UILabelColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "UILabelColor", "0,0,0");
public string UIHintTextColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "HintTextColor", "128,128,128");
public string DisabledButtonColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "DisabledButtonColor", "108,108,108");
public string AltUIColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "AltUIColor", "255,255,255");
public string ButtonHoverColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "ButtonHoverColor", "255,192,192");
public string MapPreviewNameBackgroundColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "MapPreviewNameBackgroundColor", "0,0,0,144");
public string MapPreviewNameBorderColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "MapPreviewNameBorderColor", "128,128,128,128");
public string MapPreviewStartingLocationHoverRemapColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "StartingLocationHoverColor", "255,255,255,128");
public bool MapPreviewStartingLocationUsePlayerRemapColor => DTACnCNetClient_ini.GetBooleanValue(GENERAL, "StartingLocationsUsePlayerRemapColor", false);
public string AltUIBackgroundColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "AltUIBackgroundColor", "196,196,196");
public string WindowBorderColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "WindowBorderColor", "128,128,128");
public string PanelBorderColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "PanelBorderColor", "255,255,255");
public string ListBoxHeaderColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "ListBoxHeaderColor", "255,255,255");
public string DefaultChatColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "DefaultChatColor", "0,255,0");
public string AdminNameColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "AdminNameColor", "255,0,0");
public string ReceivedPMColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "PrivateMessageOtherUserColor", "196,196,196");
public string SentPMColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "PrivateMessageColor", "128,128,128");
public int DefaultPersonalChatColorIndex => DTACnCNetClient_ini.GetIntValue(GENERAL, "DefaultPersonalChatColorIndex", 0);
public string ListBoxFocusColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "ListBoxFocusColor", "64,64,168");
public string HoverOnGameColor => DTACnCNetClient_ini.GetStringValue(GENERAL, "HoverOnGameColor", "32,32,84");
public IniSection GetParserConstants() => DTACnCNetClient_ini.GetSection("ParserConstants");
#endregion
#region Tool tip settings
public int ToolTipFontIndex => DTACnCNetClient_ini.GetIntValue(GENERAL, "ToolTipFontIndex", 0);
public int ToolTipOffsetX => DTACnCNetClient_ini.GetIntValue(GENERAL, "ToolTipOffsetX", 0);
public int ToolTipOffsetY => DTACnCNetClient_ini.GetIntValue(GENERAL, "ToolTipOffsetY", 0);
public int ToolTipMargin => DTACnCNetClient_ini.GetIntValue(GENERAL, "ToolTipMargin", 4);
public float ToolTipDelay => DTACnCNetClient_ini.GetSingleValue(GENERAL, "ToolTipDelay", 0.67f);
public float ToolTipAlphaRatePerSecond => DTACnCNetClient_ini.GetSingleValue(GENERAL, "ToolTipAlphaRate", 4.0f);
#endregion
#region Audio options
public float SoundGameLobbyJoinCooldown => DTACnCNetClient_ini.GetSingleValue(AUDIO, "SoundGameLobbyJoinCooldown", 0.25f);
public float SoundGameLobbyLeaveCooldown => DTACnCNetClient_ini.GetSingleValue(AUDIO, "SoundGameLobbyLeaveCooldown", 0.25f);
public float SoundMessageCooldown => DTACnCNetClient_ini.GetSingleValue(AUDIO, "SoundMessageCooldown", 0.25f);
public float SoundPrivateMessageCooldown => DTACnCNetClient_ini.GetSingleValue(AUDIO, "SoundPrivateMessageCooldown", 0.25f);
public float SoundGameLobbyGetReadyCooldown => DTACnCNetClient_ini.GetSingleValue(AUDIO, "SoundGameLobbyGetReadyCooldown", 5.0f);
public float SoundGameLobbyReturnCooldown => DTACnCNetClient_ini.GetSingleValue(AUDIO, "SoundGameLobbyReturnCooldown", 1.0f);
#endregion
#endregion
#region Game options
public string Sides => gameOptions_ini.GetStringValue(GENERAL, nameof(Sides), "GDI,Nod,Allies,Soviet");
public string InternalSideIndices => gameOptions_ini.GetStringValue(GENERAL, nameof(InternalSideIndices), string.Empty);
public string SpectatorInternalSideIndex => gameOptions_ini.GetStringValue(GENERAL, nameof(SpectatorInternalSideIndex), string.Empty);
#endregion
#region Client definitions
private string _ClientGameTypeString => clientDefinitionsIni.GetStringValue(SETTINGS, "ClientGameType", string.Empty);
private ClientType? _ClientGameType = null;
public ClientType ClientGameType => _ClientGameType ??= ClientTypeHelper.FromString(_ClientGameTypeString);
public string DiscordAppId => clientDefinitionsIni.GetStringValue(SETTINGS, "DiscordAppId", string.Empty);
public int SendSleep => clientDefinitionsIni.GetIntValue(SETTINGS, "SendSleep", 2500);
public int LoadingScreenCount => clientDefinitionsIni.GetIntValue(SETTINGS, "LoadingScreenCount", 2);
public int ThemeCount => clientDefinitionsIni.GetSectionKeys("Themes").Count;
public string LocalGame => clientDefinitionsIni.GetStringValue(SETTINGS, "LocalGame", "DTA");
public bool SidebarHack => clientDefinitionsIni.GetBooleanValue(SETTINGS, "SidebarHack", false);
public int MinimumRenderWidth => clientDefinitionsIni.GetIntValue(SETTINGS, "MinimumRenderWidth", 1280);
public int MinimumRenderHeight => clientDefinitionsIni.GetIntValue(SETTINGS, "MinimumRenderHeight", 768);
public int MaximumRenderWidth => clientDefinitionsIni.GetIntValue(SETTINGS, "MaximumRenderWidth", 1280);
public int MaximumRenderHeight => clientDefinitionsIni.GetIntValue(SETTINGS, "MaximumRenderHeight", 800);
public string[] RecommendedResolutions => clientDefinitionsIni.GetStringListValue(SETTINGS, "RecommendedResolutions",
$"{MinimumRenderWidth}x{MinimumRenderHeight},{MaximumRenderWidth}x{MaximumRenderHeight}");
public string WindowTitle => clientDefinitionsIni.GetStringValue(SETTINGS, "WindowTitle", string.Empty)
.L10N("INI:ClientDefinitions:WindowTitle");
public string InstallationPathRegKey => clientDefinitionsIni.GetStringValue(SETTINGS, "RegistryInstallPath", "TiberianSun");
public string CnCNetLiveStatusIdentifier => clientDefinitionsIni.GetStringValue(SETTINGS, "CnCNetLiveStatusIdentifier", "cncnet5_ts");
public string BattleFSFileName => clientDefinitionsIni.GetStringValue(SETTINGS, "BattleFSFileName", "BattleFS.ini");
public string MapEditorExePath => SafePath.CombineFilePath(clientDefinitionsIni.GetStringValue(SETTINGS, "MapEditorExePath", SafePath.CombineFilePath("FinalSun", "FinalSun.exe")));
public string UnixMapEditorExePath => clientDefinitionsIni.GetStringValue(SETTINGS, "UnixMapEditorExePath", Instance.MapEditorExePath);
public bool ModMode => clientDefinitionsIni.GetBooleanValue(SETTINGS, "ModMode", false);
public string LongGameName => clientDefinitionsIni.GetStringValue(SETTINGS, "LongGameName", "Tiberian Sun");
public string LongSupportURL => clientDefinitionsIni.GetStringValue(SETTINGS, "LongSupportURL", "https://www.moddb.com/members/rampastring");
public string ShortSupportURL => clientDefinitionsIni.GetStringValue(SETTINGS, "ShortSupportURL", "www.moddb.com/members/rampastring");
public string ChangelogURL => clientDefinitionsIni.GetStringValue(SETTINGS, "ChangelogURL", "https://www.moddb.com/mods/the-dawn-of-the-tiberium-age/tutorials/change-log");
public string CreditsURL => clientDefinitionsIni.GetStringValue(SETTINGS, "CreditsURL", "https://www.moddb.com/mods/the-dawn-of-the-tiberium-age/tutorials/credits#Rampastring");
public string ManualDownloadURL => clientDefinitionsIni.GetStringValue(SETTINGS, "ManualDownloadURL", string.Empty);
public string FinalSunIniPath => SafePath.CombineFilePath(clientDefinitionsIni.GetStringValue(SETTINGS, "FSIniPath", SafePath.CombineFilePath("FinalSun", "FinalSun.ini")));
public int MaxNameLength => clientDefinitionsIni.GetIntValue(SETTINGS, "MaxNameLength", 16);
public bool UseIsometricCells => clientDefinitionsIni.GetBooleanValue(SETTINGS, "UseIsometricCells", true);
public int WaypointCoefficient => clientDefinitionsIni.GetIntValue(SETTINGS, "WaypointCoefficient", 128);
public int MapCellSizeX => clientDefinitionsIni.GetIntValue(SETTINGS, "MapCellSizeX", 48);
public int MapCellSizeY => clientDefinitionsIni.GetIntValue(SETTINGS, "MapCellSizeY", 24);
public bool UseBuiltStatistic => clientDefinitionsIni.GetBooleanValue(SETTINGS, "UseBuiltStatistic", false);
public string WindowedModeKey => clientDefinitionsIni.GetStringValue(SETTINGS, "WindowedModeKey", "Video.Windowed");
public bool CopyResolutionDependentLanguageDLL => clientDefinitionsIni.GetBooleanValue(SETTINGS, "CopyResolutionDependentLanguageDLL", true);
public string StatisticsLogFileName => clientDefinitionsIni.GetStringValue(SETTINGS, "StatisticsLogFileName", "DTA.LOG");
public string[] TrustedDomains => clientDefinitionsIni.GetStringListValue(SETTINGS, "TrustedDomains", string.Empty);
public string[] AlwaysTrustedDomains = { "cncnet.org", "gamesurge.net", "dronebl.org", "discord.com", "discord.gg", "youtube.com", "youtu.be" };
public bool ShowGameIconInGameList => clientDefinitionsIni.GetBooleanValue(SETTINGS, "ShowGameIconInGameList", true);
public (string Name, string Path) GetThemeInfoFromIndex(int themeIndex) => clientDefinitionsIni.GetStringValue("Themes", themeIndex.ToString(), ",").Split(',').AsTuple2();
/// <summary>
/// Returns the directory path for a theme, or null if the specified
/// theme name doesn't exist.
/// </summary>
/// <param name="themeName">The name of the theme.</param>
/// <returns>The path to the theme's directory.</returns>
public string GetThemePath(string themeName)
{
var themeSection = clientDefinitionsIni.GetSection("Themes");
foreach (var key in themeSection.Keys)
{
var (name, path) = key.Value.Split(',');
if (name == themeName)
return path;
}
return null;
}
public string SettingsIniName => clientDefinitionsIni.GetStringValue(SETTINGS, "SettingsFile", "Settings.ini");
public string TranslationIniName => clientDefinitionsIni.GetStringValue(TRANSLATIONS, nameof(TranslationIniName), "Translation.ini");
public string TranslationsFolderPath => SafePath.CombineDirectoryPath(
clientDefinitionsIni.GetStringValue(TRANSLATIONS, "TranslationsFolder",
SafePath.CombineDirectoryPath("Resources", "Translations")));
private List<TranslationGameFile> _translationGameFiles;
public List<TranslationGameFile> TranslationGameFiles => _translationGameFiles;
/// <summary>
/// Force a refresh of the translation game files list.
/// </summary>
public void RefreshTranslationGameFiles()
{
_translationGameFiles = ParseTranslationGameFiles();
}
/// <summary>
/// Looks up the list of files to try and copy into the game folder with a translation.
/// </summary>
/// <returns>Source/destination relative path pairs.</returns>
/// <exception cref="IniParseException">Thrown when the syntax of the list is invalid.</exception>
private List<TranslationGameFile> ParseTranslationGameFiles()
{
List<TranslationGameFile> gameFiles = new();
if (!clientDefinitionsIni.SectionExists(TRANSLATIONS))
return gameFiles;
foreach (string key in clientDefinitionsIni.GetSectionKeys(TRANSLATIONS))
{
// the syntax is GameFileX=path/to/source.file,path/to/destination.file[,checked]
// where X can be any text or number
if (!key.StartsWith("GameFile"))
continue;
string value = clientDefinitionsIni.GetStringValue(TRANSLATIONS, key, string.Empty);
string[] parts = clientDefinitionsIni.GetStringListValue(TRANSLATIONS, key, string.Empty);
// fail explicitly if the syntax is wrong
if (parts.Length is < 2 or > 3
|| (parts.Length == 3 && parts[2].ToUpperInvariant() != "CHECKED"))
{
throw new IniParseException($"Invalid syntax for value of {key}! " +
$"Expected path/to/source.file,path/to/destination.file[,checked], read {value}.");
}
bool isChecked = parts.Length == 3 && parts[2].ToUpperInvariant() == "CHECKED";
gameFiles.Add(new(Source: parts[0].Trim(), Target: parts[1].Trim(), isChecked));
}
return gameFiles;
}
public string ExtraExeCommandLineParameters => clientDefinitionsIni.GetStringValue(SETTINGS, "ExtraCommandLineParams", string.Empty);
public string MPMapsIniPath => SafePath.CombineFilePath(clientDefinitionsIni.GetStringValue(SETTINGS, "MPMapsPath", SafePath.CombineFilePath("INI", "MPMaps.ini")));
public string KeyboardINI => clientDefinitionsIni.GetStringValue(SETTINGS, "KeyboardINI", "Keyboard.ini");
public bool SettingsIniAsKeyboardIni => SettingsIniName == KeyboardINI;
public string KeyboardHotkeySection => clientDefinitionsIni.GetStringValue(
SETTINGS,
"KeyboardHotkeySection",
ClientGameType == ClientType.RA ? "WinHotKeys" : "Hotkey");
public int MinimumIngameWidth => clientDefinitionsIni.GetIntValue(SETTINGS, "MinimumIngameWidth", 640);
public int MinimumIngameHeight => clientDefinitionsIni.GetIntValue(SETTINGS, "MinimumIngameHeight", 480);
public int MaximumIngameWidth => clientDefinitionsIni.GetIntValue(SETTINGS, "MaximumIngameWidth", int.MaxValue);
public int MaximumIngameHeight => clientDefinitionsIni.GetIntValue(SETTINGS, "MaximumIngameHeight", int.MaxValue);
public bool CopyMissionsToSpawnmapINI => clientDefinitionsIni.GetBooleanValue(SETTINGS, "CopyMissionsToSpawnmapINI", true);
public string AllowedCustomGameModes => clientDefinitionsIni.GetStringValue(SETTINGS, "AllowedCustomGameModes", "Standard,Custom Map");
public int InactiveHostWarningMessageSeconds => clientDefinitionsIni.GetIntValue(SETTINGS, "InactiveHostWarningMessageSeconds", 0);
public int InactiveHostKickSeconds => clientDefinitionsIni.GetIntValue(SETTINGS, "InactiveHostKickSeconds", 0) + InactiveHostWarningMessageSeconds;
public bool InactiveHostKickEnabled => InactiveHostWarningMessageSeconds > 0 && InactiveHostKickSeconds > 0;
public string SkillLevelOptions => clientDefinitionsIni.GetStringValue(SETTINGS, "SkillLevelOptions", "Any,Beginner,Intermediate,Pro");
public int DefaultSkillLevelIndex => clientDefinitionsIni.GetIntValue(SETTINGS, "DefaultSkillLevelIndex", 0);
public bool CampaignTagSelectorEnabled => clientDefinitionsIni.GetBooleanValue(SETTINGS, "CampaignTagSelectorEnabled", false);
public bool ReturnToMainMenuOnMissionLaunch => clientDefinitionsIni.GetBooleanValue(SETTINGS, "ReturnToMainMenuOnMissionLaunch", true);
public string GetGameExecutableName()
{
string[] exeNames = clientDefinitionsIni.GetStringListValue(SETTINGS, "GameExecutableNames", "Game.exe");
return exeNames[0];
}
public string GameLauncherExecutableName => clientDefinitionsIni.GetStringValue(SETTINGS, "GameLauncherExecutableName", string.Empty);
public string[] GetCompatibilityCheckExecutables()
{
string[] exeNames = clientDefinitionsIni.GetStringListValue(SETTINGS, "CompatibilityCheckExecutables", string.Empty);
return exeNames;
}
public bool SaveSkirmishGameOptions => clientDefinitionsIni.GetBooleanValue(SETTINGS, "SaveSkirmishGameOptions", false);
public bool SaveCampaignGameOptions => clientDefinitionsIni.GetBooleanValue(SETTINGS, "SaveCampaignGameOptions", false);
public bool CreateSavedGamesDirectory => clientDefinitionsIni.GetBooleanValue(SETTINGS, "CreateSavedGamesDirectory", false);
public bool DisableMultiplayerGameLoading => clientDefinitionsIni.GetBooleanValue(SETTINGS, "DisableMultiplayerGameLoading", false);
public bool DisplayPlayerCountInTopBar => clientDefinitionsIni.GetBooleanValue(SETTINGS, "DisplayPlayerCountInTopBar", false);
/// <summary>
/// The name of the executable in the main game directory that selects
/// the correct main client executable.
/// For example, DTA.exe in case of DTA.
/// </summary>
public string LauncherExe => clientDefinitionsIni.GetStringValue(SETTINGS, "LauncherExe", string.Empty);
public bool UseClientRandomStartLocations => clientDefinitionsIni.GetBooleanValue(SETTINGS, "UseClientRandomStartLocations", false);
/// <summary>
/// Returns the name of the game executable file that is used on
/// Linux and macOS.
/// </summary>
public string UnixGameExecutableName => clientDefinitionsIni.GetStringValue(SETTINGS, "UnixGameExecutableName", "wine-dta.sh");
/// <summary>
/// List of files that are not distributed but required to play.
/// </summary>
public string[] RequiredFiles => clientDefinitionsIni.GetStringListValue(SETTINGS, "RequiredFiles", String.Empty);
/// <summary>
/// List of files that can interfere with the mod functioning.
/// </summary>
public string[] ForbiddenFiles => clientDefinitionsIni.GetStringListValue(SETTINGS, "ForbiddenFiles", String.Empty);
/// <summary>
/// The main map file extension that is read by the client.
/// </summary>
public string MapFileExtension => clientDefinitionsIni.GetStringValue(SETTINGS, "MapFileExtension", "map");
/// <summary>
/// This tells the client which supplemental map files are ok to copy over during "spawnmap.ini" file creation.
/// IE, if "BIN" is listed, then the client will look for and copy the file "map_a.bin"
/// when writing the spawnmap.ini file for map file "map_a.ini".
///
/// This configuration should be in the form "SupplementalMapFileExtensions=bin,mix"
/// </summary>
public IEnumerable<string> SupplementalMapFileExtensions
=> clientDefinitionsIni.GetStringValue(SETTINGS, "SupplementalMapFileExtensions", null)?
.Split(',', StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
/// <summary>
/// This prevents users from joining games that are incompatible/on a different game version than the current user.
/// Default: false
/// </summary>
public bool DisallowJoiningIncompatibleGames => clientDefinitionsIni.GetBooleanValue(SETTINGS, nameof(DisallowJoiningIncompatibleGames), false);
/// <summary>
/// Activates warnings for development builds of XNA Client
/// </summary>
public bool ShowDevelopmentBuildWarnings => clientDefinitionsIni.GetBooleanValue(SETTINGS, nameof(ShowDevelopmentBuildWarnings), true);
#endregion
#region Network definitions
public string CnCNetTunnelListURL => networkDefinitionsIni.GetStringValue(SETTINGS, "CnCNetTunnelListURL", "https://cncnet.org/master-list");
public string CnCNetPlayerCountURL => networkDefinitionsIni.GetStringValue(SETTINGS, "CnCNetPlayerCountURL", "https://api.cncnet.org/status");
public string CnCNetMapDBDownloadURL => networkDefinitionsIni.GetStringValue(SETTINGS, "CnCNetMapDBDownloadURL", "https://mapdb.cncnet.org");
public string CnCNetMapDBUploadURL => networkDefinitionsIni.GetStringValue(SETTINGS, "CnCNetMapDBUploadURL", "https://mapdb.cncnet.org/upload");
public bool DisableDiscordIntegration => networkDefinitionsIni.GetBooleanValue(SETTINGS, "DisableDiscordIntegration", false);
public List<string> IRCServers => GetIRCServers();
#endregion
#region User default settings
public bool UserDefault_BorderlessWindowedClient => clientDefinitionsIni.GetBooleanValue(USER_DEFAULTS, "BorderlessWindowedClient", true);
public bool UserDefault_IntegerScaledClient => clientDefinitionsIni.GetBooleanValue(USER_DEFAULTS, "IntegerScaledClient", false);
public bool UserDefault_WriteInstallationPathToRegistry => clientDefinitionsIni.GetBooleanValue(USER_DEFAULTS, "WriteInstallationPathToRegistry", true);
#endregion
#region Game networking defaults
/// <summary>
/// Default value for FrameSendRate setting written in spawn.ini.
/// </summary>
public int DefaultFrameSendRate => clientDefinitionsIni.GetIntValue(SETTINGS, nameof(DefaultFrameSendRate), 7);
/// <summary>
/// Default value for Protocol setting written in spawn.ini.
/// </summary>
public int DefaultProtocolVersion => clientDefinitionsIni.GetIntValue(SETTINGS, nameof(DefaultProtocolVersion), 2);
/// <summary>
/// Default value for MaxAhead setting written in spawn.ini.
/// </summary>
public int DefaultMaxAhead => clientDefinitionsIni.GetIntValue(SETTINGS, nameof(DefaultMaxAhead), 0);
#endregion
public List<string> GetIRCServers()
{
List<string> servers = [];
IniSection serversSection = networkDefinitionsIni.GetSection("IRCServers");
if (serversSection != null)
foreach ((_, string value) in serversSection.Keys)
if (!string.IsNullOrWhiteSpace(value))
servers.Add(value);
return servers;
}
public bool DiscordIntegrationGloballyDisabled => string.IsNullOrWhiteSpace(DiscordAppId) || DisableDiscordIntegration;
public string CustomMissionPath => clientDefinitionsIni.GetStringValue(SETTINGS, "CustomMissionPath", "Maps/CustomMissions");
public List<(string extension, string copyAs)> GetCustomMissionSupplementFiles()
{
List<(string extension, string copyAs)> files = new();
Dictionary<string, int> extensionToIndex = new(StringComparer.OrdinalIgnoreCase);
int index = 0;
while (true)
{
string extensionKey = $"CustomMissionSupplementFile{index}Extension";
string copyAsKey = $"CustomMissionSupplementFile{index}CopyAs";
string extension = clientDefinitionsIni.GetStringValue(SETTINGS, extensionKey, null)?.Trim();
// Stop iteration if the extension key is missing
if (string.IsNullOrWhiteSpace(extension))
break;
string copyAs = clientDefinitionsIni.GetStringValue(SETTINGS, copyAsKey, null);
// Validate that copyAs is not empty
if (string.IsNullOrWhiteSpace(copyAs))
throw new ClientConfigurationException($"Configuration key '{copyAsKey}' is required when '{extensionKey}' is present for supplement file {index}.");
// Validate that extension is unique
if (extensionToIndex.TryGetValue(extension, out int firstIndex))
throw new ClientConfigurationException($"Duplicate extension '{extension}' found in supplement files. Extension is used in both file {firstIndex} and file {index}.");
extensionToIndex.Add(extension, index);
files.Add((extension, copyAs));
index++;
}
return files;
}
public OSVersion GetOperatingSystemVersion()
{
#if NETFRAMEWORK
// OperatingSystem.IsWindowsVersionAtLeast() is the preferred API but is not supported on earlier .NET versions
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
Version osVersion = Environment.OSVersion.Version;
if (osVersion.Major <= 4)
return OSVersion.UNKNOWN;
if (osVersion.Major == 5)
return OSVersion.WINXP;
if (osVersion.Major == 6 && osVersion.Minor == 0)
return OSVersion.WINVISTA;
if (osVersion.Major == 6 && osVersion.Minor <= 1)
return OSVersion.WIN7;
return OSVersion.WIN810;
}
if (ProgramConstants.ISMONO)
return OSVersion.UNIX;
// http://mono.wikia.com/wiki/Detecting_the_execution_platform
int p = (int)Environment.OSVersion.Platform;
if (p == 4 || p == 6 || p == 128)
return OSVersion.UNIX;
return OSVersion.UNKNOWN;
#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
if (OperatingSystem.IsWindowsVersionAtLeast(6, 2))
return OSVersion.WIN810;
else if (OperatingSystem.IsWindowsVersionAtLeast(6, 1))
return OSVersion.WIN7;
else if (OperatingSystem.IsWindowsVersionAtLeast(6, 0))
return OSVersion.WINVISTA;
else if (OperatingSystem.IsWindowsVersionAtLeast(5, 0))
return OSVersion.WINXP;
else
return OSVersion.UNKNOWN;
}
return OSVersion.UNIX;
#endif
}
}
/// <summary>
/// An exception that is thrown when a client configuration file contains invalid or
/// unexpected settings / data or required settings / data are missing.
/// </summary>
public class ClientConfigurationException : Exception
{
public ClientConfigurationException(string message) : base(message)
{
}
}
}
================================================
FILE: ClientCore/ClientCore.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>CnCNet Client Core Library</Description>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Encoding.CodePages" />
<PackageReference Include="Ude.NetStandard" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Rampastring.XNAUI\Rampastring.Tools\Rampastring.Tools.csproj" />
</ItemGroup>
</Project>
================================================
FILE: ClientCore/Enums/AllowPrivateMessagesFromEnum.cs
================================================
namespace ClientCore.Enums
{
public enum AllowPrivateMessagesFromEnum
{
All = 1,
CurrentChannel = 4,
Friends = 2,
None = 3,
}
}
================================================
FILE: ClientCore/Enums/ClientType.cs
================================================
namespace ClientCore.Enums
{
public enum ClientType
{
TS,
YR,
Ares,
RA,
}
}
================================================
FILE: ClientCore/Enums/ClientTypeHelper.cs
================================================
using System;
using System.Linq;
using ClientCore.Extensions;
namespace ClientCore.Enums
{
public static class ClientTypeHelper
{
public static ClientType FromString(string value) => value switch
{
"TS" => ClientType.TS,
"YR" => ClientType.YR,
"Ares" => ClientType.Ares,
"RA" => ClientType.RA,
_ => throw new Exception(string.Format((
"It seems the client configuration was not migrated to accommodate for the v2.12 changes. " +
"Please specify 'ClientGameType' in '[Settings]' section of the 'ClientDefinitions.ini' file " +
"(allowed options: {0}).\n\n" +
"Please refer to documentation of the client {1} for more details. This link can also be found in the log file.").L10N("Client:Main:ClientGameTypeNotFoundException"),
EnumExtensions.GetNames<ClientType>(),
"https://github.com/CnCNet/xna-cncnet-client/")),
};
}
}
================================================
FILE: ClientCore/Enums/SortDirection.cs
================================================
namespace ClientCore.Enums
{
public enum SortDirection
{
None = 0,
Asc = 1,
Desc = 2
}
}
================================================
FILE: ClientCore/Extensions/ArrayExtensions.cs
================================================
using System;
namespace ClientCore.Extensions;
// https://stackoverflow.com/a/65894979/20766970
public static class ArrayExtensions
{
public static void Deconstruct<T>(this T[] @this, out T a0)
{
if (@this == null || @this.Length < 1)
throw new ArgumentException(null, nameof(@this));
a0 = @this[0];
}
public static (T, T) AsTuple2<T>(this T[] @this)
{
if (@this == null || @this.Length < 2)
throw new ArgumentException(null, nameof(@this));
return (@this[0], @this[1]);
}
public static void Deconstruct<T>(this T[] @this, out T a0, out T a1)
=> (a0, a1) = @this.AsTuple2();
public static (T, T, T) AsTuple3<T>(this T[] @this)
{
if (@this == null || @this.Length < 3)
throw new ArgumentException(null, nameof(@this));
return (@this[0], @this[1], @this[2]);
}
public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, out T a2)
=> (a0, a1, a2) = @this.AsTuple3();
public static (T, T, T, T) AsTuple4<T>(this T[] @this)
{
if (@this == null || @this.Length < 4)
throw new ArgumentException(null, nameof(@this));
return (@this[0], @this[1], @this[2], @this[3]);
}
public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, out T a2, out T a3)
=> (a0, a1, a2, a3) = @this.AsTuple4();
public static (T, T, T, T, T) AsTuple5<T>(this T[] @this)
{
if (@this == null || @this.Length < 5)
throw new ArgumentException(null, nameof(@this));
return (@this[0], @this[1], @this[2], @this[3], @this[4]);
}
public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, out T a2, out T a3, out T a4)
=> (a0, a1, a2, a3, a4) = @this.AsTuple5();
public static (T, T, T, T, T, T) AsTuple6<T>(this T[] @this)
{
if (@this == null || @this.Length < 6)
throw new ArgumentException(null, nameof(@this));
return (@this[0], @this[1], @this[2], @this[3], @this[4], @this[5]);
}
public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, out T a2, out T a3, out T a4, out T a5)
=> (a0, a1, a2, a3, a4, a5) = @this.AsTuple6();
public static (T, T, T, T, T, T, T) AsTuple7<T>(this T[] @this)
{
if (@this == null || @this.Length < 7)
throw new ArgumentException(null, nameof(@this));
return (@this[0], @this[1], @this[2], @this[3], @this[4], @this[5], @this[6]);
}
public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, out T a2, out T a3, out T a4, out T a5, out T a6)
=> (a0, a1, a2, a3, a4, a5, a6) = @this.AsTuple7();
public static (T, T, T, T, T, T, T, T) AsTuple8<T>(this T[] @this)
{
if (@this == null || @this.Length < 8)
throw new ArgumentException(null, nameof(@this));
return (@this[0], @this[1], @this[2], @this[3], @this[4], @this[5], @this[6], @this[7]);
}
public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, out T a2, out T a3, out T a4, out T a5, out T a6, out T a7)
=> (a0, a1, a2, a3, a4, a5, a6, a7) = @this.AsTuple8();
}
================================================
FILE: ClientCore/Extensions/EnumExtensions.cs
================================================
using System;
using System.Linq;
using System.Text;
namespace ClientCore.Extensions
{
public static class EnumExtensions
{
public static T CycleNext<T>(this T src) where T : Enum
{
T[] values = EnumExtensions.GetValues<T>();
return values[(Array.IndexOf(values, src) + 1) % values.Length];
}
public static T First<T>() where T : Enum
=> EnumExtensions.GetValues<T>()[0];
public static string GetNames<T>() where T : Enum
=> string.Join(", ", EnumExtensions.GetValues<T>().Select(e => e.ToString()));
private static T[] GetValues<T>() where T : Enum
=> (T[])Enum.GetValues(typeof(T));
}
}
================================================
FILE: ClientCore/Extensions/EnumerableExtensions.cs
================================================
using System.Collections.Generic;
using System.Linq;
namespace ClientCore.Extensions;
public static class EnumerableExtensions
{
/// <summary>
/// Converts an enumerable to a matrix of items with a max number of items per column.
/// The matrix is built column by column, left to right.
/// </summary>
/// <param name="enumerable">the enumerable to convert</param>
/// <param name="maxPerColumn">the max number of items per column</param>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
public static List<List<T>> ToMatrix<T>(this IEnumerable<T> enumerable, int maxPerColumn)
{
var list = enumerable.ToList();
return list.Aggregate(new List<List<T>>(), (matrix, item) =>
{
int index = list.IndexOf(item);
int column = (index / maxPerColumn);
List<T> columnList = matrix.Count <= column ? new List<T>() : matrix[column];
if (columnList.Count == 0)
matrix.Add(columnList);
columnList.Add(item);
return matrix;
});
}
}
================================================
FILE: ClientCore/Extensions/FileExtensions.cs
================================================
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text;
using Rampastring.Tools;
using ClientCore.PlatformShim;
namespace ClientCore.Extensions;
public class FileExtensions
{
/// <summary>
/// Establishes a hard link between an existing file and a new file. This function is only supported on the NTFS file system, and only for files, not directories.
/// <br/>
/// https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createhardlinkw
/// </summary>
/// <param name="lpFileName">The name of the new file.</param>
/// <param name="lpExistingFileName">The name of the existing file.</param>
/// <param name="lpSecurityAttributes">Reserved; must be NULL.</param>
/// <returns>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero (0).</returns>
[DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = "CreateHardLinkW")]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
[SupportedOSPlatform("windows")]
private static extern bool CreateHardLink(string lpFileName, string lpExistingFileName, IntPtr lpSecurityAttributes);
/// <summary>
/// The link function makes a new link to the existing file named by oldname, under the new name newname.
/// <br/>
/// https://www.gnu.org/software/libc/manual/html_node/Hard-Links.html
/// <param name="oldname"></param>
/// <param name="newname"></param>
/// <returns>This function returns a value of 0 if it is successful and -1 on failure.</returns>
[DllImport("libc", EntryPoint = "link", SetLastError = true)]
[SupportedOSPlatform("linux")]
[SupportedOSPlatform("osx")]
private static extern int link([MarshalAs(UnmanagedType.LPUTF8Str)] string oldname, [MarshalAs(UnmanagedType.LPUTF8Str)] string newname);
/// <summary>
/// Creates hard link to the source file or copy that file, if got an error.
/// </summary>
/// <param name="source"></param>
/// <param name="destination"></param>
/// <param name="fallback"></param>
/// <exception cref="IOException"></exception>
/// <exception cref="PlatformNotSupportedException"></exception>
public static void CreateHardLinkFromSource(string source, string destination, bool fallback = true)
{
if (fallback)
{
try
{
CreateHardLinkFromSource(source, destination, fallback: false);
}
catch (Exception ex)
{
Logger.Log($"Failed to create hard link at {destination}. Fallback to copy. {ex.Message}");
File.Copy(source, destination, true);
}
return;
}
if (File.Exists(destination))
{
FileInfo destinationFile = new(destination);
destinationFile.IsReadOnly = false;
destinationFile.Delete();
}
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
if (!CreateHardLink(destination, source, IntPtr.Zero))
Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error());
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
if (link(source, destination) != 0)
throw new IOException(string.Format("Unable to create hard link at {0} with the following error code: {1}"
.L10N("Client:DTAConfig:CreateHardLinkFailed"), destination, Marshal.GetLastWin32Error()));
}
else
{
throw new PlatformNotSupportedException();
}
}
/// <summary>
/// Predicts text file encoding by its content.
/// </summary>
/// <param name="filename"></param>
/// <param name="minimalConfidence"></param>
/// <returns></returns>
public static Encoding GetDetectedEncoding(string filename, float minimalConfidence = 0.5f)
{
Encoding encoding = EncodingExt.UTF8NoBOM;
using (FileStream fs = File.OpenRead(filename))
{
Ude.CharsetDetector cdet = new Ude.CharsetDetector();
cdet.Feed(fs);
cdet.DataEnd();
if (cdet.Charset != null && cdet.Confidence > minimalConfidence)
{
Encoding detectedEncoding = Encoding.GetEncoding(cdet.Charset);
if (detectedEncoding is not UTF8Encoding and not ASCIIEncoding)
encoding = detectedEncoding;
}
}
return encoding;
}
}
================================================
FILE: ClientCore/Extensions/IniFileExtensions.cs
================================================
#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using Rampastring.Tools;
namespace ClientCore.Extensions
{
public static class IniFileExtensions
{
extension(IniFile iniFile)
{
// Clone() method is not officially available now. https://github.com/Rampastring/Rampastring.Tools/issues/12
public IniFile Clone()
{
var newIni = new IniFile();
foreach (string sectionName in iniFile.GetSections())
{
IniSection oldSection = iniFile.GetSection(sectionName);
newIni.AddSection(oldSection.Clone());
}
return newIni;
}
public IniSection GetOrAddSection(string sectionName)
{
var section = iniFile.GetSection(sectionName);
if (section != null)
return section;
section = new IniSection(sectionName);
iniFile.AddSection(section);
return section;
}
public string[] GetStringListValue(string section, string key, string defaultValue, char[]? separators = null)
=> (iniFile.GetSection(section)?.GetStringValue(key, defaultValue) ?? defaultValue)
.SplitWithCleanup(separators);
}
extension(IniSection iniSection)
{
public IniSection Clone()
{
IniSection newSection = new(iniSection.SectionName);
foreach ((var key, var value) in iniSection.Keys)
{
newSection.AddKey(key, value);
}
return newSection;
}
public void RemoveAllKeys()
{
var keys = new List<KeyValuePair<string, string>>(iniSection.Keys);
foreach (KeyValuePair<string, string> iniSectionKey in keys)
iniSection.RemoveKey(iniSectionKey.Key);
}
public string? GetStringValueOrNull(string key) =>
iniSection.KeyExists(key) ? iniSection.GetStringValue(key, string.Empty) : null;
public int? GetIntValueOrNull(string key) =>
iniSection.KeyExists(key) ? iniSection.GetIntValue(key, 0) : null;
public bool? GetBooleanValueOrNull(string key) =>
iniSection.KeyExists(key) ? iniSection.GetBooleanValue(key, false) : null;
public List<T>? GetListValueOrNull<T>(string key, char separator, Func<string, T> converter) =>
iniSection.KeyExists(key) ? iniSection.GetListValue<T>(key, separator, converter) : null;
}
}
}
================================================
FILE: ClientCore/Extensions/StringExtensions.cs
================================================
using System;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Linq;
using ClientCore.I18N;
namespace ClientCore.Extensions;
public static class StringExtensions
{
private static Regex extractLinksRE = new Regex(@"((http[s]?)|(ftp))\S+");
public static string[] GetLinks(this string text)
{
if (string.IsNullOrWhiteSpace(text))
return null;
var matches = extractLinksRE.Matches(text);
if (matches.Count == 0)
return null; // No link found
string[] links = new string[matches.Count];
for (int i = 0; i < links.Length; i++)
links[i] = matches[i].Value.Trim();
return links;
}
private const string ESCAPED_INI_NEWLINE_PATTERN = $"\\{ProgramConstants.INI_NEWLINE_PATTERN}";
private const string ESCAPED_SEMICOLON = "\\semicolon";
/// <summary>
/// Converts a regular string to an INI representation of it.
/// </summary>
/// <param name="raw">Input string.</param>
/// <returns>INI-safe string.</returns>
public static string ToIniString(this string raw)
{
if (raw.Contains(ESCAPED_INI_NEWLINE_PATTERN, StringComparison.InvariantCulture))
throw new ArgumentException($"The string contains an illegal character sequence! ({ESCAPED_INI_NEWLINE_PATTERN})");
if (raw.Contains(ESCAPED_SEMICOLON, StringComparison.InvariantCulture))
throw new ArgumentException($"The string contains an illegal character sequence! ({ESCAPED_SEMICOLON})");
return raw
.Replace(ProgramConstants.INI_NEWLINE_PATTERN, ESCAPED_INI_NEWLINE_PATTERN)
.Replace(";", ESCAPED_SEMICOLON)
.Replace(Environment.NewLine, "\n")
.Replace("\n", ProgramConstants.INI_NEWLINE_PATTERN);
}
/// <summary>
/// Converts an INI-safe string to a normal string.
/// </summary>
/// <param name="iniString">Input INI string.</param>
/// <returns>Regular string.</returns>
public static string FromIniString(this string iniString)
{
return iniString
.Replace(ESCAPED_INI_NEWLINE_PATTERN, ProgramConstants.INI_NEWLINE_PATTERN)
.Replace(ESCAPED_SEMICOLON, ";")
.Replace(ProgramConstants.INI_NEWLINE_PATTERN, Environment.NewLine);
}
/// <summary>
/// Looks up a translated string for the specified key.
/// </summary>
/// <param name="defaultValue">The default string value as a fallback.</param>
/// <param name="key">The unique key name.</param>
/// <param name="notify">Whether to add this key and value to the list of missing key-values.</param>
/// <returns>The translated string value.</returns>
/// <remarks>
/// This method is referenced by <c>TranslationNotifierGenerator</c> in order to check if the const
/// values that are not initialized on client start automatically are missing (via notification
/// mechanism implemented down the call chain). Do not change the signature or move the method out
/// of the namespace it's currently defined in. If you do - you have to also edit the generator
/// source code to match.
/// </remarks>
public static string L10N(this string defaultValue, string key, bool notify = true)
=> string.IsNullOrEmpty(defaultValue)
? defaultValue
: Translation.Instance.LookUp(key, defaultValue, notify);
/// <summary>
/// Replace special characters with spaces in the filename to avoid conflicts with WIN32API.
/// </summary>
/// <param name="defaultValue">The default string value.</param>
/// <returns>File name without special characters or reserved combinations.</returns>
/// <remarks>
/// Reference: <a href="https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file">Naming Files, Paths, and Namespaces</a>.
/// </remarks>
public static string ToWin32FileName(this string filename)
{
foreach (char ch in "/\\:*?<>|")
filename = filename.Replace(ch, '_');
// If the user is somehow using "con" or any other filename that is
// reserved by WIN32API, it would be better to rename it.
HashSet<string> reservedFileNames = new HashSet<string>(new List<string>(){
"CON",
"PRN",
"AUX",
"NUL",
"COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "COM¹", "COM²", "COM³",
"LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9", "LPT¹", "LPT²", "LPT³"
}, StringComparer.InvariantCultureIgnoreCase);
if (reservedFileNames.Contains(filename))
filename += "_";
return filename;
}
public static T ToEnum<T>(this string value) where T : Enum
=> (T)Enum.Parse(typeof(T), value, true);
public static string[] SplitWithCleanup(this string value, char[] separators = null)
=> value
.Split(separators ?? [','])
.Select(s => s.Trim())
.Where(s => !string.IsNullOrEmpty(s))
.ToArray();
}
================================================
FILE: ClientCore/I18N/Translation.cs
================================================
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using ClientCore.Extensions;
using ClientCore.PlatformShim;
using Rampastring.Tools;
namespace ClientCore.I18N;
public class Translation : ICloneable
{
public static Translation Instance { get; set; } = new Translation(ProgramConstants.HARDCODED_LOCALE_CODE);
/// <summary>The translation metadata section name.</summary>
public const string METADATA_SECTION = "General";
private static CultureInfo _initialUICulture;
/// <summary>The UI culture that the application was started with. Must be initialized as early as possible.</summary>
public static CultureInfo InitialUICulture
{
get => _initialUICulture;
set => _initialUICulture = _initialUICulture is null ? value
: throw new InvalidOperationException($"{nameof(InitialUICulture)} is already set!");
}
/// <summary>AKA name of the folder, used to look up <see cref="Culture"/> and select a language</summary>
public string LocaleCode { get; private set; } = string.Empty;
/// <summary>The explicitly set UI name for the translation.</summary>
private string _name = string.Empty;
/// <summary>The UI name for the translation.</summary>
public string Name
{
get => string.IsNullOrWhiteSpace(_name) ? GetLanguageName(LocaleCode) : _name;
private set => _name = value;
}
/// <summary>The explicitly set UI culture for the translation.</summary>
/// <remarks>Not accounted when selecting the translation automatically.</remarks>
private CultureInfo _culture;
/// <summary>The UI culture for the translation.</summary>
public CultureInfo Culture
{
get => _culture is null ? new CultureInfo(LocaleCode) : _culture;
private set => _culture = value;
}
/// <summary>The author(s) of the translation.</summary>
public string Author { get; private set; } = string.Empty;
/// <summary>Override the default encoding used for reading/writing map files. Null ("Auto") means detecting the encoding from each file (sometimes unreliable). </summary>
public Encoding MapEncoding = EncodingExt.UTF8NoBOM;
/// <summary>Stores the translation values (including default values for missing strings).</summary>
private Dictionary<string, string> Values { get; } = new();
// public bool IsRightToLeft { get; set; } // TODO
/// <summary>Contains all keys within <see cref="Values"/> with missing translations.</summary>
private readonly HashSet<string> MissingKeys = new();
/// <summary>Used to write missing translation table entries to a file.</summary>
public const string MISSING_KEY_PREFIX = "; "; // a hack but hey it works
/// <summary>
/// Initializes a new instance of the <see cref="Translation"/> class.
/// </summary>
/// <param name="localeCode">A locale code for this translation.</param>
public Translation(string localeCode)
{
LocaleCode = localeCode;
}
/// <summary>
/// Initializes a new instance of the <see cref="Translation"/> class
/// that loads the translation from an INI file.
/// </summary>
/// <param name="ini">An INI file to read from.</param>
/// <param name="localeCode">A locale code for this translation.</param>
public Translation(IniFile ini, string localeCode)
: this(localeCode)
{
if (ini is null)
throw new ArgumentNullException(nameof(ini));
IniSection metadataSection = ini.GetSection(METADATA_SECTION);
Name = metadataSection?.GetStringValue(nameof(Name), string.Empty);
Author = metadataSection?.GetStringValue(nameof(Author), string.Empty);
MapEncoding = EncodingExt.GetEncodingWithAuto(metadataSection?.GetStringValue(nameof(MapEncoding), null));
string cultureName = metadataSection?.GetStringValue(nameof(Culture), null);
if (cultureName is not null)
Culture = new(cultureName);
AppendValuesFromIniFile(ini);
}
/// <summary>
/// Initializes a new instance of the <see cref="Translation"/> class
/// that loads the translation from an INI file.
/// </summary>
/// <param name="iniPath">A path to an INI file to read from.</param>
/// <param name="localeCode">A locale code for this translation.</param>
public Translation(string iniPath, string localeCode)
: this(new CCIniFile(iniPath), localeCode) { }
/// <summary>
/// Initializes a new instance of the <see cref="Translation"/> class
/// that is a copy of the given instance.
/// </summary>
/// <param name="other">An object to copy from.</param>
public Translation(Translation other)
{
LocaleCode = other.LocaleCode;
_name = other._name;
_culture = other._culture;
Author = other.Author;
MapEncoding = other.MapEncoding;
foreach (var (key, value) in other.Values)
Values.Add(key, value);
}
public Translation Clone() => new Translation(this);
object ICloneable.Clone() => Clone();
/// <summary>
/// Reads <see cref="Values"/> from an INI file, overriding possibly existing ones.
/// </summary>
/// <param name="iniPath">A path to an INI file to read from.</param>
public void AppendValuesFromIniFile(string iniPath)
=> AppendValuesFromIniFile(new CCIniFile(iniPath));
/// <summary>
/// Reads <see cref="Values"/> from an INI file, overriding possibly existing ones.
/// </summary>
/// <param name="ini">An INI file to read from.</param>
public void AppendValuesFromIniFile(IniFile ini)
{
IniSection valuesSection = ini.GetSection(nameof(Values));
foreach (var (key, value) in valuesSection.Keys)
Values[key] = value.FromIniString();
}
/// <param name="localeCode">The locale code to look up the language name for.</param>
/// <returns>The language name for the given locale code.</returns>
public static string GetLanguageName(string localeCode)
{
string result = null;
string iniPath = SafePath.CombineFilePath(
ClientConfiguration.Instance.TranslationsFolderPath, localeCode, ClientConfiguration.Instance.TranslationIniName);
if (SafePath.GetFile(iniPath).Exists)
{
// This parses only the metadata section content so that we don't parse
// the bazillion of localized values just to read the translation name.
// The only issue is that inheritance would break.
// FIXME AllowNewSections is ignored with inheritance
IniFile ini = new();
ini.AddSection(METADATA_SECTION);
ini.FileName = iniPath;
ini.AllowNewSections = false;
ini.Parse();
// Overridden name first
IniSection metadataSection = ini.GetSection(METADATA_SECTION);
result = metadataSection?.GetStringValue(nameof(Name), null);
}
if (string.IsNullOrWhiteSpace(result))
result = new CultureInfo(localeCode).NativeName;
if (string.IsNullOrWhiteSpace(result))
result = localeCode;
return result;
}
/// <summary>
/// Applies (hard-links or copies) the translation game files for a given locale to the game directory,
/// and removes any destination files whose source no longer exists.
/// </summary>
public void ApplyTranslationGameFiles() => ApplyTranslationGameFiles(LocaleCode);
/// <inheritdoc cref="ApplyTranslationGameFiles()"/>
/// <param name="localeCode">The locale code identifying the translation whose game files should be applied.</param>
public static void ApplyTranslationGameFiles(string localeCode)
{
ClientConfiguration.Instance.RefreshTranslationGameFiles();
string translationFolderPath = SafePath.CombineDirectoryPath(
ClientConfiguration.Instance.TranslationsFolderPath, localeCode);
foreach (var tgf in ClientConfiguration.Instance.TranslationGameFiles)
{
string sourcePath = SafePath.CombineFilePath(translationFolderPath, tgf.Source);
string targetPath = SafePath.CombineFilePath(ProgramConstants.GamePath, tgf.Target);
if (File.Exists(sourcePath))
{
string sourceHash = Utilities.CalculateSHA1ForFile(sourcePath);
string targetHash = Utilities.CalculateSHA1ForFile(targetPath);
if (sourceHash != targetHash)
{
FileExtensions.CreateHardLinkFromSource(sourcePath, targetPath);
new FileInfo(targetPath).IsReadOnly = true;
}
}
else
{
if (File.Exists(targetPath))
{
new FileInfo(targetPath).IsReadOnly = false;
File.Delete(targetPath);
}
}
}
}
/// <summary>
/// Lists valid available translations from the <see cref="TranslationsFolderPath"/> along with their UI names.
/// A localization is valid if it has a corresponding <see cref="TranslationIniName"/> file in the <see cref="TranslationsFolderPath"/>.
/// </summary>
/// <returns>Locale code -> display name pairs.</returns>
public static Dictionary<string, string> GetTranslations()
{
var translations = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)
{
// Add default localization so that we always have it in the list even if the localization does not exist
[ProgramConstants.HARDCODED_LOCALE_CODE] = GetLanguageName(ProgramConstants.HARDCODED_LOCALE_CODE)
};
if (!Directory.Exists(ClientConfiguration.Instance.TranslationsFolderPath))
return translations;
foreach (var localizationFolder in Directory.GetDirectories(ClientConfiguration.Instance.TranslationsFolderPath))
{
string localizationCode = Path.GetFileName(localizationFolder);
translations[localizationCode] = GetLanguageName(localizationCode);
}
return translations;
}
/// <summary>
/// Checks the current UI culture and finds the closest match from supported translations.
/// </summary>
/// <returns>Available translation locale code.</returns>
public static string GetDefaultTranslationLocaleCode()
{
// we don't need names here pretty much
Dictionary<string, string> translations = GetTranslations();
for (var culture = InitialUICulture;
culture != CultureInfo.InvariantCulture;
culture = culture.Parent)
{
string translation = culture.Name;
// the keys in 'translations' are case-insensitive
if (translations.ContainsKey(translation))
return translation;
}
return ProgramConstants.HARDCODED_LOCALE_CODE;
}
/// <summary>
/// Dump the translation table to an ini file.
/// </summary>
/// <returns>An ini file that contains the translation table.</returns>
public IniFile DumpIni(bool saveOnlyMissingValues = false)
{
IniFile ini = new IniFile();
ini.AddSection(METADATA_SECTION);
IniSection general = ini.GetSection(METADATA_SECTION);
if (!string.IsNullOrWhiteSpace(_name))
general.AddKey(nameof(Name), _name);
if (_culture is not null)
general.AddKey(nameof(Culture), _culture.Name);
general.AddKey(nameof(Author), Author);
general.AddKey(nameof(MapEncoding), EncodingExt.EncodingWithAutoToString(MapEncoding));
ini.AddSection(nameof(Values));
IniSection translation = ini.GetSection(nameof(Values));
foreach (var (key, value) in Values.OrderBy(kvp => kvp.Key))
{
bool valueMissing = MissingKeys.Contains(key);
if (!saveOnlyMissingValues || valueMissing)
{
translation.AddKey(valueMissing
? MISSING_KEY_PREFIX + key
: key,
value.ToIniString());
}
}
return ini;
}
private bool HandleMissing(string key, string defaultValue)
{
if (MissingKeys.Add(key))
{
Values[key] = defaultValue;
return true;
}
return false;
}
/// <summary>
/// Looks up the translated value that corresponds to the given key.
/// </summary>
/// <param name="key">The translation key (identifier).</param>
/// <param name="defaultValue">The value to fall back to in case there's no translated value.</param>
/// <param name="notify">Whether to add this key and value to the list of missing key-values.</param>
/// <returns>The translated value or a default value.</returns>
public string LookUp(string key, string defaultValue, bool notify = true)
{
if (Values.ContainsKey(key))
return Values[key];
if (notify)
_ = HandleMissing(key, defaultValue);
return defaultValue;
}
/// <summary>
/// Looks up the translated value that corresponds to the given key with a fallback to the value of global key.
/// </summary>
/// <param name="key">The translation key (identifier).</param>
/// <param name="fallbackKey">The fallback translation key (identifier).</param>
/// <param name="defaultValue">The value to fall back to in case there's no translated value.</param>
/// <param name="notify">Whether to add this key and value to the list of missing key-values. Doesn't include the fallback key.</param>
/// <returns>The translated value or a default value.</returns>
public string LookUp(string key, string fallbackKey, string defaultValue, bool notify = true)
{
string result;
if (Values.ContainsKey(key))
{
result = Values[key];
}
else if (key != fallbackKey && Values.ContainsKey(fallbackKey))
{
result = Values[fallbackKey];
}
else
{
result = defaultValue;
if (notify)
_ = HandleMissing(key, defaultValue);
}
return result;
}
}
================================================
FILE: ClientCore/I18N/TranslationGameFile.cs
================================================
namespace ClientCore.I18N;
/// <summary>
/// Describes a file to try and copy into the game folder with a translation.
/// </summary>
/// <param name="Source">A path to copy from, relative to the selected translation folder.</param>
/// <param name="Target">A path to copy to, relative to root folder of the game/mod.</param>
/// <param name="Checked">Whether to include this file in the integrity checks.</param>
public readonly record struct TranslationGameFile(string Source, string Target, bool Checked);
================================================
FILE: ClientCore/INIProcessing/IniPreprocessInfoStore.cs
================================================
using Rampastring.Tools;
using System;
using System.Collections.Generic;
using System.IO;
using ClientCore.Extensions;
namespace ClientCore.INIProcessing
{
public class PreprocessedIniInfo
{
public PreprocessedIniInfo(string fileName, string originalHash, string processedHash)
{
FileName = fileName;
OriginalFileHash = originalHash;
ProcessedFileHash = processedHash;
}
public PreprocessedIniInfo(string[] info)
{
FileName = info[0];
OriginalFileHash = info[1];
ProcessedFileHash = info[2];
}
public string FileName { get; }
public string OriginalFileHash { get; set; }
public string ProcessedFileHash { get; set; }
}
/// <summary>
/// Handles information on what INI files have been processed by the client.
/// </summary>
public class IniPreprocessInfoStore
{
private const string StoreIniName = "ProcessedIniInfo.ini";
private const string ProcessedINIsSection = "ProcessedINIs";
public List<PreprocessedIniInfo> PreprocessedIniInfos { get; } = new List<PreprocessedIniInfo>();
/// <summary>
/// Loads the preprocessed INI information.
/// </summary>
public void Load()
{
FileInfo processedIniInfoFile = SafePath.GetFile(ProgramConstants.ClientUserFilesPath, "ProcessedIniInfo.ini");
if (!processedIniInfoFile.Exists)
return;
var iniFile = new IniFile(processedIniInfoFile.FullName);
var keys = iniFile.GetSectionKeys(ProcessedINIsSection);
foreach (string key in keys)
{
string[] values = iniFile.GetStringListValue(ProcessedINIsSection, key, string.Empty);
if (values.Length != 3)
{
Logger.Log("Failed to parse preprocessed INI info, key " + key);
continue;
}
// If an INI file no longer exists, it's useless to keep its record
if (!SafePath.GetFile(ProgramConstants.GamePath, "INI", values[0]).Exists)
continue;
PreprocessedIniInfos.Add(new PreprocessedIniInfo(values));
}
}
/// <summary>
/// Checks if a (potentially processed) INI file is up-to-date
/// or whether it needs to be (re)processed.
/// </summary>
/// <param name="fileName">The name of the INI file in its directory.
/// Do not supply the entire file path.</param>
/// <returns>True if the INI file is up-to-date, false if it needs to be processed.</returns>
public bool IsIniUpToDate(string fileName)
{
PreprocessedIniInfo info = PreprocessedIniInfos.Find(i => i.FileName == fileName);
if (info == null)
return false;
string processedFileHash = Utilities.CalculateSHA1ForFile(SafePath.CombineFilePath(ProgramConstants.GamePath, "INI", fileName));
if (processedFileHash != info.ProcessedFileHash)
return false;
string originalFileHash = Utilities.CalculateSHA1ForFile(SafePath.CombineFilePath(ProgramConstants.GamePath, "INI", "Base", fileName));
if (originalFileHash != info.OriginalFileHash)
return false;
return true;
}
public void UpsertRecord(string fileName, string originalFileHash, string processedFileHash)
{
var existing = PreprocessedIniInfos.Find(i => i.FileName == fileName);
if (existing == null)
{
PreprocessedIniInfos.Add(new PreprocessedIniInfo(fileName, originalFileHash, processedFileHash));
}
else
{
existing.OriginalFileHash = originalFileHash;
existing.ProcessedFileHash = processedFileHash;
}
}
public void Write()
{
FileInfo processedIniInfoFile = SafePath.GetFile(ProgramConstants.ClientUserFilesPath, "ProcessedIniInfo.ini");
if (processedIniInfoFile.Exists)
processedIniInfoFile.Delete();
IniFile iniFile = new IniFile(processedIniInfoFile.FullName);
for (int i = 0; i < PreprocessedIniInfos.Count; i++)
{
PreprocessedIniInfo info = PreprocessedIniInfos[i];
iniFile.SetStringValue(ProcessedINIsSection, i.ToString(),
string.Join(",", info.FileName, info.OriginalFileHash, info.ProcessedFileHash));
}
iniFile.WriteIniFile();
}
}
}
================================================
FILE: ClientCore/INIProcessing/IniPreprocessor.cs
================================================
using Rampastring.Tools;
using System.Collections.Generic;
using System.IO;
namespace ClientCore.INIProcessing
{
/// <summary>
/// Pre-processes INI files.
/// Allows sections to inherit other sections.
/// </summary>
public class IniPreprocessor
{
public void ProcessIni(string sourceIniPath, string destinationIniPath)
{
File.Delete(destinationIniPath);
if (!File.Exists(sourceIniPath))
return;
var iniFile = new IniFile(sourceIniPath);
List<string> sections = iniFile.GetSections();
sections.ForEach(sectionName => ProcessSection(iniFile, sectionName));
iniFile.Comment = $"generated by CnCNet client, see /Base/{Path.GetFileName(sourceIniPath)} for the original";
iniFile.WriteIniFile(destinationIniPath);
}
/// <summary>
/// Processes an INI section and applies its potential base section.
/// Returns the INI section. Works recursively.
/// </summary>
/// <param name="iniFile">The INI file.</param>
/// <param name="sectionName">The name of the section to process.</param>
private IniSection ProcessSection(IniFile iniFile, string sectionName)
{
IniSection section = iniFile.GetSection(sectionName);
if (section == null)
return null;
string baseSectionName = section.GetStringValue("BaseSection", string.Empty);
if (string.IsNullOrWhiteSpace(baseSectionName))
return section;
IniSection baseSection = ProcessSection(iniFile, baseSectionName);
if (baseSection == null)
return section;
foreach (var kvp in baseSection.Keys)
{
if (!section.KeyExists(kvp.Key))
section.AddKey(kvp.Key, kvp.Value);
}
return section;
}
}
}
================================================
FILE: ClientCore/INIProcessing/PreprocessorBackgroundTask.cs
================================================
using Rampastring.Tools;
using System.IO;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace ClientCore.INIProcessing
{
/// <summary>
/// Background task for pre-processing INI files.
/// Singleton.
/// </summary>
public class PreprocessorBackgroundTask
{
private PreprocessorBackgroundTask()
{
}
private static PreprocessorBackgroundTask _instance;
public static PreprocessorBackgroundTask Instance
{
get
{
if (_instance == null)
_instance = new PreprocessorBackgroundTask();
return _instance;
}
}
private Task task;
public bool IsRunning => !task.IsCompleted;
public void Run()
{
task = Task.Run(CheckFiles);
}
private static void CheckFiles()
{
Logger.Log("Starting background processing of INI files.");
DirectoryInfo iniFolder = SafePath.GetDirectory(ProgramConstants.GamePath, "INI", "Base");
if (!iniFolder.Exists)
{
Logger.Log("/INI/Base does not exist, skipping background processing of INI files.");
return;
}
IniPreprocessInfoStore infoStore = new IniPreprocessInfoStore();
infoStore.Load();
IniPreprocessor processor = new IniPreprocessor();
IEnumerable<FileInfo> iniFiles = iniFolder.EnumerateFiles("*.ini", SearchOption.TopDirectoryOnly);
int processedCount = 0;
foreach (FileInfo iniFile in iniFiles)
{
if (!infoStore.IsIniUpToDate(iniFile.Name))
{
Logger.Log("INI file " + iniFile.Name + " is not processed or outdated, re-processing it.");
string sourcePath = iniFile.FullName;
string destinationPath = SafePath.CombineFilePath(ProgramConstants.GamePath, "INI", iniFile.Name);
processor.ProcessIni(sourcePath, destinationPath);
string sourceHash = Utilities.CalculateSHA1ForFile(sourcePath);
string destinationHash = Utilities.CalculateSHA1ForFile(destinationPath);
infoStore.UpsertRecord(iniFile.Name, sourceHash, destinationHash);
processedCount++;
}
else
{
Logger.Log("INI file " + iniFile.Name + " is up to date.");
}
}
if (processedCount > 0)
{
Logger.Log("Writing preprocessed INI info store.");
infoStore.Write();
}
Logger.Log("Ended background processing of INI files.");
}
}
}
================================================
FILE: ClientCore/LoadingScreenController.cs
================================================
using System;
using Rampastring.Tools;
namespace ClientCore
{
public static class LoadingScreenController
{
public static string GetLoadScreenName(string sideId)
{
int resHeight = UserINISettings.Instance.IngameScreenHeight;
int randomInt = new Random().Next(1, 1 + ClientConfiguration.Instance.LoadingScreenCount);
string resolutionText;
if (resHeight < 480)
resolutionText = "400";
else if (resHeight < 600)
resolutionText = "480";
else
resolutionText = "600";
return SafePath.CombineFilePath(
ProgramConstants.BASE_RESOURCE_PATH,
FormattableString.Invariant($"l{resolutionText}s{sideId}{randomInt}.pcx")).Replace('\\', '/');
}
}
}
================================================
FILE: ClientCore/OSVersion.cs
================================================
public enum OSVersion
{
UNKNOWN,
WINXP,
WINVISTA,
WIN7,
WIN810,
UNIX
}
================================================
FILE: ClientCore/PlatformShim/EncodingExt.cs
================================================
#nullable enable
using System.Text;
namespace ClientCore.PlatformShim;
public static class EncodingExt
{
static EncodingExt()
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
ANSI = Encoding.GetEncoding(0);
}
/// <summary>
/// Gets the legacy ANSI encoding (not Windows-1252 and also not any specific encoding).
/// ANSI doesn't mean a specific codepage, it means the default non-Unicode codepage which can be changed from Control Panel.
/// </summary>
public static Encoding ANSI { get; }
public static Encoding UTF8NoBOM { get; } = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);
public const string ENCODING_AUTO_DETECT = "Auto";
public static Encoding? GetEncodingWithAuto(string? encodingName)
{
if (encodingName is null)
return UTF8NoBOM;
if (encodingName.Equals(ENCODING_AUTO_DETECT, System.StringComparison.InvariantCultureIgnoreCase))
return null;
Encoding encoding = Encoding.GetEncoding(encodingName);
// We don't expect UTF-8 BOM for the string "UTF-8"
if (encoding is UTF8Encoding)
encoding = UTF8NoBOM;
return encoding;
}
public static string EncodingWithAutoToString(Encoding? encoding)
{
if (encoding is null)
return ENCODING_AUTO_DETECT;
// To find a name that can be passed to the GetDetectedEncoding method, use the WebName property.
return encoding.WebName;
}
}
================================================
FILE: ClientCore/ProcessLauncher.cs
================================================
using System.Diagnostics;
namespace ClientCore
{
public static class ProcessLauncher
{
public static void StartShellProcess(string commandLine, string arguments = null)
{
using var _ = Process.Start(new ProcessStartInfo
{
FileName = commandLine,
Arguments = arguments,
UseShellExecute = true
});
}
}
}
================================================
FILE: ClientCore/ProfanityFilter.cs
================================================
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace ClientCore
{
public class ProfanityFilter
{
public IList<string> CensoredWords { get; private set; }
/// <summary>
/// Creates a new profanity filter with a default set of censored words.
/// </summary>
public ProfanityFilter()
{
CensoredWords = new List<string>()
{
"cunt*",
"*nigg*",
"paki*",
"shit",
"fuck*",
"admin*",
"allahu*",
"akbar",
"twat",
"cock",
"pussy",
"hitler*",
"anal",
"dick",
"faggot",
"whore",
"slut",
"motherfucker",
"asshole",
"bitch",
"bastard",
"kike",
"chink",
"spic",
"retard",
"tranny",
"jizz",
"gangbang",
"handjob",
"blowjob",
"rimjob",
"porn",
"rape",
"rapist",
"molest",
"incest",
"bestiality",
"zoophile",
"zoophilia",
"chingchong",
"slanty",
"zipperhead",
"gook",
};
}
public ProfanityFilter(IEnumerable<string> censoredWords)
{
if (censoredWords == null)
throw new ArgumentNullException(nameof(censoredWords));
CensoredWords = new List<string>(censoredWords);
}
public bool IsOffensive(string text)
{
foreach (string censoredWord in CensoredWords)
{
string regularExpression = ToRegexPattern(censoredWord);
if (Regex.IsMatch(text, regularExpression, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant))
return true;
}
return false;
}
public string CensorText(string text)
{
if (text == null)
throw new ArgumentNullException(nameof(text));
string censoredText = text;
foreach (string censoredWord in CensoredWords)
{
string regularExpression = ToRegexPattern(censoredWord);
censoredText = Regex.Replace(censoredText, regularExpression, StarCensoredMatch,
RegexOptions.IgnoreCase | RegexOptions.CultureInvariant);
}
return censoredText;
}
private static string StarCensoredMatch(Match m)
{
string word = m.Captures[0].Value;
return new string('*', word.Length);
}
private string ToRegexPattern(string wildcardSearch)
{
string regexPattern = Regex.Escape(wildcardSearch);
regexPattern = regexPattern.Replace(@"\*", ".*?");
regexPattern = regexPattern.Replace(@"\?", ".");
if (regexPattern.StartsWith(".*?"))
{
regexPattern = regexPattern.Substring(3);
regexPattern = @"(^\b)*?" + regexPattern;
}
regexPattern = @"\b" + regexPattern + @"\b";
return regexPattern;
}
}
}
================================================
FILE: ClientCore/ProgramConstants.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Reflection;
using Rampastring.Tools;
using ClientCore.Extensions;
namespace ClientCore
{
/// <summary>
/// Contains various static variables and constants that the client uses for operation.
/// </summary>
public static class ProgramConstants
{
public static readonly string StartupExecutable = Assembly.GetEntryAssembly().Location;
public static readonly string StartupPath = SafePath.CombineDirectoryPath(new FileInfo(StartupExecutable).Directory.FullName);
public static readonly string GamePath = SafePath.CombineDirectoryPath(GetGamePath(StartupPath));
public static string ClientUserFilesPath => SafePath.CombineDirectoryPath(GamePath, "Client");
public static event EventHandler PlayerNameChanged;
public const string QRES_EXECUTABLE = "qres.dat";
public const string CNCNET_PROTOCOL_REVISION = "R14";
public const string LAN_PROTOCOL_REVISION = "RL8";
public const int LAN_PORT = 1234;
public const int LAN_INGAME_PORT = 1234;
public const int LAN_LOBBY_PORT = 1232;
public const int LAN_GAME_LOBBY_PORT = 1233;
public const char LAN_DATA_SEPARATOR = (char)01;
public const char LAN_MESSAGE_SEPARATOR = (char)02;
public const string SPAWNMAP_INI = "spawnmap.ini";
public const string SPAWNER_SETTINGS = "spawn.ini";
public const string SAVED_GAME_SPAWN_INI = "Saved Games/spawnSG.ini";
/// <summary>
/// The locale code that corresponds to the language the hardcoded client strings are in.
/// </summary>
public const string HARDCODED_LOCALE_CODE = "en";
/// <summary>
/// Used to denote <see cref="Environment.NewLine"/> in the INI files.
/// </summary>
/// <remarks>
/// Historically Westwood used '@' for this purpose, so we keep it for compatibility.
/// </remarks>
public const string INI_NEWLINE_PATTERN = "@";
public const int GAME_ID_MAX_LENGTH = 4;
public static readonly Encoding LAN_ENCODING = Encoding.UTF8;
#if NETFRAMEWORK
private static bool? isMono;
/// <summary>
/// Gets a value whether or not the application is running under Mono. Uses lazy loading and caching.
/// </summary>
public static bool ISMONO => isMono ??= Type.GetType("Mono.Runtime") != null;
#endif
public static string GAME_VERSION = "Undefined";
private static string PlayerName = "No name";
public static string PLAYERNAME
{
get { return PlayerName; }
set
{
string oldPlayerName = PlayerName;
PlayerName = value;
if (oldPlayerName != PlayerName)
PlayerNameChanged?.Invoke(null, EventArgs.Empty);
}
}
public static string BASE_RESOURCE_PATH = "Resources";
public static string RESOURCES_DIR = BASE_RESOURCE_PATH;
public static int LOG_LEVEL = 1;
public static bool IsInGame { get; set; }
public static string GetResourcePath()
{
return SafePath.CombineDirectoryPath(GamePath, RESOURCES_DIR);
}
public static string GetBaseResourcePath()
{
return SafePath.CombineDirectoryPath(GamePath, BASE_RESOURCE_PATH);
}
public const string GAME_INVITE_CTCP_COMMAND = "INVITE";
public const string GAME_INVITATION_FAILED_CTCP_COMMAND = "INVITATION_FAILED";
public static string GetAILevelName(int aiLevel)
{
if (aiLevel > -1 && aiLevel < AI_PLAYER_NAMES.Count)
return AI_PLAYER_NAMES[aiLevel];
return "";
}
public static readonly List<string> TEAMS = new List<string> { "A", "B", "C", "D" };
// Static fields might be initialized before the translation file is loaded. Change to readonly properties here.
public static List<string> AI_PLAYER_NAMES => new List<string> { "Easy AI".L10N("Client:Main:EasyAIName"), "Medium AI".L10N("Client:Main:MediumAIName"), "Hard AI".L10N("Client:Main:HardAIName") };
public static string LogFileName { get; set; }
/// <summary>
/// This method finds the "Resources" directory by traversing the directory tree upwards from the startup path.
/// </summary>
/// <remarks>
/// This method is needed by both ClientCore and DXMainClient. However, since it is usually called at the very beginning,
/// where DXMainClient could not refer to ClientCore, this method is copied to both projects.
/// Remember to keep <see cref="ClientCore.ProgramConstants.SearchResourcesDir"/> and <see cref="DTAClient.Program.SearchResourcesDir"/> consistent if you have modified its source codes.
/// </remarks>
private static string SearchResourcesDir(string startupPath)
{
DirectoryInfo currentDir = new(startupPath);
for (int i = 0; i < 3; i++)
{
// Determine if currentDir is the "Resources" folder
if (currentDir.Name.ToLowerInvariant() == "Resources".ToLowerInvariant())
return currentDir.FullName;
// Additional check. This makes developers to debug the client inside Visual Studio a little bit easier.
DirectoryInfo resourcesDir = currentDir.GetDirectories("Resources", SearchOption.TopDirectoryOnly).FirstOrDefault();
if (resourcesDir is not null)
return resourcesDir.FullName;
currentDir = currentDir.Parent;
}
throw new Exception("Could not find Resources directory.");
}
private static string GetGamePath(string startupPath)
{
string resourceDir = SearchResourcesDir(startupPath);
return new DirectoryInfo(resourceDir).Parent.FullName;
}
}
}
================================================
FILE: ClientCore/SavedGameManager.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using Rampastring.Tools;
namespace ClientCore
{
/// <summary>
/// A class for handling saved multiplayer games.
/// </summary>
public static class SavedGameManager
{
private const string SAVED_GAMES_DIRECTORY = "Saved Games";
private static bool saveRenameInProgress = false;
public static int GetSaveGameCount()
{
string saveGameDirectory = GetSaveGameDirectoryPath();
if (!AreSavedGamesAvailable())
return 0;
for (int i = 0; i < 1000; i++)
{
if (!SafePath.GetFile(saveGameDirectory, string.Format("SVGM_{0}.NET", i.ToString("D3"))).Exists)
{
return i;
}
}
return 1000;
}
public static List<string> GetSaveGameTimestamps()
{
int saveGameCount = GetSaveGameCount();
List<string> timestamps = new List<string>();
string saveGameDirectory = GetSaveGameDirectoryPath();
for (int i = 0; i < saveGameCount; i++)
{
FileInfo sgFile = SafePath.GetFile(saveGameDirectory, string.Format("SVGM_{0}.NET", i.ToString("D3")));
DateTime dt = sgFile.LastWriteTime;
timestamps.Add(dt.ToString());
}
return timestamps;
}
public static bool AreSavedGamesAvailable()
{
if (Directory.Exists(GetSaveGameDirectoryPath()))
return true;
return false;
}
private static string GetSaveGameDirectoryPath()
{
return SafePath.CombineDirectoryPath(ProgramConstants.GamePath, SAVED_GAMES_DIRECTORY);
}
/// <summary>
/// Initializes saved MP games for a match.
/// </summary>
public static bool InitSavedGames()
{
bool success = EraseSavedGames();
if (!success)
return false;
try
{
Logger.Log("Writing spawn.ini for saved game.");
SafePath.DeleteFileIfExists(ProgramConstants.GamePath, SAVED_GAMES_DIRECTORY, "spawnSG.ini");
File.Copy(SafePath.CombineFilePath(ProgramConstants.GamePath, "spawn.ini"), SafePath.CombineFilePath(ProgramConstants.GamePath, SAVED_GAMES_DIRECTORY, "spawnSG.ini"));
}
catch (Exception ex)
{
Logger.Log("Writing spawn.ini for saved game failed! Exception message: " + ex.ToString());
return false;
}
return true;
}
public static void RenameSavedGame()
{
Logger.Log("Renaming saved game.");
if (saveRenameInProgress)
{
Logger.Log("Save renaming in progress!");
return;
}
string saveGameDirectory = GetSaveGameDirectoryPath();
if (!SafePath.GetFile(saveGameDirectory, "SAVEGAME.NET").Exists)
{
Logger.Log("SAVEGAME.NET doesn't exist!");
return;
}
saveRenameInProgress = true;
int saveGameId = 0;
for (int i = 0; i < 1000; i++)
{
if (!SafePath.GetFile(saveGameDirectory, string.Format("SVGM_{0}.NET", i.ToString("D3"))).Exists)
{
saveGameId = i;
break;
}
}
if (saveGameId == 999)
{
if (SafePath.GetFile(saveGameDirectory, "SVGM_999.NET").Exists)
Logger.Log("1000 saved games exceeded! Overwriting previous MP save.");
}
string sgPath = SafePath.CombineFilePath(saveGameDirectory, string.Format("SVGM_{0}.NET", saveGameId.ToString("D3")));
int tryCount = 0;
while (true)
{
try
{
File.Move(SafePath.CombineFilePath(saveGameDirectory, "SAVEGAME.NET"), sgPath);
break;
}
catch (Exception ex)
{
Logger.Log("Renaming saved game failed! Exception message: " + ex.ToString());
}
tryCount++;
if (tryCount > 40)
{
Logger.Log("Renaming saved game failed 40 times! Aborting.");
return;
}
System.Threading.Thread.Sleep(250);
}
saveRenameInProgress = false;
Logger.Log("Saved game SAVEGAME.NET succesfully renamed to " + Path.GetFileName(sgPath));
}
public static bool EraseSavedGames()
{
Logger.Log("Erasing previous MP saved games.");
try
{
for (int i = 0; i < 1000; i++)
{
SafePath.DeleteFileIfExists(GetSaveGameDirectoryPath(), string.Format("SVGM_{0}.NET", i.ToString("D3")));
}
}
catch (Exception ex)
{
Logger.Log("Erasing previous MP saved games failed! Exception message: " + ex.ToString());
return false;
}
Logger.Log("MP saved games succesfully erased.");
return true;
}
}
}
================================================
FILE: ClientCore/Settings/BoolSetting.cs
================================================
using Rampastring.Tools;
namespace ClientCore.Settings
{
public class BoolSetting : INISetting<bool>
{
public BoolSetting(IniFile iniFile, string iniSection, string iniKey, bool defaultValue)
: base(iniFile, iniSection, iniKey, defaultValue)
{
}
protected override bool Get()
{
return IniFile.GetBooleanValue(IniSection, IniKey, DefaultValue);
}
protected override void Set(bool value)
{
IniFile.SetBooleanValue(IniSection, IniKey, value);
}
public override void Write()
{
IniFile.SetBooleanValue(IniSection, IniKey, Get());
}
public override string ToString()
{
return Get().ToString();
}
}
}
================================================
FILE: ClientCore/Settings/DoubleSetting.cs
================================================
using Rampastring.Tools;
namespace ClientCore.Settings
{
public class DoubleSetting : INISetting<double>
{
public DoubleSetting(IniFile iniFile, string iniSection, string iniKey, double defaultValue)
: base(iniFile, iniSection, iniKey, defaultValue)
{
}
protected override double Get()
{
return IniFile.GetDoubleValue(IniSection, IniKey, DefaultValue);
}
protected override void Set(double value)
{
IniFile.SetDoubleValue(IniSection, IniKey, value);
}
public override void Write()
{
IniFile.SetDoubleValue(IniSection, IniKey, Get());
}
public override string ToString()
{
return Get().ToString();
}
}
}
================================================
FILE: ClientCore/Settings/IIniSetting.cs
================================================
namespace ClientCore.Settings
{
/// <summary>
/// A dummy interface for checking for INISetting in reflection.
/// </summary>
interface IIniSetting
{
}
}
================================================
FILE: ClientCore/Settings/INISetting.cs
================================================
using Rampastring.Tools;
namespace ClientCore.Settings
{
/// <summary>
/// A base class for an INI setting.
/// </summary>
public abstract class INISetting<T> : IIniSetting
{
public INISetting(IniFile iniFile, string iniSection, string iniKey,
T defaultValue)
{
IniFile = iniFile;
IniSection = iniSection;
IniKey = iniKey;
DefaultValue = defaultValue;
}
public static implicit operator T(INISetting<T> iniSetting)
{
return iniSetting.Get();
}
public void SetIniFile(IniFile iniFile)
{
IniFile = iniFile;
}
protected IniFile IniFile { get; private set; }
protected string IniSection { get; private set; }
protected string IniKey { get; private set; }
protected T DefaultValue { get; private set; }
public T Value
{
get { return Get(); }
set { Set(value); }
}
/// <summary>
/// Writes the default value of this setting to the INI file if no value
/// for the setting is currently specified in the INI file.
/// </summary>
public void SetDefaultIfNonexistent()
{
if (!IniFile.KeyExists(IniSection, IniKey))
Set(DefaultValue);
}
protected abstract T Get();
protected abstract void Set(T value);
public abstract void Write();
}
}
================================================
FILE: ClientCore/Settings/IntRangeSetting.cs
================================================
using Rampastring.Tools;
namespace ClientCore.Settings
{
/// <summary>
/// Similar to IntSetting, this setting forces a min and max value upon getting and setting.
/// </summary>
public class IntRangeSetting : IntSetting
{
private readonly int MinValue;
private readonly int MaxValue;
public IntRangeSetting(IniFile iniFile, string iniSection, string iniKey, int defaultValue, int minValue, int maxValue) : base(iniFile, iniSection, iniKey, defaultValue)
{
MinValue = minValue;
MaxValue = maxValue;
}
/// <summary>
/// Checks the validity of the value. If the value is invalid, return the default value of this setting.
/// Otherwise, return the set value.
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
private int NormalizeValue(int value)
{
return InvalidValue(value) ? DefaultValue : value;
}
private bool InvalidValue(int value)
{
return value < MinValue || value > MaxValue;
}
protected override int Get()
{
return NormalizeValue(IniFile.GetIntValue(IniSection, IniKey, DefaultValue));
}
protected override void Set(int value)
{
IniFile.SetIntValue(IniSection, IniKey, NormalizeValue(value));
}
}
}
================================================
FILE: ClientCore/Settings/IntSetting.cs
================================================
using Rampastring.Tools;
namespace ClientCore.Settings
{
public class IntSetting : INISetting<int>
{
public IntSetting(IniFile iniFile, string iniSection, string iniKey, int defaultValue)
: base(iniFile, iniSection, iniKey, defaultValue)
{
}
protected override int Get()
{
return IniFile.GetIntValue(IniSection, IniKey, DefaultValue);
}
protected override void Set(int value)
{
IniFile.SetIntValue(IniSection, IniKey, value);
}
public override void Write()
{
IniFile.SetIntValue(IniSection, IniKey, Get());
}
public override string ToString()
{
return Get().ToString();
}
}
}
================================================
FILE: ClientCore/Settings/StringListSetting.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using Rampastring.Tools;
namespace ClientCore.Settings
{
/// <summary>
/// This is a setting that can be stored as a comma separated list of strings.
/// </summary>
public class StringListSetting : INISetting<List<string>>
{
public StringListSetting(IniFile iniFile, string iniSection, string iniKey, List<string> defaultValue) : base(iniFile, iniSection, iniKey, defaultValue)
{
}
protected override List<string> Get()
{
string value = IniFile.GetStringValue(IniSection, IniKey, "");
return string.IsNullOrWhiteSpace(value) ? DefaultValue : value.Split(',').ToList();
}
protected override void Set(List<string> value)
{
IniFile.SetStringValue(IniSection, IniKey, string.Join(",", value));
}
public override void Write()
{
IniFile.SetStringValue(IniSection, IniKey, string.Join(",", Get()));
}
public void Add(string value)
{
var values = Get().Concat(new []{value}).ToList();
Set(values);
}
public void Remove(string value)
{
var values = Get().Where(v => !string.Equals(v, value, StringComparison.InvariantCultureIgnoreCase)).ToList();
Set(values);
}
}
}
================================================
FILE: ClientCore/Settings/StringSetting.cs
================================================
using Rampastring.Tools;
namespace ClientCore.Settings
{
public class StringSetting : INISetting<string>
{
public StringSetting(IniFile iniFile, string iniSection, string iniKey, string defaultValue)
: base(iniFile, iniSection, iniKey, defaultValue)
{
}
protected override string Get()
{
return IniFile.GetStringValue(IniSection, IniKey, DefaultValue);
}
protected override void Set(string value)
{
IniFile.SetStringValue(IniSection, IniKey, value);
}
public override void Write()
{
IniFile.SetStringValue(IniSection, IniKey, Get());
}
public override string ToString()
{
return Get();
}
}
}
================================================
FILE: ClientCore/Settings/UserINISettings.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using ClientCore.Enums;
using ClientCore.Extensions;
using ClientCore.Settings;
using Rampastring.Tools;
namespace ClientCore
{
public class UserINISettings
{
private static UserINISettings _instance;
public const string VIDEO = "Video";
public const string MULTIPLAYER = "MultiPlayer";
public const string OPTIONS = "Options";
public const string AUDIO = "Audio";
public const string COMPATIBILITY = "Compatibility";
public const string GAME_FILTERS = "GameFilters";
public const string GAME_OPTION_FILTERS = "GameOptionFilters";
private const string FAVORITE_MAPS = "FavoriteMaps";
private const bool DEFAULT_SHOW_FRIENDS_ONLY_GAMES = false;
private const bool DEFAULT_HIDE_LOCKED_GAMES = false;
private const bool DEFAULT_HIDE_PASSWORDED_GAMES = false;
private const bool DEFAULT_HIDE_INCOMPATIBLE_GAMES = false;
private const int DEFAULT_MAX_PLAYER_COUNT = 8;
public static UserINISettings Instance
{
get
{
if (_instance == null)
throw new InvalidOperationException("UserINISettings not initialized!");
return _instance;
}
}
public static void Initialize(string userIniFileName)
{
if (_instance != null)
throw new InvalidOperationException("UserINISettings has already been initialized!");
var userIni = new IniFile(SafePath.CombineFilePath(ProgramConstants.GamePath, userIniFileName));
string userDefaultIniFilePath = SafePath.CombineFilePath(ProgramConstants.GetResourcePath(), "UserDefaults.ini");
if (!File.Exists(userDefaultIniFilePath))
{
_instance = new UserINISettings(userIni);
return;
}
var userDefaultIni = new IniFile(userDefaultIniFilePath);
var combinedUserIni = userDefaultIni.Clone();
combinedUserIni.FileName = null;
// Combine userIni and userDefaultIni
foreach (string sectionName in userIni.GetSections())
{
IniSection userSection = userIni.GetSection(sectionName);
IniSection combinedUserSection = combinedUserIni.GetSection(sectionName);
if (combinedUserSection == null)
{
combinedUserSection = new IniSection(sectionName);
combinedUserIni.AddSection(combinedUserSection);
}
foreach ((var key, var value) in userSection.Keys)
{
combinedUserSection.AddOrReplaceKey(key, value);
}
}
combinedUserIni.FileName = userIni.FileName;
_instance = new UserINISettings(combinedUserIni);
}
protected UserINISettings(IniFile iniFile)
{
SettingsIni = iniFile;
if (ClientConfiguration.Instance.ClientGameType == ClientType.TS)
BackBufferInVRAM = new BoolSetting(iniFile, VIDEO, "UseGraphicsPatch", true);
else
BackBufferInVRAM = new BoolSetting(iniFile, VIDEO, "VideoBackBuffer", false);
IngameScreenWidth = new IntSetting(
iniFile,
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? OPTIONS : VIDEO,
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? "Width" : "ScreenWidth",
1024);
IngameScreenHeight = new IntSetting(
iniFile,
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? OPTIONS : VIDEO,
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? "Height" : "ScreenHeight",
768);
ClientTheme = new StringSetting(iniFile, MULTIPLAYER, "Theme", ClientConfiguration.Instance.GetThemeInfoFromIndex(0).Name);
Translation = new StringSetting(iniFile, OPTIONS, "Translation", I18N.Translation.GetDefaultTranslationLocaleCode());
TranslationGameFilesVersion = new StringSetting(iniFile, OPTIONS, nameof(TranslationGameFilesVersion), string.Empty);
DetailLevel = new IntSetting(iniFile, OPTIONS, "DetailLevel", 2);
Renderer = new StringSetting(iniFile, COMPATIBILITY, "Renderer", string.Empty);
WindowedMode = new BoolSetting(iniFile, VIDEO, ClientConfiguration.Instance.WindowedModeKey, false);
BorderlessWindowedMode = new BoolSetting(iniFile, VIDEO, "NoWindowFrame", false);
BorderlessWindowedClient = new BoolSetting(iniFile, VIDEO, "BorderlessWindowedClient", ClientConfiguration.Instance.UserDefault_BorderlessWindowedClient);
IntegerScaledClient = new BoolSetting(iniFile, VIDEO, "IntegerScaledClient", ClientConfiguration.Instance.UserDefault_IntegerScaledClient);
ClientFPS = new IntSetting(iniFile, VIDEO, "ClientFPS", 60);
DisplayToggleableExtraTextures = new BoolSetting(iniFile, VIDEO, "DisplayToggleableExtraTextures", true);
// RA1 reads MultiplayerScoreVolume instead of ScoreVolume. This value is handled when saving
ScoreVolume = new DoubleSetting(iniFile,
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? OPTIONS : AUDIO,
"ScoreVolume",
0.7);
SoundVolume = new DoubleSetting(iniFile,
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? OPTIONS : AUDIO,
ClientConfiguration.Instance.ClientGameType == ClientType.RA ? "Volume" : "SoundVolume",
0.7);
VoiceVolume = new DoubleSetting(iniFile, AUDIO, "VoiceVolume", 0.7);
IsScoreShuffle = new BoolSetting(iniFile, AUDIO, "IsScoreShuffle", true);
ClientVolume = new DoubleSetting(iniFile, AUDIO, "ClientVolume", 1.0);
PlayMainMenuMusic = new BoolSetting(iniFile, AUDIO, "PlayMainMenuMusic", true);
StopMusicOnMenu = new BoolSetting(iniFile, AUDIO, "StopMusicOnMenu", true);
StopGameLobbyMessageAudio = new BoolSetting(iniFile, AUDIO, "StopGameLobbyMessageAudio", true);
MessageSound = new BoolSetting(iniFile, AUDIO, "ChatMessageSound", true);
ScrollRate = new IntSetting(iniFile, OPTIONS, "ScrollRate", 3);
DragDistance = new IntSetting(iniFile, OPTIONS, "DragDistance", 4);
CustomDragDistance = new IntSetting(iniFile, OPTIONS, "CustomDragDistance", 0);
DoubleTapInterval = new IntSetting(iniFile, OPTIONS, "DoubleTapInterval", 30);
Win8CompatMode = new StringSetting(iniFile, OPTIONS, "Win8Compat", "No");
PlayerName = new StringSetting(iniFile, MULTIPLAYER, "Handle", string.Empty);
ChatColor = new IntSetting(iniFile, MULTIPLAYER, "ChatColor", -1);
LANChatColor = new IntSetting(iniFile, MULTIPLAYER, "LANChatColor", -1);
PingUnofficialCnCNetTunnels = new BoolSetting(iniFile, MULTIPLAYER, "PingCustomTunnels", true);
WritePathToRegistry = new BoolSetting(iniFile, OPTIONS, "WriteInstallationPathToRegistry", ClientConfiguration.Instance.UserDefault_WriteInstallationPathToRegistry);
PlaySoundOnGameHosted = new BoolSetting(iniFile, MULTIPLAYER, "PlaySoundOnGameHosted", true);
SkipConnectDialog = new BoolSetting(iniFile, MULTIPLAYER, "SkipConnectDialog", false);
PersistentMode = new BoolSetting(iniFile, MULTIPLAYER, "PersistentMode", false);
AutomaticCnCNetLogin = new BoolSetting(iniFile, MULTIPLAYER, "AutomaticCnCNetLogin", false);
DiscordIntegration = new BoolSetting(iniFile, MULTIPLAYER, "DiscordIntegration", true);
SteamIntegration = new BoolSetting(iniFile, MULTIPLAYER, "SteamIntegration", true);
AllowGameInvitesFromFriendsOnly = new BoolSetting(iniFile, MULTIPLAYER, "AllowGameInvitesFromFriendsOnly", false);
NotifyOnUserListChange = new BoolSetting(iniFile, MULTIPLAYER, "NotifyOnUserListChange", true);
DisablePrivateMessagePopups = new BoolSetting(iniFile, MULTIPLAYER, "DisablePrivateMessagePopups", false);
AllowPrivateMessagesFromState = new IntSetting(iniFile, MULTIPLAYER, "AllowPrivateMessagesFromState", (int)AllowPrivateMessagesFromEnum.All);
EnableMapSharing = new BoolSetting(iniFile, MULTIPLAYER, "EnableMapSharing", true);
AlwaysDisplayTunnelList = new BoolSetting(iniFile, MULTIPLAYER, "AlwaysDisplayTunnelList", false);
MapSortState = new IntSetting(iniFile, MULTIPLAYER, "MapSortState", (int)SortDirection.None);
SearchAllGameModes = new BoolSetting(iniFile, MULTIPLAYER, "SearchAllGameModes", false);
CheckForUpdates = new BoolSetting(iniFile, OPTIONS, "CheckforUpdates", true);
PrivacyPolicyAccepted = new BoolSetting(iniFile, OPTIONS, "PrivacyPolicyAccepted", false);
IsFirstRun = new BoolSetting(iniFile, OPTIONS, "IsFirstRun", true);
CustomComponentsDenied = new BoolSetting(iniFile, OPTIONS, "CustomComponentsDenied", false);
Difficulty = new IntSetting(iniFile, OPTIONS, "Difficulty", 1);
ScrollDelay = new IntSetting(iniFile, OPTIONS, "ScrollDelay", 4);
GameSpeed = new IntSetting(iniFile, OPTIONS, "GameSpeed", 1);
ForceLowestDetailLevel = new BoolSetting(iniFile, VIDEO, "ForceLowestDetailLevel", false);
MinimizeWindowsOnGameStart = new BoolSetting(iniFile, OPTIONS, "MinimizeWindowsOnGameStart", true);
AutoRemoveUnderscoresFromName = new BoolSetting(iniFile, OPTIONS, "AutoRemoveUnderscoresFromName", true);
GenerateTranslationStub = new BoolSetting(iniFile, OPTIONS, nameof(GenerateTranslationStub), false);
GenerateOnlyNewValuesInTranslationStub = new BoolSetting(iniFile, OPTIONS, nameof(GenerateOnlyNewValuesInTranslationStub), false);
SortState = new IntSetting(iniFile, GAME_FILTERS, "SortState", (int)SortDirection.None);
ShowFriendGamesOnly = new BoolSetting(iniFile, GAME_FILTERS, "ShowFriendGamesOnly", DEFAULT_SHOW_FRIENDS_ONLY_GAMES);
HideLockedGames = new BoolSetting(iniFile, GAME_FILTERS, "HideLockedGames", DEFAULT_HIDE_LOCKED_GAMES);
HidePasswordedGames = new BoolSetting(iniFile, GAME_FILTERS, "HidePasswordedGames", DEFAULT_HIDE_PASSWORDED_GAMES);
HideIncompatibleGames = new BoolSetting(iniFile, GAME_FILTERS, "HideIncompatibleGames", DEFAULT_HIDE_INCOMPATIBLE_GAMES);
MaxPlayerCount = new IntRangeSetting(iniFile, GAME_FILTERS, "MaxPlayerCount", DEFAULT_MAX_PLAYER_COUNT, 2, 8);
LoadFavoriteMaps(iniFile);
}
public IniFile SettingsIni { get; private set; }
public event EventHandler SettingsSaved;
/*********/
/* VIDEO */
/*********/
public IntSetting IngameScreenWidth { get; private set; }
public IntSetting IngameScreenHeight { get; private set; }
public StringSetting ClientTheme { get; private set; }
public string ThemeFolderPath => ClientConfiguration.Instance.GetThemePath(ClientTheme);
public StringSetting Translation { get; private set; }
public StringSetting TranslationGameFilesVersion { get; private set; }
public string TranslationFolderPath => SafePath.CombineDirectoryPath(
ClientConfiguration.Instance.TranslationsFolderPath, Translation);
public string TranslationThemeFolderPath => SafePath.CombineDirectoryPath(
ClientConfiguration.Instance.TranslationsFolderPath, Translation,
ClientConfiguration.Instance.GetThemePath(ClientTheme));
public IntSetting DetailLevel { get; private set; }
public StringSetting Renderer { get; private set; }
public BoolSetting WindowedMode { get; private set; }
public BoolSetting BorderlessWindowedMode { get; private set; }
public BoolSetting BackBufferInVRAM { get; private set; }
public IntSetting ClientResolutionX { get; set; }
public IntSetting ClientResolutionY { get; set; }
public BoolSetting BorderlessWindowedClient { get; private set; }
public BoolSetting IntegerScaledClient { get; private set; }
public IntSetting ClientFPS { get; private set; }
public BoolSetting DisplayToggleableExtraTextures { get; private set; }
/*********/
/* AUDIO */
/*********/
public DoubleSetting ScoreVolume { get; private set; }
public DoubleSetting SoundVolume { get; private set; }
public DoubleSetting VoiceVolume { get; private set; }
public BoolSetting IsScoreShuffle { get; private set; }
public DoubleSetting ClientVolume { get; private set; }
public BoolSetting PlayMainMenuMusic { get; private set; }
public BoolSetting StopMusicOnMenu { get; private set; }
public BoolSetting StopGameLobbyMessageAudio { get; private set; }
public BoolSetting MessageSound { get; private set; }
/********/
/* GAME */
/********/
public IntSetting ScrollRate { get; private set; }
public IntSetting DragDistance { get; private set; }
// When > 0, overrides the auto-scaled DragDistance. Allows players to set a fixed pixel threshold regardless of resolution.
public IntSetting CustomDragDistance { get; private set; }
public IntSetting DoubleTapInterval { get; private set; }
public StringSetting Win8CompatMode { get; private set; }
/************************/
/* MULTIPLAYER (CnCNet) */
/************************/
public StringSetting PlayerName { get; private set; }
public IntSetting ChatColor { get; private set; }
public IntSetting LANChatColor { get; private set; }
public BoolSetting PingUnofficialCnCNetTunnels { get; private set; }
public BoolSetting WritePathToRegistry { get; private set; }
public BoolSetting PlaySoundOnGameHosted { get; private set; }
public BoolSetting SkipConnectDialog { get; private set; }
public BoolSetting PersistentMode { get; private set; }
public BoolSetting AutomaticCnCNetLogin { get; private set; }
public BoolSetting DiscordIntegration { get; private set; }
public BoolSetting SteamIntegration { get; private set; }
public BoolSetting AllowGameInvitesFromFriendsOnly { get; private set; }
public BoolSetting NotifyOnUserListChange { get; private set; }
public BoolSetting DisablePrivateMessagePopups { get; private set; }
public IntSetting AllowPrivateMessagesFromState { get; private set; }
public BoolSetting EnableMapSharing { get; private set; }
public BoolSetting AlwaysDisplayTunnelList { get; private set; }
public IntSetting MapSortState { get; private set; }
public BoolSetting SearchAllGameModes { get; private set; }
/*********************/
/* GAME LIST FILTERS */
/*********************/
public IntSetting SortState { get; private set; }
public BoolSetting ShowFriendGamesOnly { get; private set; }
public BoolSetting HideLockedGames { get; private set; }
public BoolSetting HidePasswordedGames { get; private set; }
public BoolSetting HideIncompatibleGames { get; private set; }
public IntRangeSetting MaxPlayerCount { get; private set; }
/************************/
/* GAME OPTION FILTERS */
/************************/
/// <summary>
/// Gets the filter value for a game option (checkbox or dropdown).
/// Returns null for "All" (no filter), or the selected index.
/// For checkboxes: 0 = Off, 1 = On.
/// For dropdowns: 0+ = actual option index.
/// </summary>
public int? GetGameOptionFilterValue(string optionName)
{
var section = SettingsIni.GetSection(GAME_OPTION_FILTERS);
if (section == null || !section.KeyExists(optionName))
return null;
return section.GetIntValue(optionName, 0);
}
/// <summary>
/// Sets the filter value for a game option.
/// null = "All" (no filter), or the selected index.
/// When null, removes the key from INI. Otherwise stores the index value.
/// For checkboxes: 0 = Off, 1 = On.
/// For dropdowns: 0+ = actual option index.
/// </summary>
public void SetGameOptionFilterValue(string optionName, int? value)
{
if (value == null)
SettingsIni.GetSection(GAME_OPTION_FILTERS)?.RemoveKey(optionName);
else
SettingsIni.SetIntValue(GAME_OPTION_FILTERS, optionName, value.Value);
}
/********/
/* MISC */
/********/
public BoolSetting CheckForUpdates { get; private set; }
public BoolSetting PrivacyPolicyAccepted { get; private set; }
public BoolSetting IsFirstRun { get; private set; }
public BoolSetting CustomComponentsDenied { get; private set; }
public IntSetting Difficulty { get; private set; }
public IntSetting GameSpeed { get; private set; }
public IntSetting ScrollDelay { get; private set; }
public BoolSetting ForceLowestDetailLevel { get; private set; }
public BoolSetting MinimizeWindowsOnGameStart { get; private set; }
public BoolSetting AutoRemoveUnderscoresFromName { get; private set; }
public BoolSetting GenerateTranslationStub { get; private set; }
public BoolSetting GenerateOnlyNewValuesInTranslationStub { get; private set; }
public List<string> FavoriteMaps { get; private set; }
public void SetValue(string section, string key, string value)
=> SettingsIni.SetStringValue(section, key, value);
public void SetValue(string section, string key, bool value)
=> SettingsIni.SetBooleanValue(section, key, value);
public void SetValue(string section, string key, int value)
=> SettingsIni.SetIntValue(section, key, value);
public string GetValue(string section, string key, string defaultValue)
=> SettingsIni.GetStringValue(section, key, defaultValue);
public bool GetValue(string section, string key, bool defaultValue)
=> SettingsIni.GetBooleanValue(section, key, defaultValue);
public int GetValue(string section, string key, int defaultValue)
=> SettingsIni.GetIntValue(section, key, defaultValue);
public bool IsGameFollowed(string gameName)
=> SettingsIni.GetBooleanValue("Channels", gameName, false);
public bool ToggleFavoriteMap(string mapSHA1, string gameModeName, bool isFavorite)
{
if (string.IsNullOrEmpty(mapSHA1))
return isFavorite;
string favoriteMapKey = FavoriteMapKey(mapSHA1, gameModeName);
bool isCurrentlyFavorite = FavoriteMaps.Contains(favoriteMapKey);
if (isCurrentlyFavorite)
FavoriteMaps.Remove(favoriteMapKey);
else
FavoriteMaps.Add(favoriteMapKey);
Instance.SaveSettings();
WriteFavoriteMaps();
return !isCurrentlyFavorite;
}
private void LoadFavoriteMaps(IniFile iniFile)
{
FavoriteMaps = new List<string>();
bool legacyMapsLoaded = LoadLegacyFavoriteMaps(iniFile);
var favoriteMapsSection = SettingsIni.GetOrAddSection(FAVORITE_MAPS);
foreach (KeyValuePair<string, string> keyValuePair in favoriteMapsSection.Keys)
FavoriteMaps.Add(keyValuePair.Value);
if (legacyMapsLoaded)
WriteFavoriteMaps();
}
public void WriteFavoriteMaps()
{
var favoriteMapsSection = SettingsIni.GetOrAddSection(FAVORITE_MAPS);
favoriteMapsSection.RemoveAllKeys();
for (int i = 0; i < FavoriteMaps.Count; i++)
favoriteMapsSection.AddKey(i.ToString(), FavoriteMaps[i]);
SaveSettings();
}
/// <summary>
/// Checks if a specified map name and game mode name belongs to the favorite map list.
/// Name-based favorites are migrated to SHA1.
/// </summary>
/// <param name="mapSHA1">The SHA1 hash of the map.</param>
/// <param name="mapName">The name of the map.</param>
/// <param name="gameModeName">The name of the game mode.</param>
public bool IsFavoriteMap(string mapSHA1, string mapName, string gameModeName)
{
// SHA1-based lookup first
if (!string.IsNullOrEmpty(mapSHA1) && FavoriteMaps.Contains(FavoriteMapKey(mapSHA1, gameModeName)))
return true;
// Fallback to name-based
string nameKey = FavoriteMapKey(mapName, gameModeName);
if (FavoriteMaps.Contains(nameKey))
{
// Migrate to SHA1
if (!string.IsNullOrEmpty(mapSHA1))
{
string sha1Key = FavoriteMapKey(mapSHA1, gameModeName);
if (!FavoriteMaps.Contains(sha1Key))
{
FavoriteMaps.Add(sha1Key);
WriteFavoriteMaps();
}
// Note: We don't remove the name-based entry here to allow other maps
// with the same name to also migrate. The name-based entry will be
// cleaned up when all maps with that name have been processed.
}
return true;
}
return false;
}
private string FavoriteMapKey(string identifier, string gameModeName) => $"{identifier}:{gameModeName}";
public void ReloadSettings() => SettingsIni.Reload();
public void ApplyDefaults()
{
ForceLowestDetailLevel.SetDefaultIfNonexistent();
DoubleTapInterval.SetDefaultIfNonexistent();
ScrollDelay.SetDefaultIfNonexistent();
}
public void SaveSettings()
{
Logger.Log("Writing settings INI.");
ApplyDefaults();
// CleanUpLegacySettings();
// RA1 reads MultiplayerScoreVolume instead of ScoreVolume
if (ClientConfiguration.Instance.ClientGameType == ClientType.RA)
SettingsIni.SetDoubleValue(OPTIONS, "MultiplayerScoreVolume", SettingsIni.GetDoubleValue(OPTIONS, "ScoreVolume", 0.7));
SettingsIni.WriteIniFile();
SettingsSaved?.Invoke(this, EventArgs.Empty);
}
public bool IsGameFiltersApplied()
=> ShowFriendGamesOnly.Value != DEFAULT_SHOW_FRIENDS_ONLY_GAMES
|| HideLockedGames.Value != DEFAULT_HIDE_LOCKED_GAMES
|| HidePasswordedGames.Value != DEFAULT_HIDE_PASSWORDED_GAMES
|| HideIncompatibleGames.Value != DEFAULT_HIDE_INCOMPATIBLE_GAMES
|| MaxPlayerCount.Value != DEFAULT_MAX_PLAYER_COUNT
|| HasGameOptionFilters();
public void ResetGameFilters()
{
ShowFriendGamesOnly.Value = DEFAULT_SHOW_FRIENDS_ONLY_GAMES;
HideLockedGames.Value = DEFAULT_HIDE_LOCKED_GAMES;
HideIncompatibleGames.Value = DEFAULT_HIDE_INCOMPATIBLE_GAMES;
HidePasswordedGames.Value = DEFAULT_HIDE_PASSWORDED_GAMES;
MaxPlayerCount.Value = DEFAULT_MAX_PLAYER_COUNT;
ResetGameOptionFilters();
}
/// <summary>
/// Checks if any game option filters are set.
/// </summary>
private bool HasGameOptionFilters()
{
var section = SettingsIni.GetSection(GAME_OPTION_FILTERS);
return section != null && section.Keys.Count > 0;
}
/// <summary>
/// Clears all game option filters.
/// </summary>
private void ResetGameOptionFilters()
{
var section = SettingsIni.GetSection(GAME_OPTION_FILTERS);
section?.RemoveAllKeys();
}
/// <summary>
/// Used to remove old sections/keys to avoid confusion when viewing the ini file directly.
/// </summary>
private void CleanUpLegacySettings()
=> SettingsIni.GetSection(GAME_FILTERS).RemoveKey("SortAlpha");
/// <summary>
/// Previously, favorite maps were stored under a single key under the [Options] section.
/// This attempts to read in that legacy key.
/// </summary>
/// <param name="iniFile"></param>
/// <returns>Whether or not legacy favorites were loaded.</returns>
private bool LoadLegacyFavoriteMaps(IniFile iniFile)
{
var legacyFavoriteMaps = new StringListSetting(iniFile, OPTIONS, FAVORITE_MAPS, new List<string>());
if (!legacyFavoriteMaps.Value?.Any() ?? true)
return false;
foreach (string favoriteMapKey in legacyFavoriteMaps.Value)
FavoriteMaps.Add(favoriteMapKey);
// remove the old key
iniFile.GetSection(OPTIONS).RemoveKey(FAVORITE_MAPS);
return true;
}
}
}
================================================
FILE: ClientCore/Statistics/DataWriter.cs
================================================
using System;
using System.Buffers.Binary;
using System.IO;
using System.Text;
namespace ClientCore.Statistics
{
internal static class DataWriter
{
public static void WriteInt(this Stream stream, int value)
{
byte[] buffer = new byte[sizeof(int)];
BinaryPrimitives.WriteInt32LittleEndian(buffer, value);
stream.Write(buffer, 0, sizeof(int));
}
public static void WriteLong(this Stream stream, long value)
{
byte[] buffer = new byte[sizeof(long)];
BinaryPrimitives.WriteInt64LittleEndian(buffer, value);
stream.Write(buffer, 0, sizeof(long));
}
public static void WriteBool(this Stream stream, bool value)
{
stream.WriteByte(Convert.ToByte(value));
}
public static void WriteString(this Stream stream, string value, int reservedSpace, Encoding encoding = null)
{
if (encoding == null)
encoding = Encoding.Unicode;
byte[] writeBuffer = encoding.GetBytes(value);
if (writeBuffer.Length != reservedSpace)
{
// If the name's byte presentation is not equal to reservedSpace,
// let's resize the array
byte[] temp = writeBuffer;
writeBuffer = new byte[reservedSpace];
for (int j = 0; j < temp.Length && j < writeBuffer.Length; j++)
writeBuffer[j] = temp[j];
}
stream.Write(writeBuffer, 0, writeBuffer.Length);
}
}
}
================================================
FILE: ClientCore/Statistics/GameParsers/LogFileStatisticsParser.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using Rampastring.Tools;
namespace ClientCore.Statistics.GameParsers
{
public class LogFileStatisticsParser : GenericMatchParser
{
public LogFileStatisticsParser(MatchStatistics ms, bool isLoadedGame) : base(ms)
{
this.isLoadedGame = isLoadedGame;
}
private string fileName = "DTA.log";
private string economyString = "Economy"; // RA2/YR do not have economy stat, but a number of built objects.
private bool isLoadedGame;
public void ParseStats(string gamepath, string fileName)
{
this.fileName = fileName;
if (ClientConfiguration.Instance.UseBuiltStatistic) economyString = "Built";
ParseStatistics(gamepath);
}
protected override void ParseStatistics(string gamepath)
{
FileInfo statisticsFileInfo = SafePath.GetFile(gamepath, fileName);
if (!statisticsFileInfo.Exists)
{
Logger.Log("DTAStatisticsParser: Failed to read statistics: the log file does not exist.");
return;
}
Logger.Log("Attempting to read statistics from " + fileName);
try
{
using StreamReader reader = new StreamReader(statisticsFileInfo.OpenRead());
string line;
List<PlayerStatistics> takeoverAIs = new List<PlayerStatistics>();
PlayerStatistics currentPlayer = null;
bool sawCompletion = false;
int numPlayersFound = 0;
while ((line = reader.ReadLine()) != null)
{
if (line.Contains(": Loser"))
{
// Player found, game saw completion
sawCompletion = true;
string playerName = line.Substring(0, line.Length - 7);
currentPlayer = Statistics.GetEmptyPlayerByName(playerName);
if (isLoadedGame && currentPlayer == null)
currentPlayer = Statistics.Players.Find(p => p.Name == playerName);
Logger.Log("Found player " + playerName);
numPlayersFound++;
if (currentPlayer == null && playerName == "Computer" && numPlayersFound <= Statistics.NumberOfHumanPlayers)
{
// The player has been taken over by an AI during the match
Logger.Log("Losing take-over AI found");
takeoverAIs.Add(new PlayerStatistics("Computer", false, true, false, 0, 10, 255, 1));
currentPlayer = takeoverAIs[takeoverAIs.Count - 1];
}
if (currentPlayer != null)
currentPlayer.SawEnd = true;
}
else if (line.Contains(": Winner"))
{
// Player found, game saw completion
sawCompletion = true;
string playerName = line.Substring(0, line.Length - 8);
currentPlayer = Statistics.GetEmptyPlayerByName(playerName);
if (isLoadedGame && currentPlayer == null)
currentPlayer = Statistics.Players.Find(p => p.Name == playerName);
Logger.Log("Found player " + playerName);
numPlayersFound++;
if (currentPlayer == null && playerName == "Computer" && numPlayersFound <= Statistics.NumberOfHumanPlayers)
{
// The player has been taken over by an AI during the match
Logger.Log("Winning take-over AI found");
takeoverAIs.Add(new PlayerStatistics("Computer", false, true, false, 0, 10, 255, 1));
currentPlayer = takeoverAIs[takeoverAIs.Count - 1];
}
if (currentPlayer != null)
{
currentPlayer.SawEnd = true;
currentPlayer.Won = true;
}
}
else if (line.Contains("Game loop finished. Average FPS"))
{
// Game loop finished. Average FPS = <integer>
string fpsString = line.Substring(34);
Statistics.AverageFPS = Int32.Parse(fpsString);
}
if (currentPlayer == null || line.Length < 1)
continue;
line = line.Substring(1);
if (line.StartsWith("Lost = "))
currentPlayer.Losses = Int32.Parse(line.Substring(7));
else if (line.StartsWith("Kills = "))
currentPlayer.Kills = Int32.Parse(line.Substring(8));
else if (line.StartsWith("Score = "))
currentPlayer.Score = Int32.Parse(line.Substring(8));
else if (line.StartsWith(economyString + " = "))
currentPlayer.Economy = Int32.Parse(line.Substring(economyString.Length + 2));
}
// Check empty players for take-over by AIs
if (takeoverAIs.Count == 1)
{
PlayerStatistics ai = takeoverAIs[0];
PlayerStatistics ps = Statistics.GetFirstEmptyPlayer();
ps.Losses = ai.Losses;
ps.Kills = ai.Kills;
ps.Score = ai.Score;
ps.Economy = ai.Economy;
}
else if (takeoverAIs.Count > 1)
{
// If there's multiple take-over AI players, we have no way of figuring out
// which AI represents which player, so let's just add the AIs into the player list
// (then the user viewing the statistics can figure it out themselves)
for (int i = 0; i < takeoverAIs.Count; i++)
{
takeoverAIs[i].SawEnd = false;
Statistics.AddPlayer(takeoverAIs[i]);
}
}
Statistics.SawCompletion = sawCompletion;
}
catch (Exception ex)
{
Logger.Log("DTAStatisticsParser: Error parsing statistics from match! Message: " + ex.ToString());
}
}
}
}
================================================
FILE: ClientCore/Statistics/GenericMatchParser.cs
================================================
namespace ClientCore.Statistics
{
public abstract class GenericMatchParser
{
public MatchStatistics Statistics {get; set;}
public GenericMatchParser(MatchStatistics ms)
{
Statistics = ms;
}
protected abstract void ParseStatistics(string gamepath);
}
}
================================================
FILE: ClientCore/Statistics/GenericStatisticsManager.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
namespace ClientCore.Statistics
{
public abstract class GenericStatisticsManager
{
protected List<MatchStatistics> Statistics = new List<MatchStatistics>();
protected static string GetStatDatabaseVersion(string scorePath)
{
if (!File.Exists(scorePath))
{
return null;
}
using (StreamReader reader = new StreamReader(scorePath))
{
char[] versionBuffer = new char[4];
reader.Read(versionBuffer, 0, versionBuffer.Length);
String s = new String(versionBuffer);
return s;
}
}
public abstract void ReadStatistics(string gamePath);
public int GetMatchCount() { return Statistics.Count; }
public MatchStatistics GetMatchByIndex(int index)
{
return Statistics[index];
}
}
}
================================================
FILE: ClientCore/Statistics/MatchStatistics.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using ClientCore.Statistics.GameParsers;
using Rampastring.Tools;
namespace ClientCore.Statistics
{
public class MatchStatistics
{
public MatchStatistics() { }
public MatchStatistics(string gameVersion, int gameId, string mapName, string gameMode, int numHumans, bool mapIsCoop = false)
{
GameVersion = gameVersion;
GameID = gameId;
DateAndTime = DateTime.Now;
MapName = mapName;
GameMode = gameMode;
NumberOfHumanPlayers = numHumans;
MapIsCoop = mapIsCoop;
}
public List<PlayerStatistics> Players = new List<PlayerStatistics>();
public int LengthInSeconds { get; set; }
public DateTime DateAndTime { get; set; }
public string GameVersion { get; set; }
public string MapName { get; set; }
public string GameMode { get; set; }
public bool SawCompletion { get; set; }
public int NumberOfHumanPlayers { get; set; }
public int AverageFPS { get; set; }
public int GameID { get; set; }
public bool MapIsCoop { get; set; }
public bool IsValidForStar { get; set; } = true;
public void AddPlayer(string name, bool isLocal, bool isAI, bool isSpectator,
int side, int team, int color, int aiLevel)
{
PlayerStatistics ps = new PlayerStatistics(name, isLocal, isAI, isSpectator,
side, team, color, aiLevel);
Players.Add(ps);
}
public void AddPlayer(PlayerStatistics ps)
{
Players.Add(ps);
}
public void ParseStatistics(string gamePath, string gameName, bool isLoadedGame)
{
Logger.Log("Parsing game statistics.");
LengthInSeconds = (int)(DateTime.Now - DateAndTime).TotalSeconds;
var parser = new LogFileStatisticsParser(this, isLoadedGame);
parser.ParseStats(gamePath, ClientConfiguration.Instance.StatisticsLogFileName);
}
public PlayerStatistics GetEmptyPlayerByName(string playerName)
{
foreach (PlayerStatistics ps in Players)
{
if (ps.Name == playerName && ps.Losses == 0 && ps.Score == 0)
return ps;
}
return null;
}
public PlayerStatistics GetFirstEmptyPlayer()
{
foreach (PlayerStatistics ps in Players)
{
if (ps.Losses == 0 && ps.Score == 0)
return ps;
}
return null;
}
public int GetPlayerCount()
{
return Players.Count;
}
public PlayerStatistics GetPlayer(int index)
{
return Players[index];
}
public void Write(Stream stream)
{
// Game length
stream.WriteInt(LengthInSeconds);
// Game version, 8 bytes, ASCII
stream.WriteString(GameVersion, 8, Encoding.ASCII);
// Date and time, 8 bytes
stream.WriteLong(DateAndTime.ToBinary());
// SawCompletion, 1 byte
stream.WriteBool(SawCompletion);
// Number of players, 1 byte
stream.WriteByte(Convert.ToByte(GetPlayerCount()));
// Average FPS, 4 bytes
stream.WriteInt(AverageFPS);
// Map name, 128 bytes (64 chars), Unicode
stream.WriteString(MapName, 128);
// Game mode, 64 bytes (32 chars), Unicode
stream.WriteString(GameMode, 64);
// Unique game ID, 4 bytes
stream.WriteInt(GameID);
// Whether game options were valid for earning a star, 1 byte
stream.WriteBool(IsValidForStar);
// Write player info
for (int i = 0; i < GetPlayerCount(); i++)
{
PlayerStatistics ps = GetPlayer(i);
ps.Write(stream);
}
}
}
}
================================================
FILE: ClientCore/Statistics/PlayerStatistics.cs
================================================
using System;
using System.IO;
namespace ClientCore.Statistics
{
public class PlayerStatistics
{
public PlayerStatistics() { }
public PlayerStatistics(string name, bool isLocal, bool isAi, bool isSpectator,
int side, int team, int color, int aiLevel)
{
Name = name;
IsLocalPlayer = isLocal;
IsAI = isAi;
WasSpectator = isSpectator;
Side = side;
Team = team;
Color = color;
AILevel = aiLevel;
}
public string Name { get; set; }
public int Kills { get; set; }
public int Losses { get; set; }
public int Economy { get; set; }
public int Score { get; set; }
public int Side { get; set; }
public int Team { get; set; }
public int AILevel { get; set; }
public bool SawEnd { get; set; }
public bool WasSpectator { get; set; }
public bool Won { get; set; }
public bool IsLocalPlayer { get; set; }
public bool IsAI { get; set; }
public int Color { get; set; } = 255;
public void Write(Stream stream)
{
stream.WriteInt(Economy);
// 1 byte for IsAI
stream.WriteBool(IsAI);
// 1 byte for IsLocalPlayer
stream.WriteBool(IsLocalPlayer);
// 4 bytes for kills
stream.WriteInt(Kills);
// 4 bytes for losses
stream.WriteInt(Losses);
// Name takes 32 bytes
stream.WriteString(Name, 32);
// 1 byte for SawEnd
stream.WriteBool(SawEnd);
// 4 bytes for Score
stream.WriteInt(Score);
// 1 byte for Side
stream.WriteByte(Convert.ToByte(Side));
// 1 byte for Team
stream.WriteByte(Convert.ToByte(Team));
// 1 byte color Color
stream.WriteByte(Convert.ToByte(Color));
// 1 byte for WasSpectator
stream.WriteBool(WasSpectator);
// 1 byte for Won
stream.WriteBool(Won);
// 1 byte for AI level
stream.WriteByte(Convert.ToByte(AILevel));
}
}
}
================================================
FILE: ClientCore/Statistics/StatisticsManager.cs
================================================
using System;
using System.Buffers.Binary;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;
using Rampastring.Tools;
using System.Diagnostics;
namespace ClientCore.Statistics
{
public class StatisticsManager : GenericStatisticsManager
{
private const string VERSION = "1.06";
private const string SCORE_FILE_PATH = "Client/dscore.dat";
private const string OLD_SCORE_FILE_PATH = "dscore.dat";
private static StatisticsManager _instance;
private bool _statisticsInitialized = false;
public event EventHandler GameAdded;
public static StatisticsManager Instance
{
get
{
if (_instance == null)
_instance = new StatisticsManager();
return _instance;
}
}
public override void ReadStatistics(string gamePath)
{
FileInfo scoreFileInfo = SafePath.GetFile(gamePath, SCORE_FILE_PATH);
gitextract_dgog0ci0/ ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug-report.yml │ │ ├── config.yml │ │ └── feature-request.yml │ ├── copilot-coding-agent-setup.md │ ├── copilot-instructions.md │ └── workflows/ │ ├── build.yml │ ├── copilot-setup-steps.yml │ ├── pr-build-comment.yml │ └── release-build.yml ├── .gitignore ├── .gitmodules ├── AdditionalFiles/ │ ├── UpdateServerScripts/ │ │ ├── preupdateexec │ │ └── updateexec │ └── VersionFileWriter/ │ └── VersionConfig.ini ├── ClientCore/ │ ├── CCIniFile.cs │ ├── ClientConfiguration.cs │ ├── ClientCore.csproj │ ├── Enums/ │ │ ├── AllowPrivateMessagesFromEnum.cs │ │ ├── ClientType.cs │ │ ├── ClientTypeHelper.cs │ │ └── SortDirection.cs │ ├── Extensions/ │ │ ├── ArrayExtensions.cs │ │ ├── EnumExtensions.cs │ │ ├── EnumerableExtensions.cs │ │ ├── FileExtensions.cs │ │ ├── IniFileExtensions.cs │ │ └── StringExtensions.cs │ ├── I18N/ │ │ ├── Translation.cs │ │ └── TranslationGameFile.cs │ ├── INIProcessing/ │ │ ├── IniPreprocessInfoStore.cs │ │ ├── IniPreprocessor.cs │ │ └── PreprocessorBackgroundTask.cs │ ├── LoadingScreenController.cs │ ├── OSVersion.cs │ ├── PlatformShim/ │ │ └── EncodingExt.cs │ ├── ProcessLauncher.cs │ ├── ProfanityFilter.cs │ ├── ProgramConstants.cs │ ├── SavedGameManager.cs │ ├── Settings/ │ │ ├── BoolSetting.cs │ │ ├── DoubleSetting.cs │ │ ├── IIniSetting.cs │ │ ├── INISetting.cs │ │ ├── IntRangeSetting.cs │ │ ├── IntSetting.cs │ │ ├── StringListSetting.cs │ │ ├── StringSetting.cs │ │ └── UserINISettings.cs │ └── Statistics/ │ ├── DataWriter.cs │ ├── GameParsers/ │ │ └── LogFileStatisticsParser.cs │ ├── GenericMatchParser.cs │ ├── GenericStatisticsManager.cs │ ├── MatchStatistics.cs │ ├── PlayerStatistics.cs │ └── StatisticsManager.cs ├── ClientGUI/ │ ├── ClientGUI.csproj │ ├── ClientGUICreator.cs │ ├── DarkeningPanel.cs │ ├── GameProcessLogic.cs │ ├── HotkeyConfigurationWindow.cs │ ├── ICompositeControl.cs │ ├── IME/ │ │ ├── DummyIMEHandler.cs │ │ ├── IMEHandler.cs │ │ ├── SdlIMEHandler.cs │ │ └── WinFormsIMEHandler.cs │ ├── INIConfigException.cs │ ├── INItializableWindow.cs │ ├── IToolTipContainer.cs │ ├── Parser.cs │ ├── ScreenResolution.cs │ ├── Settings/ │ │ ├── FileSettingCheckBox.cs │ │ ├── FileSettingDropDown.cs │ │ ├── FileSourceDestinationInfo.cs │ │ ├── IFileSetting.cs │ │ ├── IUserSetting.cs │ │ ├── SettingCheckBox.cs │ │ ├── SettingCheckBoxBase.cs │ │ ├── SettingDropDown.cs │ │ └── SettingDropDownBase.cs │ ├── ToolTip.cs │ ├── TranslationGUIExtensions.cs │ ├── TranslationINIParser.cs │ ├── UIDesignConstants.cs │ ├── XNAChatTextBox.cs │ ├── XNAClientButton.cs │ ├── XNAClientCheckBox.cs │ ├── XNAClientColorDropDown.cs │ ├── XNAClientDropDown.cs │ ├── XNAClientLinkLabel.cs │ ├── XNAClientPreferredItemDropDown.cs │ ├── XNAClientStateButton.cs │ ├── XNAClientTabControl.cs │ ├── XNAClientToggleButton.cs │ ├── XNAExtraPanel.cs │ ├── XNALinkButton.cs │ ├── XNAMessageBox.cs │ ├── XNAOptionsPanel.cs │ ├── XNAPlayerSlotIndicator.cs │ ├── XNAWindow.cs │ └── XNAWindowBase.cs ├── ClientUpdater/ │ ├── ClientUpdater.csproj │ ├── Compression/ │ │ ├── Common/ │ │ │ ├── CRC.cs │ │ │ ├── CommandLineParser.cs │ │ │ ├── InBuffer.cs │ │ │ └── OutBuffer.cs │ │ ├── CompressionHelper.cs │ │ ├── ICoder.cs │ │ ├── LZ/ │ │ │ ├── IMatchFinder.cs │ │ │ ├── LzBinTree.cs │ │ │ ├── LzInWindow.cs │ │ │ └── LzOutWindow.cs │ │ ├── LZMA/ │ │ │ ├── LzmaBase.cs │ │ │ ├── LzmaDecoder.cs │ │ │ └── LzmaEncoder.cs │ │ └── RangeCoder/ │ │ ├── RangeCoder.cs │ │ ├── RangeCoderBit.cs │ │ └── RangeCoderBitTree.cs │ ├── CustomComponent.cs │ ├── UpdateMirror.cs │ ├── Updater.cs │ ├── UpdaterFileInfo.cs │ └── VersionState.cs ├── CommonAssemblies.txt ├── CommonAssembliesNetFx.txt ├── Contributing.md ├── DXClient.slnx ├── DXMainClient/ │ ├── AdminRestarter.cs │ ├── DXGUI/ │ │ ├── Campaign/ │ │ │ ├── CampaignCheckBox.cs │ │ │ ├── CampaignDropDown.cs │ │ │ ├── CampaignSelector.cs │ │ │ ├── CampaignTagSelector.cs │ │ │ └── CheaterWindow.cs │ │ ├── GameClass.cs │ │ ├── Generic/ │ │ │ ├── DropDownDataWriteMode.cs │ │ │ ├── ExtrasWindow.cs │ │ │ ├── GameInProgressWindow.cs │ │ │ ├── GameLoadingWindow.cs │ │ │ ├── GameSessionCheckBox.cs │ │ │ ├── GameSessionDropDown.cs │ │ │ ├── LoadingScreen.cs │ │ │ ├── MainMenu.cs │ │ │ ├── ManualUpdateQueryWindow.cs │ │ │ ├── OptionPanels/ │ │ │ │ ├── AudioOptionsPanel.cs │ │ │ │ ├── CnCNetOptionsPanel.cs │ │ │ │ ├── ComponentsPanel.cs │ │ │ │ ├── DisplayOptionsPanel.cs │ │ │ │ ├── GameOptionsPanel.cs │ │ │ │ └── UpdaterOptionsPanel.cs │ │ │ ├── OptionsWindow.cs │ │ │ ├── PrivacyNotification.cs │ │ │ ├── StatisticsWindow.cs │ │ │ ├── TopBar.cs │ │ │ ├── URLHandler.cs │ │ │ ├── UpdateQueryWindow.cs │ │ │ └── UpdateWindow.cs │ │ ├── IGameSessionSetting.cs │ │ ├── IMessageView.cs │ │ ├── ISwitchable.cs │ │ └── Multiplayer/ │ │ ├── ChatListBox.cs │ │ ├── CnCNet/ │ │ │ ├── ChoiceNotificationBox.cs │ │ │ ├── CnCNetGameLoadingLobby.cs │ │ │ ├── CnCNetLobby.cs │ │ │ ├── CnCNetLoginWindow.cs │ │ │ ├── GameCreationEventArgs.cs │ │ │ ├── GameCreationWindow.cs │ │ │ ├── GlobalContextMenu.cs │ │ │ ├── GlobalContextMenuData.cs │ │ │ ├── LoadOrSaveGameOptionPresetWindow.cs │ │ │ ├── MapSharingConfirmationPanel.cs │ │ │ ├── PasswordRequestWindow.cs │ │ │ ├── PrivateMessageNotificationBox.cs │ │ │ ├── PrivateMessagingPanel.cs │ │ │ ├── PrivateMessagingWindow.cs │ │ │ ├── RecentPlayerTable.cs │ │ │ ├── RecentPlayerTableRightClickEventArgs.cs │ │ │ ├── TunnelListBox.cs │ │ │ └── TunnelSelectionWindow.cs │ │ ├── GameFiltersPanel.cs │ │ ├── GameInformationIconOnlyPanel.cs │ │ ├── GameInformationIconPanel.cs │ │ ├── GameInformationPanel.cs │ │ ├── GameListBox.cs │ │ ├── GameLoadingLobbyBase.cs │ │ ├── GameLobby/ │ │ │ ├── ChatBoxCommand.cs │ │ │ ├── CnCNetGameLobby.cs │ │ │ ├── CommandHandlers/ │ │ │ │ ├── CommandHandlerBase.cs │ │ │ │ ├── IntCommandHandler.cs │ │ │ │ ├── IntNotificationHandler.cs │ │ │ │ ├── NoParamCommandHandler.cs │ │ │ │ ├── NotificationHandler.cs │ │ │ │ └── StringCommandHandler.cs │ │ │ ├── CoopBriefingBox.cs │ │ │ ├── GameHostInactiveChecker.cs │ │ │ ├── GameLaunchButton.cs │ │ │ ├── GameLeftEventArgs.cs │ │ │ ├── GameLobbyBase.cs │ │ │ ├── GameLobbyCheckBox.cs │ │ │ ├── GameLobbyDropDown.cs │ │ │ ├── GameLobbySettingsEventArgs.cs │ │ │ ├── GameLobbySettingsWindow.cs │ │ │ ├── GameModeMapFilter.cs │ │ │ ├── GameType.cs │ │ │ ├── LANGameLobby.cs │ │ │ ├── MapCodeHelper.cs │ │ │ ├── MapPreviewBox.cs │ │ │ ├── MultiplayerGameLobby.cs │ │ │ ├── PlayerLocationIndicator.cs │ │ │ └── SkirmishLobby.cs │ │ ├── LANGameCreationWindow.cs │ │ ├── LANGameLoadingLobby.cs │ │ ├── LANLobby.cs │ │ ├── LANLobbyBroadcastManager.cs │ │ ├── LANLobbyBroadcastMessageReceivedEventArgs.cs │ │ ├── LANMessageDeduplicator.cs │ │ ├── LANPlayerManager.cs │ │ ├── PlayerExtraOptionsPanel.cs │ │ ├── PlayerListBox.cs │ │ ├── TeamStartMappingPanel.cs │ │ └── TeamStartMappingsPanel.cs │ ├── DXMainClient.csproj │ ├── Domain/ │ │ ├── CustomMissionHelper.cs │ │ ├── DirectDrawCompatibilityChecker.cs │ │ ├── DirectDrawWrapper.cs │ │ ├── DirectDrawWrapperManager.cs │ │ ├── DiscordHandler.cs │ │ ├── FinalSunSettings.cs │ │ ├── MainClientConstants.cs │ │ ├── Mission.cs │ │ ├── Multiplayer/ │ │ │ ├── AllianceHolder.cs │ │ │ ├── CacheManagerBase.cs │ │ │ ├── CnCNet/ │ │ │ │ ├── CnCNetGame.cs │ │ │ │ ├── CnCNetPlayerCountTask.cs │ │ │ │ ├── CnCNetTunnel.cs │ │ │ │ ├── CustomCnCNetGame.cs │ │ │ │ ├── DefaultCnCNetGame.cs │ │ │ │ ├── GameCollection.cs │ │ │ │ ├── HostedCnCNetGame.cs │ │ │ │ ├── MapEventArgs.cs │ │ │ │ ├── MapSharer.cs │ │ │ │ ├── NameValidator.cs │ │ │ │ ├── SHA1EventArgs.cs │ │ │ │ ├── TimedHttpClient.cs │ │ │ │ └── TunnelHandler.cs │ │ │ ├── CoopHouseInfo.cs │ │ │ ├── CoopMapInfo.cs │ │ │ ├── CustomMapCache.cs │ │ │ ├── GameMode.cs │ │ │ ├── GameModeMap.cs │ │ │ ├── GameModeMapBase.cs │ │ │ ├── GameModeMapCollection.cs │ │ │ ├── GameOptionPresets.cs │ │ │ ├── GenericHostedGame.cs │ │ │ ├── ICacheManager.cs │ │ │ ├── IGameModeMap.cs │ │ │ ├── IMapPreviewCacheManager.cs │ │ │ ├── IReadOnlyGameModeMapCollection.cs │ │ │ ├── LAN/ │ │ │ │ ├── ClientIntCommandHandler.cs │ │ │ │ ├── ClientNoParamCommandHandler.cs │ │ │ │ ├── ClientStringCommandHandler.cs │ │ │ │ ├── HostedLANGame.cs │ │ │ │ ├── LANClientCommandHandler.cs │ │ │ │ ├── LANColor.cs │ │ │ │ ├── LANLobbyUser.cs │ │ │ │ ├── LANPlayerInfo.cs │ │ │ │ ├── LANServerCommandHandler.cs │ │ │ │ ├── NetworkMessageEventArgs.cs │ │ │ │ ├── ServerNoParamCommandHandler.cs │ │ │ │ └── ServerStringCommandHandler.cs │ │ │ ├── Map.cs │ │ │ ├── MapChangeEventArgs.cs │ │ │ ├── MapFileEventArgs.cs │ │ │ ├── MapFileWatcher.cs │ │ │ ├── MapLoader.cs │ │ │ ├── MapPreviewCacheManager.cs │ │ │ ├── MapPreviewExtractor.cs │ │ │ ├── MultiplayerColor.cs │ │ │ ├── PlayerExtraOptions.cs │ │ │ ├── PlayerHouseInfo.cs │ │ │ ├── PlayerInfo.cs │ │ │ ├── SavedGamePlayer.cs │ │ │ ├── TeamStartMapping.cs │ │ │ └── TeamStartMappingPreset.cs │ │ └── SavedGame.cs │ ├── Online/ │ │ ├── Channel.cs │ │ ├── ChannelUser.cs │ │ ├── ChatMessage.cs │ │ ├── CnCNetGameCheck.cs │ │ ├── CnCNetManager.cs │ │ ├── CnCNetUserData.cs │ │ ├── Connection.cs │ │ ├── EventArguments/ │ │ │ ├── AttemptedServerEventArgs.cs │ │ │ ├── CTCPEventArgs.cs │ │ │ ├── ChannelCTCPEventArgs.cs │ │ │ ├── ChannelEventArgs.cs │ │ │ ├── ChannelModeEventArgs.cs │ │ │ ├── ChannelTopicEventArgs.cs │ │ │ ├── CnCNetPrivateMessageEventArgs.cs │ │ │ ├── ConnectionLostEventArgs.cs │ │ │ ├── FavoriteMapEventArgs.cs │ │ │ ├── GameOptionPresetEventArgs.cs │ │ │ ├── JoinUserEventArgs.cs │ │ │ ├── KickEventArgs.cs │ │ │ ├── MultiplayerNameRightClickedEventArgs.cs │ │ │ ├── PrivateCTCPEventArgs.cs │ │ │ ├── PrivateMessageEventArgs.cs │ │ │ ├── ServerMessageEventArgs.cs │ │ │ ├── UnreadMessageCountEventArgs.cs │ │ │ ├── UserAwayEventArgs.cs │ │ │ ├── UserListEventArgs.cs │ │ │ └── WhoEventArgs.cs │ │ ├── FileHashCalculator.cs │ │ ├── IConnectionManager.cs │ │ ├── IRCColor.cs │ │ ├── IRCUser.cs │ │ ├── IUserCollection.cs │ │ ├── PrivateMessageHandler.cs │ │ ├── PrivateMessageUser.cs │ │ ├── QueuedMessage.cs │ │ ├── QueuedMessageType.cs │ │ ├── RecentPlayer.cs │ │ ├── Server.cs │ │ ├── SortedUserCollection.cs │ │ └── UnsortedUserCollection.cs │ ├── PreStartup.cs │ ├── Program.cs │ ├── Properties/ │ │ └── launchSettings.json │ ├── Resources/ │ │ ├── ClientDefinitions.ini │ │ ├── DTA/ │ │ │ ├── CampaignSelector.ini │ │ │ ├── CheaterScreen.ini │ │ │ ├── CnCNetGameLobby.ini │ │ │ ├── CnCNetLobby.ini │ │ │ ├── Compatibility/ │ │ │ │ ├── Configs/ │ │ │ │ │ ├── aqrit.cfg │ │ │ │ │ ├── cnc-ddraw.ini │ │ │ │ │ ├── ddraw-auto.ini │ │ │ │ │ ├── ddraw-gdi.ini │ │ │ │ │ ├── ddraw-opengl.ini │ │ │ │ │ └── dxwnd.ini │ │ │ │ └── Unix/ │ │ │ │ ├── wine-game.bat │ │ │ │ ├── wine-game.sh │ │ │ │ ├── wine-mapedit.bat │ │ │ │ └── wine-mapedit.sh │ │ │ ├── Default Theme/ │ │ │ │ ├── DTACnCNetClient.ini │ │ │ │ ├── MainMenuTheme.bak │ │ │ │ ├── MainMenuTheme.ogg │ │ │ │ ├── MainMenuTheme.wma │ │ │ │ └── MainMenuTheme.xnb │ │ │ ├── ExtrasWindow.ini │ │ │ ├── FScompatfix.sdb │ │ │ ├── GameCollectionConfig.ini │ │ │ ├── GameLobbyBase.ini │ │ │ ├── GameOptions.ini │ │ │ ├── GenericWindow.ini │ │ │ ├── KeyboardCommands.ini │ │ │ ├── LANGameLobby.ini │ │ │ ├── LANLobby.ini │ │ │ ├── LoadingScreen.ini │ │ │ ├── MainMenu.ini │ │ │ ├── MultiplayerGameLobby.ini │ │ │ ├── OptionsWindow.ini │ │ │ ├── ReShade Files/ │ │ │ │ └── ReShade.ini │ │ │ ├── Renderers.ini │ │ │ ├── SkirmishLobby.ini │ │ │ ├── SpriteFont0.xnb │ │ │ ├── SpriteFont1.xnb │ │ │ ├── SpriteFont2.xnb │ │ │ ├── SpriteFont3.xnb │ │ │ ├── SpriteFont4.xnb │ │ │ ├── StatisticsWindow.ini │ │ │ ├── UpdaterConfig.ini │ │ │ ├── UserDefaults.ini │ │ │ ├── ZLIB.License.txt │ │ │ ├── ZLIB.Ms-PL.txt │ │ │ ├── arrow.cur │ │ │ ├── cnc-ddraw.ini │ │ │ ├── compatfix.sdb │ │ │ ├── cursor.cur │ │ │ ├── ddrawcompat.ini │ │ │ ├── l480s01.pcx │ │ │ ├── l480s02.pcx │ │ │ ├── l480s11.pcx │ │ │ ├── l480s12.pcx │ │ │ ├── l600s01.pcx │ │ │ ├── l600s02.pcx │ │ │ ├── l600s11.pcx │ │ │ ├── l600s12.pcx │ │ │ ├── qres license.txt │ │ │ ├── ts-ddraw-gdi.ini │ │ │ └── ts-ddraw.ini │ │ ├── INI/ │ │ │ ├── Base/ │ │ │ │ └── Instructions.txt │ │ │ ├── Battle.ini │ │ │ ├── Default.ini │ │ │ ├── FSR.ini │ │ │ ├── Game Options/ │ │ │ │ ├── Auto Deploy MCV.ini │ │ │ │ ├── Disable Super Weapons.ini │ │ │ │ ├── Disable Unit Queueing.ini │ │ │ │ ├── Disable Visceroids.ini │ │ │ │ ├── Extreme AI.ini │ │ │ │ ├── Harder AI.ini │ │ │ │ ├── Immune Harvesters.ini │ │ │ │ ├── Infinite Tiberium.ini │ │ │ │ ├── Ingame Allying.ini │ │ │ │ ├── Instant Harvester Unload.ini │ │ │ │ ├── Naval.ini │ │ │ │ ├── No Baddy Crates.ini │ │ │ │ ├── No Crew.ini │ │ │ │ ├── No Silos.ini │ │ │ │ ├── Replace Tiberium With Ore.ini │ │ │ │ ├── Reveal Shroud.ini │ │ │ │ ├── Shroud Regrows.ini │ │ │ │ ├── Starting Units.ini │ │ │ │ ├── Storms.ini │ │ │ │ ├── Turbo Vehicles.ini │ │ │ │ ├── Turtling AI.ini │ │ │ │ ├── Uncrushable Infantry.ini │ │ │ │ └── Veteran Balance Patch.ini │ │ │ ├── MPMaps.ini │ │ │ ├── Map Code/ │ │ │ │ ├── Difficulty Easy.ini │ │ │ │ ├── Difficulty Hard.ini │ │ │ │ ├── Difficulty Medium.ini │ │ │ │ ├── King of the Hill.ini │ │ │ │ ├── Naval Only AI.ini │ │ │ │ ├── Scavenger.ini │ │ │ │ └── Survivor.ini │ │ │ ├── MapSel.ini │ │ │ ├── MapSel01.ini │ │ │ ├── Menu.ini │ │ │ ├── ai.ini │ │ │ ├── aifs.ini │ │ │ ├── art.ini │ │ │ ├── artfs.ini │ │ │ ├── day.ini │ │ │ ├── dusk.ini │ │ │ ├── firestrm.ini │ │ │ ├── ion.ini │ │ │ ├── keyboard.ini │ │ │ ├── morning.ini │ │ │ ├── night.ini │ │ │ ├── rules.ini │ │ │ ├── snow.ini │ │ │ ├── sound.ini │ │ │ ├── sound01.ini │ │ │ ├── temperat.ini │ │ │ ├── theme.ini │ │ │ └── tutorial.ini │ │ ├── Map Editor/ │ │ │ └── test.txt │ │ ├── Maps/ │ │ │ └── Custom/ │ │ │ └── custom maps.txt │ │ └── SUN.ini │ ├── Startup.cs │ ├── app.PerMonitorV2.manifest │ └── app.SystemAware.manifest ├── Directory.Build.props ├── Directory.Build.targets ├── Directory.Packages.props ├── Docs/ │ ├── Build.md │ ├── DiscordRichPresence.md │ ├── HowToUpdate.md │ ├── INISystem.md │ ├── Migration-INI.md │ ├── Migration.md │ ├── NewFeatures.md │ ├── Translation.md │ └── Updater.md ├── GitVersion.yml ├── LICENSE ├── NuGet.config ├── README.md ├── References/ │ ├── .gitkeep │ └── Facepunch.Steamworks.2.4.1.nupkg ├── Scripts/ │ ├── Build.bat │ ├── ClearBinAndObjDirs.bat │ ├── Get-CommonAssemblyList.ps1 │ ├── README.md │ └── build.ps1 ├── SecondStageUpdater/ │ ├── Program.cs │ └── SecondStageUpdater.csproj ├── TranslationNotifierGenerator/ │ ├── StringExtensions.cs │ ├── TranslationNotifierGenerator.cs │ └── TranslationNotifierGenerator.csproj └── global.json
Showing preview only (293K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2996 symbols across 307 files)
FILE: ClientCore/CCIniFile.cs
class CCIniFile (line 6) | public class CCIniFile : IniFile
method CCIniFile (line 8) | public CCIniFile(string path) : base(path)
method ApplyBaseIni (line 37) | protected override void ApplyBaseIni()
method ApplyBasedOnIni (line 48) | private void ApplyBasedOnIni(string basedOn)
FILE: ClientCore/ClientConfiguration.cs
class ClientConfiguration (line 15) | public class ClientConfiguration
method ClientConfiguration (line 37) | protected ClientConfiguration()
method RefreshSettings (line 86) | public void RefreshSettings()
method GetMainMenuMusicName (line 95) | private string GetMainMenuMusicName()
method GetParserConstants (line 154) | public IniSection GetParserConstants() => DTACnCNetClient_ini.GetSecti...
method GetThemeInfoFromIndex (line 284) | public (string Name, string Path) GetThemeInfoFromIndex(int themeIndex...
method GetThemePath (line 292) | public string GetThemePath(string themeName)
method RefreshTranslationGameFiles (line 320) | public void RefreshTranslationGameFiles()
method ParseTranslationGameFiles (line 330) | private List<TranslationGameFile> ParseTranslationGameFiles()
method GetGameExecutableName (line 401) | public string GetGameExecutableName()
method GetCompatibilityCheckExecutables (line 410) | public string[] GetCompatibilityCheckExecutables()
method GetIRCServers (line 526) | public List<string> GetIRCServers()
method GetCustomMissionSupplementFiles (line 543) | public List<(string extension, string copyAs)> GetCustomMissionSupplem...
method GetOperatingSystemVersion (line 578) | public OSVersion GetOperatingSystemVersion()
class ClientConfigurationException (line 634) | public class ClientConfigurationException : Exception
method ClientConfigurationException (line 636) | public ClientConfigurationException(string message) : base(message)
FILE: ClientCore/Enums/AllowPrivateMessagesFromEnum.cs
type AllowPrivateMessagesFromEnum (line 3) | public enum AllowPrivateMessagesFromEnum
FILE: ClientCore/Enums/ClientType.cs
type ClientType (line 3) | public enum ClientType
FILE: ClientCore/Enums/ClientTypeHelper.cs
class ClientTypeHelper (line 7) | public static class ClientTypeHelper
method FromString (line 9) | public static ClientType FromString(string value) => value switch
FILE: ClientCore/Enums/SortDirection.cs
type SortDirection (line 3) | public enum SortDirection
FILE: ClientCore/Extensions/ArrayExtensions.cs
class ArrayExtensions (line 6) | public static class ArrayExtensions
method Deconstruct (line 8) | public static void Deconstruct<T>(this T[] @this, out T a0)
method AsTuple2 (line 16) | public static (T, T) AsTuple2<T>(this T[] @this)
method Deconstruct (line 24) | public static void Deconstruct<T>(this T[] @this, out T a0, out T a1)
method AsTuple3 (line 27) | public static (T, T, T) AsTuple3<T>(this T[] @this)
method Deconstruct (line 35) | public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, ...
method AsTuple4 (line 38) | public static (T, T, T, T) AsTuple4<T>(this T[] @this)
method Deconstruct (line 46) | public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, ...
method AsTuple5 (line 49) | public static (T, T, T, T, T) AsTuple5<T>(this T[] @this)
method Deconstruct (line 57) | public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, ...
method AsTuple6 (line 60) | public static (T, T, T, T, T, T) AsTuple6<T>(this T[] @this)
method Deconstruct (line 68) | public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, ...
method AsTuple7 (line 71) | public static (T, T, T, T, T, T, T) AsTuple7<T>(this T[] @this)
method Deconstruct (line 79) | public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, ...
method AsTuple8 (line 82) | public static (T, T, T, T, T, T, T, T) AsTuple8<T>(this T[] @this)
method Deconstruct (line 90) | public static void Deconstruct<T>(this T[] @this, out T a0, out T a1, ...
FILE: ClientCore/Extensions/EnumExtensions.cs
class EnumExtensions (line 7) | public static class EnumExtensions
method CycleNext (line 9) | public static T CycleNext<T>(this T src) where T : Enum
method First (line 15) | public static T First<T>() where T : Enum
method GetNames (line 18) | public static string GetNames<T>() where T : Enum
method GetValues (line 21) | private static T[] GetValues<T>() where T : Enum
FILE: ClientCore/Extensions/EnumerableExtensions.cs
class EnumerableExtensions (line 6) | public static class EnumerableExtensions
method ToMatrix (line 16) | public static List<List<T>> ToMatrix<T>(this IEnumerable<T> enumerable...
FILE: ClientCore/Extensions/FileExtensions.cs
class FileExtensions (line 11) | public class FileExtensions
method CreateHardLink (line 23) | [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unic...
method link (line 35) | [DllImport("libc", EntryPoint = "link", SetLastError = true)]
method CreateHardLinkFromSource (line 48) | public static void CreateHardLinkFromSource(string source, string dest...
method GetDetectedEncoding (line 95) | public static Encoding GetDetectedEncoding(string filename, float mini...
FILE: ClientCore/Extensions/IniFileExtensions.cs
class IniFileExtensions (line 11) | public static class IniFileExtensions
method extension (line 13) | extension(IniFile iniFile)
method extension (line 45) | extension(IniSection iniSection)
FILE: ClientCore/Extensions/StringExtensions.cs
class StringExtensions (line 10) | public static class StringExtensions
method GetLinks (line 14) | public static string[] GetLinks(this string text)
method ToIniString (line 39) | public static string ToIniString(this string raw)
method FromIniString (line 59) | public static string FromIniString(this string iniString)
method L10N (line 81) | public static string L10N(this string defaultValue, string key, bool n...
method ToWin32FileName (line 94) | public static string ToWin32FileName(this string filename)
method ToEnum (line 117) | public static T ToEnum<T>(this string value) where T : Enum
method SplitWithCleanup (line 120) | public static string[] SplitWithCleanup(this string value, char[] sepa...
FILE: ClientCore/I18N/Translation.cs
class Translation (line 15) | public class Translation : ICloneable
method Translation (line 74) | public Translation(string localeCode)
method Translation (line 85) | public Translation(IniFile ini, string localeCode)
method Translation (line 110) | public Translation(string iniPath, string localeCode)
method Translation (line 118) | public Translation(Translation other)
method Clone (line 130) | public Translation Clone() => new Translation(this);
method Clone (line 131) | object ICloneable.Clone() => Clone();
method AppendValuesFromIniFile (line 137) | public void AppendValuesFromIniFile(string iniPath)
method AppendValuesFromIniFile (line 144) | public void AppendValuesFromIniFile(IniFile ini)
method GetLanguageName (line 153) | public static string GetLanguageName(string localeCode)
method ApplyTranslationGameFiles (line 191) | public void ApplyTranslationGameFiles() => ApplyTranslationGameFiles(L...
method ApplyTranslationGameFiles (line 195) | public static void ApplyTranslationGameFiles(string localeCode)
method GetTranslations (line 234) | public static Dictionary<string, string> GetTranslations()
method GetDefaultTranslationLocaleCode (line 258) | public static string GetDefaultTranslationLocaleCode()
method DumpIni (line 281) | public IniFile DumpIni(bool saveOnlyMissingValues = false)
method HandleMissing (line 316) | private bool HandleMissing(string key, string defaultValue)
method LookUp (line 334) | public string LookUp(string key, string defaultValue, bool notify = true)
method LookUp (line 353) | public string LookUp(string key, string fallbackKey, string defaultVal...
FILE: ClientCore/I18N/TranslationGameFile.cs
type TranslationGameFile (line 9) | public readonly record struct TranslationGameFile(string Source, string ...
FILE: ClientCore/INIProcessing/IniPreprocessInfoStore.cs
class PreprocessedIniInfo (line 9) | public class PreprocessedIniInfo
method PreprocessedIniInfo (line 11) | public PreprocessedIniInfo(string fileName, string originalHash, strin...
method PreprocessedIniInfo (line 18) | public PreprocessedIniInfo(string[] info)
class IniPreprocessInfoStore (line 33) | public class IniPreprocessInfoStore
method Load (line 43) | public void Load()
method IsIniUpToDate (line 77) | public bool IsIniUpToDate(string fileName)
method UpsertRecord (line 95) | public void UpsertRecord(string fileName, string originalFileHash, str...
method Write (line 109) | public void Write()
FILE: ClientCore/INIProcessing/IniPreprocessor.cs
class IniPreprocessor (line 11) | public class IniPreprocessor
method ProcessIni (line 13) | public void ProcessIni(string sourceIniPath, string destinationIniPath)
method ProcessSection (line 34) | private IniSection ProcessSection(IniFile iniFile, string sectionName)
FILE: ClientCore/INIProcessing/PreprocessorBackgroundTask.cs
class PreprocessorBackgroundTask (line 12) | public class PreprocessorBackgroundTask
method PreprocessorBackgroundTask (line 14) | private PreprocessorBackgroundTask()
method Run (line 34) | public void Run()
method CheckFiles (line 39) | private static void CheckFiles()
FILE: ClientCore/LoadingScreenController.cs
class LoadingScreenController (line 6) | public static class LoadingScreenController
method GetLoadScreenName (line 8) | public static string GetLoadScreenName(string sideId)
FILE: ClientCore/OSVersion.cs
type OSVersion (line 1) | public enum OSVersion
FILE: ClientCore/PlatformShim/EncodingExt.cs
class EncodingExt (line 6) | public static class EncodingExt
method EncodingExt (line 8) | static EncodingExt()
method GetEncodingWithAuto (line 25) | public static Encoding? GetEncodingWithAuto(string? encodingName)
method EncodingWithAutoToString (line 42) | public static string EncodingWithAutoToString(Encoding? encoding)
FILE: ClientCore/ProcessLauncher.cs
class ProcessLauncher (line 5) | public static class ProcessLauncher
method StartShellProcess (line 7) | public static void StartShellProcess(string commandLine, string argume...
FILE: ClientCore/ProfanityFilter.cs
class ProfanityFilter (line 7) | public class ProfanityFilter
method ProfanityFilter (line 14) | public ProfanityFilter()
method ProfanityFilter (line 64) | public ProfanityFilter(IEnumerable<string> censoredWords)
method IsOffensive (line 71) | public bool IsOffensive(string text)
method CensorText (line 82) | public string CensorText(string text)
method StarCensoredMatch (line 96) | private static string StarCensoredMatch(Match m)
method ToRegexPattern (line 102) | private string ToRegexPattern(string wildcardSearch)
FILE: ClientCore/ProgramConstants.cs
class ProgramConstants (line 15) | public static class ProgramConstants
method GetResourcePath (line 90) | public static string GetResourcePath()
method GetBaseResourcePath (line 95) | public static string GetBaseResourcePath()
method GetAILevelName (line 103) | public static string GetAILevelName(int aiLevel)
method SearchResourcesDir (line 126) | private static string SearchResourcesDir(string startupPath)
method GetGamePath (line 146) | private static string GetGamePath(string startupPath)
FILE: ClientCore/SavedGameManager.cs
class SavedGameManager (line 11) | public static class SavedGameManager
method GetSaveGameCount (line 17) | public static int GetSaveGameCount()
method GetSaveGameTimestamps (line 35) | public static List<string> GetSaveGameTimestamps()
method AreSavedGamesAvailable (line 55) | public static bool AreSavedGamesAvailable()
method GetSaveGameDirectoryPath (line 63) | private static string GetSaveGameDirectoryPath()
method InitSavedGames (line 71) | public static bool InitSavedGames()
method RenameSavedGame (line 93) | public static void RenameSavedGame()
method EraseSavedGames (line 162) | public static bool EraseSavedGames()
FILE: ClientCore/Settings/BoolSetting.cs
class BoolSetting (line 5) | public class BoolSetting : INISetting<bool>
method BoolSetting (line 7) | public BoolSetting(IniFile iniFile, string iniSection, string iniKey, ...
method Get (line 12) | protected override bool Get()
method Set (line 17) | protected override void Set(bool value)
method Write (line 22) | public override void Write()
method ToString (line 27) | public override string ToString()
FILE: ClientCore/Settings/DoubleSetting.cs
class DoubleSetting (line 5) | public class DoubleSetting : INISetting<double>
method DoubleSetting (line 7) | public DoubleSetting(IniFile iniFile, string iniSection, string iniKey...
method Get (line 12) | protected override double Get()
method Set (line 17) | protected override void Set(double value)
method Write (line 22) | public override void Write()
method ToString (line 27) | public override string ToString()
FILE: ClientCore/Settings/IIniSetting.cs
type IIniSetting (line 6) | interface IIniSetting
FILE: ClientCore/Settings/INISetting.cs
class INISetting (line 8) | public abstract class INISetting<T> : IIniSetting
method INISetting (line 10) | public INISetting(IniFile iniFile, string iniSection, string iniKey,
method SetIniFile (line 24) | public void SetIniFile(IniFile iniFile)
method SetDefaultIfNonexistent (line 44) | public void SetDefaultIfNonexistent()
method Get (line 50) | protected abstract T Get();
method Set (line 52) | protected abstract void Set(T value);
method Write (line 54) | public abstract void Write();
FILE: ClientCore/Settings/IntRangeSetting.cs
class IntRangeSetting (line 8) | public class IntRangeSetting : IntSetting
method IntRangeSetting (line 13) | public IntRangeSetting(IniFile iniFile, string iniSection, string iniK...
method NormalizeValue (line 25) | private int NormalizeValue(int value)
method InvalidValue (line 30) | private bool InvalidValue(int value)
method Get (line 35) | protected override int Get()
method Set (line 40) | protected override void Set(int value)
FILE: ClientCore/Settings/IntSetting.cs
class IntSetting (line 5) | public class IntSetting : INISetting<int>
method IntSetting (line 7) | public IntSetting(IniFile iniFile, string iniSection, string iniKey, i...
method Get (line 12) | protected override int Get()
method Set (line 17) | protected override void Set(int value)
method Write (line 22) | public override void Write()
method ToString (line 27) | public override string ToString()
FILE: ClientCore/Settings/StringListSetting.cs
class StringListSetting (line 11) | public class StringListSetting : INISetting<List<string>>
method StringListSetting (line 13) | public StringListSetting(IniFile iniFile, string iniSection, string in...
method Get (line 17) | protected override List<string> Get()
method Set (line 23) | protected override void Set(List<string> value)
method Write (line 28) | public override void Write()
method Add (line 33) | public void Add(string value)
method Remove (line 39) | public void Remove(string value)
FILE: ClientCore/Settings/StringSetting.cs
class StringSetting (line 5) | public class StringSetting : INISetting<string>
method StringSetting (line 7) | public StringSetting(IniFile iniFile, string iniSection, string iniKey...
method Get (line 12) | protected override string Get()
method Set (line 17) | protected override void Set(string value)
method Write (line 22) | public override void Write()
method ToString (line 27) | public override string ToString()
FILE: ClientCore/Settings/UserINISettings.cs
class UserINISettings (line 14) | public class UserINISettings
method Initialize (line 44) | public static void Initialize(string userIniFileName)
method UserINISettings (line 87) | protected UserINISettings(IniFile iniFile)
method GetGameOptionFilterValue (line 307) | public int? GetGameOptionFilterValue(string optionName)
method SetGameOptionFilterValue (line 323) | public void SetGameOptionFilterValue(string optionName, int? value)
method SetValue (line 359) | public void SetValue(string section, string key, string value)
method SetValue (line 362) | public void SetValue(string section, string key, bool value)
method SetValue (line 365) | public void SetValue(string section, string key, int value)
method GetValue (line 368) | public string GetValue(string section, string key, string defaultValue)
method GetValue (line 371) | public bool GetValue(string section, string key, bool defaultValue)
method GetValue (line 374) | public int GetValue(string section, string key, int defaultValue)
method IsGameFollowed (line 377) | public bool IsGameFollowed(string gameName)
method ToggleFavoriteMap (line 380) | public bool ToggleFavoriteMap(string mapSHA1, string gameModeName, boo...
method LoadFavoriteMaps (line 400) | private void LoadFavoriteMaps(IniFile iniFile)
method WriteFavoriteMaps (line 412) | public void WriteFavoriteMaps()
method IsFavoriteMap (line 429) | public bool IsFavoriteMap(string mapSHA1, string mapName, string gameM...
method FavoriteMapKey (line 458) | private string FavoriteMapKey(string identifier, string gameModeName) ...
method ReloadSettings (line 460) | public void ReloadSettings() => SettingsIni.Reload();
method ApplyDefaults (line 462) | public void ApplyDefaults()
method SaveSettings (line 469) | public void SaveSettings()
method IsGameFiltersApplied (line 485) | public bool IsGameFiltersApplied()
method ResetGameFilters (line 493) | public void ResetGameFilters()
method HasGameOptionFilters (line 506) | private bool HasGameOptionFilters()
method ResetGameOptionFilters (line 515) | private void ResetGameOptionFilters()
method CleanUpLegacySettings (line 524) | private void CleanUpLegacySettings()
method LoadLegacyFavoriteMaps (line 533) | private bool LoadLegacyFavoriteMaps(IniFile iniFile)
FILE: ClientCore/Statistics/DataWriter.cs
class DataWriter (line 8) | internal static class DataWriter
method WriteInt (line 10) | public static void WriteInt(this Stream stream, int value)
method WriteLong (line 17) | public static void WriteLong(this Stream stream, long value)
method WriteBool (line 24) | public static void WriteBool(this Stream stream, bool value)
method WriteString (line 29) | public static void WriteString(this Stream stream, string value, int r...
FILE: ClientCore/Statistics/GameParsers/LogFileStatisticsParser.cs
class LogFileStatisticsParser (line 8) | public class LogFileStatisticsParser : GenericMatchParser
method LogFileStatisticsParser (line 10) | public LogFileStatisticsParser(MatchStatistics ms, bool isLoadedGame) ...
method ParseStats (line 19) | public void ParseStats(string gamepath, string fileName)
method ParseStatistics (line 26) | protected override void ParseStatistics(string gamepath)
FILE: ClientCore/Statistics/GenericMatchParser.cs
class GenericMatchParser (line 3) | public abstract class GenericMatchParser
method GenericMatchParser (line 7) | public GenericMatchParser(MatchStatistics ms)
method ParseStatistics (line 12) | protected abstract void ParseStatistics(string gamepath);
FILE: ClientCore/Statistics/GenericStatisticsManager.cs
class GenericStatisticsManager (line 7) | public abstract class GenericStatisticsManager
method GetStatDatabaseVersion (line 11) | protected static string GetStatDatabaseVersion(string scorePath)
method ReadStatistics (line 28) | public abstract void ReadStatistics(string gamePath);
method GetMatchCount (line 30) | public int GetMatchCount() { return Statistics.Count; }
method GetMatchByIndex (line 32) | public MatchStatistics GetMatchByIndex(int index)
FILE: ClientCore/Statistics/MatchStatistics.cs
class MatchStatistics (line 10) | public class MatchStatistics
method MatchStatistics (line 12) | public MatchStatistics() { }
method MatchStatistics (line 14) | public MatchStatistics(string gameVersion, int gameId, string mapName,...
method AddPlayer (line 49) | public void AddPlayer(string name, bool isLocal, bool isAI, bool isSpe...
method AddPlayer (line 57) | public void AddPlayer(PlayerStatistics ps)
method ParseStatistics (line 62) | public void ParseStatistics(string gamePath, string gameName, bool isL...
method GetEmptyPlayerByName (line 72) | public PlayerStatistics GetEmptyPlayerByName(string playerName)
method GetFirstEmptyPlayer (line 83) | public PlayerStatistics GetFirstEmptyPlayer()
method GetPlayerCount (line 94) | public int GetPlayerCount()
method GetPlayer (line 99) | public PlayerStatistics GetPlayer(int index)
method Write (line 104) | public void Write(Stream stream)
FILE: ClientCore/Statistics/PlayerStatistics.cs
class PlayerStatistics (line 6) | public class PlayerStatistics
method PlayerStatistics (line 8) | public PlayerStatistics() { }
method PlayerStatistics (line 10) | public PlayerStatistics(string name, bool isLocal, bool isAi, bool isS...
method Write (line 38) | public void Write(Stream stream)
FILE: ClientCore/Statistics/StatisticsManager.cs
class StatisticsManager (line 12) | public class StatisticsManager : GenericStatisticsManager
method ReadStatistics (line 34) | public override void ReadStatistics(string gamePath)
method ReadFile (line 74) | private bool ReadFile(string filePath)
method ReadDatabase (line 123) | private void ReadDatabase(string filePath, int version)
method PurgeStats (line 273) | public void PurgeStats()
method ClearDatabase (line 292) | public void ClearDatabase()
method AddMatchAndSaveDatabase (line 299) | public void AddMatchAndSaveDatabase(bool addMatch, MatchStatistics ms)
method CreateDummyFile (line 347) | private void CreateDummyFile()
method SaveDatabase (line 358) | public void SaveDatabase()
method HasBeatCoOpMap (line 376) | public bool HasBeatCoOpMap(string mapName, string gameMode)
method GetCoopRankForDefaultMap (line 396) | public int GetCoopRankForDefaultMap(string mapName, int requiredPlayer...
method GetRankForCoopMatch (line 431) | int GetRankForCoopMatch(MatchStatistics ms)
method HasWonMapInPvP (line 502) | public bool HasWonMapInPvP(string mapName, string gameMode, int requir...
method GetSkirmishRankForDefaultMap (line 568) | public int GetSkirmishRankForDefaultMap(string mapName, int requiredPl...
method IsGameIdUnique (line 684) | public bool IsGameIdUnique(int gameId)
method GetMatchWithGameID (line 690) | public MatchStatistics GetMatchWithGameID(int gameId)
FILE: ClientGUI/ClientGUICreator.cs
class ClientGUICreator (line 14) | public static class ClientGUICreator
method AddSingletonXnaControl (line 28) | public static IServiceCollection AddSingletonXnaControl<T>(this IServi...
method AddTransientXnaControl (line 43) | public static IServiceCollection AddTransientXnaControl<T>(this IServi...
method GetXnaControl (line 55) | public static XNAControl GetXnaControl(string controlTypeName) => GetX...
method AddXnaControl (line 65) | private static void AddXnaControl(Type controlType)
method ValidateNonDuplicateControlType (line 81) | private static void ValidateNonDuplicateControlType(Type controlType)
method GetXnaControl (line 96) | private static XNAControl GetXnaControl(IServiceProvider provider, str...
method GetTypeInstance (line 115) | private static object GetTypeInstance(Type type)
FILE: ClientGUI/DarkeningPanel.cs
class DarkeningPanel (line 11) | public class DarkeningPanel : XNAPanel
method DarkeningPanel (line 16) | public DarkeningPanel(WindowManager windowManager) : base(windowManager)
method Initialize (line 23) | public override void Initialize()
method SetPositionAndSize (line 36) | public void SetPositionAndSize()
method AddChild (line 50) | public override void AddChild(XNAControl child)
method Child_VisibleChanged (line 57) | private void Child_VisibleChanged(object sender, EventArgs e)
method Show (line 67) | public void Show()
method Hide (line 90) | public void Hide()
method Update (line 110) | public override void Update(GameTime gameTime)
method AddAndInitializeWithControl (line 122) | public static void AddAndInitializeWithControl(WindowManager wm, XNACo...
method ToggleFade (line 129) | public void ToggleFade(bool enabled)
FILE: ClientGUI/GameProcessLogic.cs
class GameProcessLogic (line 17) | public static class GameProcessLogic
method StartGameProcess (line 31) | public static void StartGameProcess(WindowManager windowManager)
method Process_Exited (line 166) | static void Process_Exited(object sender, EventArgs e)
FILE: ClientGUI/HotkeyConfigurationWindow.cs
class HotkeyConfigurationWindow (line 21) | public class HotkeyConfigurationWindow : XNAWindow
method HotkeyConfigurationWindow (line 26) | public HotkeyConfigurationWindow(WindowManager windowManager) : base(w...
method Initialize (line 61) | public override void Initialize()
method ReadGameCommands (line 236) | private void ReadGameCommands()
method BtnReset_LeftClick (line 264) | private void BtnReset_LeftClick(object? sender, EventArgs e)
method BtnResetToDefaults_LeftClick (line 293) | private void BtnResetToDefaults_LeftClick(object? sender, EventArgs e)
method HotkeyConfigurationWindow_EnabledChanged (line 306) | private void HotkeyConfigurationWindow_EnabledChanged(object? sender, ...
method GameProcessLogic_GameProcessExited (line 318) | private void GameProcessLogic_GameProcessExited()
method LoadKeyboardINI (line 323) | private void LoadKeyboardINI()
method LbHotkeys_SelectedIndexChanged (line 382) | private void LbHotkeys_SelectedIndexChanged(object? sender, EventArgs e)
method DdCategory_SelectedIndexChanged (line 405) | private void DdCategory_SelectedIndexChanged(object? sender, EventArgs e)
method BtnAssign_LeftClick (line 424) | private void BtnAssign_LeftClick(object? sender, EventArgs e)
method RefreshHotkeyList (line 447) | private void RefreshHotkeyList()
method Keyboard_OnKeyPressed (line 459) | private void Keyboard_OnKeyPressed(object? sender, Rampastring.XNAUI.I...
method BtnCancel_LeftClick (line 481) | private void BtnCancel_LeftClick(object? sender, EventArgs e)
method BtnSave_LeftClick (line 486) | private void BtnSave_LeftClick(object? sender, EventArgs e)
method Update (line 498) | public override void Update(GameTime gameTime)
method GetCurrentModifiers (line 527) | private KeyModifiers GetCurrentModifiers()
method HasDuplicateHotkeys (line 552) | private bool HasDuplicateHotkeys()
method WriteKeyboardINI (line 575) | private void WriteKeyboardINI(bool writeEvenIfSettingsIniAsKeyboardIni...
class GameCommand (line 609) | private class GameCommand
method GameCommand (line 611) | public GameCommand(string uiName, string category, string descriptio...
method GameCommand (line 623) | public GameCommand(IniSection iniSection)
type KeyModifiers (line 649) | [Flags]
type Hotkey (line 661) | private sealed record Hotkey
FILE: ClientGUI/ICompositeControl.cs
type ICompositeControl (line 13) | public interface ICompositeControl
FILE: ClientGUI/IME/DummyIMEHandler.cs
class DummyIMEHandler (line 6) | internal class DummyIMEHandler : IMEHandler
method DummyIMEHandler (line 8) | public DummyIMEHandler() { }
method SetTextInputRectangle (line 12) | public override void SetTextInputRectangle(Rectangle rectangle) { }
method StartTextComposition (line 13) | public override void StartTextComposition() { }
method StopTextComposition (line 14) | public override void StopTextComposition() { }
FILE: ClientGUI/IME/IMEHandler.cs
class IMEHandler (line 14) | public abstract class IMEHandler : IIMEHandler
method OnCompositionChanged (line 52) | private void OnCompositionChanged(string oldValue, string newValue)
method Create (line 65) | public static IMEHandler Create(Game game)
method SetTextInputRectangle (line 85) | public abstract void SetTextInputRectangle(Rectangle rectangle);
method StartTextComposition (line 87) | public abstract void StartTextComposition();
method StopTextComposition (line 89) | public abstract void StopTextComposition();
method OnIMETextInput (line 91) | protected virtual void OnIMETextInput(char character)
method SetIMETextInputRectangle (line 104) | public void SetIMETextInputRectangle(WindowManager manager)
method SetIMETextInputRectangle (line 111) | private void SetIMETextInputRectangle(XNATextBox sender)
method OnSelectedChanged (line 143) | void IIMEHandler.OnSelectedChanged(XNATextBox sender)
method RegisterXNATextBox (line 175) | void IIMEHandler.RegisterXNATextBox(XNATextBox sender, Action<char>? h...
method KillXNATextBox (line 178) | void IIMEHandler.KillXNATextBox(XNATextBox sender)
method HandleScrollLeftKey (line 181) | bool IIMEHandler.HandleScrollLeftKey(XNATextBox sender)
method HandleScrollRightKey (line 184) | bool IIMEHandler.HandleScrollRightKey(XNATextBox sender)
method HandleBackspaceKey (line 187) | bool IIMEHandler.HandleBackspaceKey(XNATextBox sender)
method HandleDeleteKey (line 195) | bool IIMEHandler.HandleDeleteKey(XNATextBox sender)
method GetDrawCompositionText (line 203) | bool IIMEHandler.GetDrawCompositionText(XNATextBox sender, out string ...
method HandleCharInput (line 217) | bool IIMEHandler.HandleCharInput(XNATextBox sender, char input)
method HandleEnterKey (line 220) | bool IIMEHandler.HandleEnterKey(XNATextBox sender)
method HandleEscapeKey (line 223) | bool IIMEHandler.HandleEscapeKey(XNATextBox sender)
method OnTextChanged (line 237) | void IIMEHandler.OnTextChanged(XNATextBox sender) { }
FILE: ClientGUI/IME/SdlIMEHandler.cs
class SdlIMEHandler (line 15) | internal sealed class SdlIMEHandler(Game game) : DummyIMEHandler
FILE: ClientGUI/IME/WinFormsIMEHandler.cs
class WinFormsIMEHandler (line 15) | internal class WinFormsIMEHandler : IMEHandler
method WinFormsIMEHandler (line 27) | public WinFormsIMEHandler(Game game)
method StartTextComposition (line 42) | public override void StartTextComposition()
method StopTextComposition (line 48) | public override void StopTextComposition()
method SetTextInputRectangle (line 54) | public override void SetTextInputRectangle(Rectangle rect)
FILE: ClientGUI/INIConfigException.cs
class INIConfigException (line 8) | public class INIConfigException : Exception
method INIConfigException (line 10) | public INIConfigException(string message) : base(message)
FILE: ClientGUI/INItializableWindow.cs
class INItializableWindow (line 16) | public class INItializableWindow : XNAPanel
method INItializableWindow (line 18) | public INItializableWindow(WindowManager windowManager) : base(windowM...
method AnyChildMatches (line 33) | private static bool AnyChildMatches(IEnumerable<XNAControl> list, Func...
method FindChild (line 51) | public T FindChild<T>(string childName, bool optional = false) where T...
method FindChildrenStartWith (line 70) | public List<T> FindChildrenStartWith<T>(string prefix) where T : XNACo...
method GetConfigPath (line 91) | protected string GetConfigPath()
method Initialize (line 120) | public override void Initialize()
method ParseExtraControls (line 149) | private void ParseExtraControls()
method ParseControlINIAttribute (line 175) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method ReadINIForControl (line 183) | protected void ReadINIForControl(XNAControl control)
method ReadLateAttributesForControl (line 260) | private void ReadLateAttributesForControl(XNAControl control)
method CreateChildControl (line 296) | private XNAControl CreateChildControl(XNAControl parent, string keyValue)
FILE: ClientGUI/IToolTipContainer.cs
type IToolTipContainer (line 3) | public interface IToolTipContainer
FILE: ClientGUI/Parser.cs
class Parser (line 35) | class Parser
method Parser (line 39) | public Parser(WindowManager windowManager)
method GetControl (line 69) | private XNAControl GetControl(string controlName)
method Find (line 81) | private XNAControl Find(IEnumerable<XNAControl> list, string controlName)
method GetConstant (line 96) | private int GetConstant(string constantName)
method SetPrimaryControl (line 106) | public void SetPrimaryControl(XNAControl primaryControl)
method GetExprValue (line 111) | public int GetExprValue(string input, XNAControl parsingControl)
method GetExprValue (line 119) | private int GetExprValue()
method GetNumericalValue (line 177) | private int GetNumericalValue()
method SkipWhitespace (line 209) | private void SkipWhitespace()
method GetIdentifier (line 224) | private string GetIdentifier()
method GetConstantValue (line 247) | private int GetConstantValue()
method GetFunctionValue (line 253) | private int GetFunctionValue()
method ConsumeChar (line 296) | private void ConsumeChar(char token)
method GetInt (line 304) | private int GetInt()
method IsEndOfInput (line 321) | private bool IsEndOfInput() => tokenPlace >= Input.Length;
FILE: ClientGUI/ScreenResolution.cs
type ScreenResolution (line 16) | public sealed record ScreenResolution : IComparable<ScreenResolution>
FILE: ClientGUI/Settings/FileSettingCheckBox.cs
class FileSettingCheckBox (line 13) | public class FileSettingCheckBox : SettingCheckBoxBase, IFileSetting
method FileSettingCheckBox (line 15) | public FileSettingCheckBox(WindowManager windowManager) : base(windowM...
method FileSettingCheckBox (line 17) | public FileSettingCheckBox(WindowManager windowManager, bool defaultVa...
method GetAttributes (line 38) | public override void GetAttributes(IniFile iniFile)
method ParseControlINIAttribute (line 61) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method RefreshSetting (line 79) | public bool RefreshSetting()
method AddEnabledFile (line 102) | public void AddEnabledFile(string source, string destination, FileOper...
method AddDisabledFile (line 105) | public void AddDisabledFile(string source, string destination, FileOpe...
method Load (line 108) | public override void Load()
method Save (line 118) | public override bool Save()
FILE: ClientGUI/Settings/FileSettingDropDown.cs
class FileSettingDropDown (line 12) | public class FileSettingDropDown : SettingDropDownBase, IFileSetting
method FileSettingDropDown (line 14) | public FileSettingDropDown(WindowManager windowManager) : base(windowM...
method FileSettingDropDown (line 16) | public FileSettingDropDown(WindowManager windowManager, int defaultVal...
method GetAttributes (line 29) | public override void GetAttributes(IniFile iniFile)
method ParseControlINIAttribute (line 41) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method RefreshSetting (line 56) | public bool RefreshSetting()
method AddFile (line 82) | public void AddFile(int itemIndex, string source, string destination, ...
method Load (line 93) | public override void Load()
method Save (line 99) | public override bool Save()
FILE: ClientGUI/Settings/FileSourceDestinationInfo.cs
class FileSourceDestinationInfo (line 10) | sealed class FileSourceDestinationInfo
method FileSourceDestinationInfo (line 26) | public FileSourceDestinationInfo(string source, string destination, Fi...
method FileSourceDestinationInfo (line 37) | public FileSourceDestinationInfo(string value)
method ParseFSDInfoList (line 66) | public static List<FileSourceDestinationInfo> ParseFSDInfoList(IniSect...
method Apply (line 89) | public void Apply()
method Revert (line 139) | public void Revert()
type FileOperationOption (line 180) | public enum FileOperationOption
FILE: ClientGUI/Settings/IFileSetting.cs
type IFileSetting (line 3) | interface IFileSetting : IUserSetting
method RefreshSetting (line 22) | bool RefreshSetting();
FILE: ClientGUI/Settings/IUserSetting.cs
type IUserSetting (line 3) | public interface IUserSetting
method Load (line 30) | void Load();
method Save (line 37) | bool Save();
FILE: ClientGUI/Settings/SettingCheckBox.cs
class SettingCheckBox (line 10) | public class SettingCheckBox : SettingCheckBoxBase
method SettingCheckBox (line 12) | public SettingCheckBox(WindowManager windowManager) : base(windowManager)
method SettingCheckBox (line 16) | public SettingCheckBox(WindowManager windowManager, bool defaultValue,...
method ParseControlINIAttribute (line 49) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method Load (line 67) | public override void Load()
method Save (line 86) | public override bool Save()
FILE: ClientGUI/Settings/SettingCheckBoxBase.cs
class SettingCheckBoxBase (line 7) | public abstract class SettingCheckBoxBase : XNAClientCheckBox, IUserSetting
method SettingCheckBoxBase (line 9) | public SettingCheckBoxBase(WindowManager windowManager) : base(windowM...
method SettingCheckBoxBase (line 11) | public SettingCheckBoxBase(WindowManager windowManager, bool defaultVa...
method ParseControlINIAttribute (line 76) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method Load (line 107) | public abstract void Load();
method Save (line 109) | public abstract bool Save();
method FindParentCheckBox (line 112) | private XNAClientCheckBox FindParentCheckBox()
method UpdateParentCheckBox (line 126) | private void UpdateParentCheckBox(XNAClientCheckBox parentCheckBox)
method ParentCheckBox_CheckedChanged (line 138) | private void ParentCheckBox_CheckedChanged(object sender, EventArgs e)...
method UpdateAllowChecking (line 140) | private void UpdateAllowChecking()
FILE: ClientGUI/Settings/SettingDropDown.cs
class SettingDropDown (line 10) | public class SettingDropDown : SettingDropDownBase
method SettingDropDown (line 12) | public SettingDropDown(WindowManager windowManager) : base(windowManag...
method SettingDropDown (line 14) | public SettingDropDown(WindowManager windowManager, int defaultValue, ...
method ParseControlINIAttribute (line 34) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method Load (line 46) | public override void Load()
method Save (line 56) | public override bool Save()
method FindItemIndexByValue (line 66) | private int FindItemIndexByValue(string value)
FILE: ClientGUI/Settings/SettingDropDownBase.cs
class SettingDropDownBase (line 8) | public abstract class SettingDropDownBase : XNAClientDropDown, IUserSetting
method SettingDropDownBase (line 10) | public SettingDropDownBase(WindowManager windowManager) : base(windowM...
method SettingDropDownBase (line 12) | public SettingDropDownBase(WindowManager windowManager, int defaultVal...
method ParseControlINIAttribute (line 44) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method Load (line 81) | public abstract void Load();
method Save (line 83) | public abstract bool Save();
FILE: ClientGUI/ToolTip.cs
class ToolTip (line 12) | public class ToolTip : XNAControl
method ToolTip (line 29) | public ToolTip(WindowManager windowManager, XNAControl masterControl) ...
method GetParentControl (line 42) | private XNAControl GetParentControl(XNAControl parent)
method MasterControl_EnabledChanged (line 54) | private void MasterControl_EnabledChanged(object sender, EventArgs e)
method MasterControl_MouseEnter (line 82) | private void MasterControl_MouseEnter(object sender, EventArgs e)
method MasterControl_MouseLeave (line 93) | private void MasterControl_MouseLeave(object sender, EventArgs e)
method MasterControl_MouseMove (line 99) | private void MasterControl_MouseMove(object sender, EventArgs e)
method DisplayAtLocation (line 114) | public void DisplayAtLocation(Point location)
method Update (line 121) | public override void Update(GameTime gameTime)
method Draw (line 152) | public override void Draw(GameTime gameTime)
method SumPoints (line 163) | private Point SumPoints(Point p1, Point p2)
FILE: ClientGUI/TranslationGUIExtensions.cs
class TranslationGUIExtensions (line 7) | public static class TranslationGUIExtensions
method LookUp (line 17) | public static string LookUp(this Translation @this, XNAControl control...
FILE: ClientGUI/TranslationINIParser.cs
class TranslationINIParser (line 16) | public class TranslationINIParser : IControlINIAttributeParser
method Localize (line 22) | private string Localize(XNAControl control, string attributeName, stri...
method ParseINIAttribute (line 25) | public bool ParseINIAttribute(XNAControl control, IniFile iniFile, str...
FILE: ClientGUI/UIDesignConstants.cs
class UIDesignConstants (line 6) | public static class UIDesignConstants
FILE: ClientGUI/XNAChatTextBox.cs
class XNAChatTextBox (line 13) | public class XNAChatTextBox : XNASuggestionTextBox
method XNAChatTextBox (line 15) | public XNAChatTextBox(WindowManager windowManager) : base(windowManager)
method XNAChatTextBox_EnterPressed (line 23) | private void XNAChatTextBox_EnterPressed(object sender, EventArgs e)
method HandleKeyPress (line 29) | protected override bool HandleKeyPress(Keys key)
FILE: ClientGUI/XNAClientButton.cs
class XNAClientButton (line 10) | public class XNAClientButton : XNAButton, IToolTipContainer
method XNAClientButton (line 27) | public XNAClientButton(WindowManager windowManager) : base(windowManager)
method Initialize (line 33) | public override void Initialize()
method ParseControlINIAttribute (line 54) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
FILE: ClientGUI/XNAClientCheckBox.cs
class XNAClientCheckBox (line 10) | public class XNAClientCheckBox : XNACheckBox, IToolTipContainer
method XNAClientCheckBox (line 27) | public XNAClientCheckBox(WindowManager windowManager) : base(windowMan...
method Initialize (line 29) | public override void Initialize()
method ParseControlINIAttribute (line 38) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
FILE: ClientGUI/XNAClientColorDropDown.cs
class XNAClientColorDropDown (line 12) | public class XNAClientColorDropDown : XNAClientDropDown
method XNAClientColorDropDown (line 25) | public XNAClientColorDropDown(WindowManager windowManager) : base(wind...
method ParseControlINIAttribute (line 33) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method AddItem (line 99) | public new virtual void AddItem(string text, Color color)
method SetItemColorEnabled (line 127) | public void SetItemColorEnabled(int itemIndex, bool enabled)
type ItemsKind (line 151) | public enum ItemsKind
FILE: ClientGUI/XNAClientDropDown.cs
class XNAClientDropDown (line 10) | public class XNAClientDropDown : XNADropDown, IToolTipContainer
method XNAClientDropDown (line 27) | public XNAClientDropDown(WindowManager windowManager) : base(windowMan...
method Initialize (line 29) | public override void Initialize()
method ParseControlINIAttribute (line 38) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method OnMouseLeftDown (line 49) | public override void OnMouseLeftDown(InputEventArgs inputEventArgs)
method CloseDropDown (line 56) | protected override void CloseDropDown()
method UpdateToolTipBlock (line 62) | protected void UpdateToolTipBlock()
FILE: ClientGUI/XNAClientLinkLabel.cs
class XNAClientLinkLabel (line 14) | public class XNAClientLinkLabel : XNALinkLabel, IToolTipContainer
method XNAClientLinkLabel (line 48) | public XNAClientLinkLabel(WindowManager windowManager) : base(windowMa...
method Initialize (line 53) | public override void Initialize()
method ParseControlINIAttribute (line 60) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method OnMouseEnter (line 84) | public override void OnMouseEnter()
method OnMouseLeave (line 94) | public override void OnMouseLeave()
method OnLeftClick (line 102) | public override void OnLeftClick(InputEventArgs inputEventArgs)
FILE: ClientGUI/XNAClientPreferredItemDropDown.cs
class XNAClientPreferredItemDropDown (line 12) | public class XNAClientPreferredItemDropDown : XNAClientDropDown
method XNAClientPreferredItemDropDown (line 28) | public XNAClientPreferredItemDropDown(WindowManager windowManager) : b...
method ParseControlINIAttribute (line 32) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method Draw (line 47) | public override void Draw(GameTime gameTime)
FILE: ClientGUI/XNAClientStateButton.cs
class XNAClientStateButton (line 10) | public class XNAClientStateButton<T> : XNAButton where T : Enum
method XNAClientStateButton (line 19) | public XNAClientStateButton(WindowManager windowManager, Dictionary<T,...
method Initialize (line 25) | public override void Initialize()
method SetState (line 41) | public void SetState(T state)
method GetState (line 50) | public T GetState() => _state;
method CycleState (line 52) | private void CycleState(object sender, EventArgs e)
method SetToolTipText (line 58) | public void SetToolTipText(string text)
method UpdateStateTexture (line 65) | private void UpdateStateTexture()
FILE: ClientGUI/XNAClientTabControl.cs
class XNAClientTabControl (line 6) | public class XNAClientTabControl : XNATabControl
method XNAClientTabControl (line 8) | public XNAClientTabControl(WindowManager windowManager) : base(windowM...
method Initialize (line 12) | public override void Initialize()
method AddTab (line 22) | public void AddTab(string text, int width)
FILE: ClientGUI/XNAClientToggleButton.cs
class XNAClientToggleButton (line 13) | public class XNAClientToggleButton : XNAButton
method Initialize (line 23) | public override void Initialize()
method UpdateIdleTexture (line 55) | private void UpdateIdleTexture()
method SetToolTipText (line 60) | public void SetToolTipText(string text)
method XNAClientToggleButton (line 67) | public XNAClientToggleButton(WindowManager windowManager) : base(windo...
method ParseControlINIAttribute (line 71) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
FILE: ClientGUI/XNAExtraPanel.cs
class XNAExtraPanel (line 12) | public class XNAExtraPanel : XNAPanel
method XNAExtraPanel (line 14) | public XNAExtraPanel(WindowManager windowManager) : base(windowManager)
method ParseControlINIAttribute (line 20) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
FILE: ClientGUI/XNALinkButton.cs
class XNALinkButton (line 8) | public class XNALinkButton : XNAClientButton
method XNALinkButton (line 10) | public XNALinkButton(WindowManager windowManager) : base(windowManager...
method ParseControlINIAttribute (line 16) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method OnLeftClick (line 39) | public override void OnLeftClick(InputEventArgs inputEventArgs)
FILE: ClientGUI/XNAMessageBox.cs
class XNAMessageBox (line 13) | public class XNAMessageBox : XNAWindow
method XNAMessageBox (line 22) | public XNAMessageBox(WindowManager windowManager,
method Initialize (line 56) | public override void Initialize()
method AddOKButton (line 99) | private void AddOKButton()
method AddYesNoButtons (line 119) | private void AddYesNoButtons()
method AddOKCancelButtons (line 154) | private void AddOKCancelButtons()
method BtnOK_LeftClick (line 189) | private void BtnOK_LeftClick(object sender, EventArgs e)
method BtnYes_LeftClick (line 195) | private void BtnYes_LeftClick(object sender, EventArgs e)
method BtnNo_LeftClick (line 201) | private void BtnNo_LeftClick(object sender, EventArgs e)
method BtnCancel_LeftClick (line 207) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method Hide (line 213) | private void Hide()
method Show (line 221) | public void Show()
method Show (line 234) | public static void Show(WindowManager windowManager, string caption, s...
method MsgBox_OKClicked (line 254) | private static void MsgBox_OKClicked(XNAMessageBox messageBox)
method ShowYesNoDialog (line 268) | public static XNAMessageBox ShowYesNoDialog(WindowManager windowManage...
method MsgBox_NoClicked (line 289) | private static void MsgBox_NoClicked(XNAMessageBox messageBox)
method MsgBox_YesClicked (line 296) | private static void MsgBox_YesClicked(XNAMessageBox messageBox)
method Parent_Hidden (line 303) | private static void Parent_Hidden(object sender, EventArgs e)
type XNAMessageBoxButtons (line 314) | public enum XNAMessageBoxButtons
FILE: ClientGUI/XNAOptionsPanel.cs
class XNAOptionsPanel (line 16) | public abstract class XNAOptionsPanel : XNAWindowBase
method XNAOptionsPanel (line 18) | public XNAOptionsPanel(WindowManager windowManager,
method Initialize (line 26) | public override void Initialize()
method GameProcessExited_Callback (line 39) | private void GameProcessExited_Callback()
method ParseUserOptions (line 59) | public void ParseUserOptions(IniFile iniFile)
method AddChild (line 66) | public override void AddChild(XNAControl child)
method Save (line 81) | public virtual bool Save()
method RefreshPanel (line 96) | public virtual bool RefreshPanel()
method Load (line 111) | public virtual void Load()
method ToggleMainMenuOnlyOptions (line 122) | public virtual void ToggleMainMenuOnlyOptions(bool enable)
FILE: ClientGUI/XNAPlayerSlotIndicator.cs
type PlayerSlotState (line 10) | public enum PlayerSlotState
class XNAPlayerSlotIndicator (line 22) | public class XNAPlayerSlotIndicator : XNAIndicator<PlayerSlotState>
method XNAPlayerSlotIndicator (line 28) | public XNAPlayerSlotIndicator(WindowManager windowManager) : base(wind...
method LoadTextures (line 30) | public static void LoadTextures()
method Initialize (line 45) | public override void Initialize()
method SwitchTexture (line 52) | public override void SwitchTexture(PlayerSlotState key)
FILE: ClientGUI/XNAWindow.cs
class XNAWindow (line 13) | public class XNAWindow : XNAWindowBase
method XNAWindow (line 19) | public XNAWindow(WindowManager windowManager) : base(windowManager)
method SetAttributesFromIni (line 36) | protected virtual void SetAttributesFromIni()
method GetINIAttributes (line 51) | protected virtual void GetINIAttributes(IniFile iniFile)
method Initialize (line 77) | public override void Initialize()
FILE: ClientGUI/XNAWindowBase.cs
class XNAWindowBase (line 9) | public class XNAWindowBase : XNAPanel
method XNAWindowBase (line 11) | public XNAWindowBase(WindowManager windowManager) : base(windowManager)
method ParseExtraControls (line 21) | protected virtual void ParseExtraControls(IniFile iniFile, string sect...
method ReadChildControlAttributes (line 44) | protected virtual void ReadChildControlAttributes(IniFile iniFile)
method CreateControl (line 61) | protected virtual XNAControl CreateControl(GUICreator guiCreator, stri...
FILE: ClientUpdater/Compression/Common/CRC.cs
class CRC (line 14) | class CRC
method CRC (line 18) | static CRC()
method Init (line 36) | public void Init() { _value = 0xFFFFFFFF; }
method UpdateByte (line 38) | public void UpdateByte(byte b)
method Update (line 43) | public void Update(byte[] data, uint offset, uint size)
method GetDigest (line 49) | public uint GetDigest() { return _value ^ 0xFFFFFFFF; }
method CalculateDigest (line 51) | static uint CalculateDigest(byte[] data, uint offset, uint size)
method VerifyDigest (line 59) | static bool VerifyDigest(uint digest, byte[] data, uint offset, uint s...
FILE: ClientUpdater/Compression/Common/CommandLineParser.cs
type SwitchType (line 18) | public enum SwitchType
class SwitchForm (line 27) | public class SwitchForm
method SwitchForm (line 36) | public SwitchForm(string idString, SwitchType type, bool multi,
method SwitchForm (line 46) | public SwitchForm(string idString, SwitchType type, bool multi, int mi...
method SwitchForm (line 50) | public SwitchForm(string idString, SwitchType type, bool multi):
class SwitchResult (line 56) | public class SwitchResult
method SwitchResult (line 62) | public SwitchResult()
class Parser (line 68) | public class Parser
method Parser (line 73) | public Parser(int numSwitches)
method ParseString (line 80) | bool ParseString(string srcString, SwitchForm[] switchForms)
method ParseStrings (line 181) | public void ParseStrings(SwitchForm[] switchForms, string[] commandStr...
method ParseCommand (line 201) | public static int ParseCommand(CommandForm[] commandForms, string comm...
method ParseSubCharsCommand (line 226) | static bool ParseSubCharsCommand(int numForms, CommandSubCharsSet[] fo...
method IsItSwitchChar (line 262) | static bool IsItSwitchChar(char c)
class CommandForm (line 268) | public class CommandForm
method CommandForm (line 272) | public CommandForm(string idString, bool postStringMode)
class CommandSubCharsSet (line 279) | class CommandSubCharsSet
FILE: ClientUpdater/Compression/Common/InBuffer.cs
class InBuffer (line 15) | public class InBuffer
method InBuffer (line 25) | public InBuffer(uint bufferSize)
method Init (line 31) | public void Init(System.IO.Stream stream)
method ReadBlock (line 40) | public bool ReadBlock()
method ReleaseStream (line 53) | public void ReleaseStream()
method ReadByte (line 59) | public bool ReadByte(byte b) // check it
method ReadByte (line 68) | public byte ReadByte()
method GetProcessedSize (line 77) | public ulong GetProcessedSize()
FILE: ClientUpdater/Compression/Common/OutBuffer.cs
class OutBuffer (line 15) | public class OutBuffer
method OutBuffer (line 23) | public OutBuffer(uint bufferSize)
method SetStream (line 29) | public void SetStream(System.IO.Stream stream) { m_Stream = stream; }
method FlushStream (line 30) | public void FlushStream() { m_Stream.Flush(); }
method CloseStream (line 31) | public void CloseStream() { m_Stream.Close(); }
method ReleaseStream (line 32) | public void ReleaseStream() { m_Stream = null; }
method Init (line 34) | public void Init()
method WriteByte (line 40) | public void WriteByte(byte b)
method FlushData (line 47) | public void FlushData()
method GetProcessedSize (line 55) | public ulong GetProcessedSize() { return m_ProcessedSize + m_Pos; }
FILE: ClientUpdater/Compression/CompressionHelper.cs
class CompressionHelper (line 28) | public static class CompressionHelper
method CompressFileAsync (line 35) | public static async ValueTask CompressFileAsync(string inputFilename, ...
method DecompressFileAsync (line 60) | public static async ValueTask DecompressFileAsync(string inputFilename...
FILE: ClientUpdater/Compression/ICoder.cs
class DataErrorException (line 20) | class DataErrorException : ApplicationException
method DataErrorException (line 22) | public DataErrorException(): base("Data Error") { }
class InvalidParamException (line 28) | class InvalidParamException : ApplicationException
method InvalidParamException (line 30) | public InvalidParamException(): base("Invalid Parameter") { }
type ICodeProgress (line 33) | public interface ICodeProgress
method SetProgress (line 44) | void SetProgress(Int64 inSize, Int64 outSize);
type ICoder (line 47) | public interface ICoder
method Code (line 70) | void Code(System.IO.Stream inStream, System.IO.Stream outStream,
type CoderPropID (line 88) | public enum CoderPropID
type ISetCoderProperties (line 153) | public interface ISetCoderProperties
method SetCoderProperties (line 155) | void SetCoderProperties(CoderPropID[] propIDs, object[] properties);
type IWriteCoderProperties (line 158) | public interface IWriteCoderProperties
method WriteCoderProperties (line 160) | void WriteCoderProperties(System.IO.Stream outStream);
type ISetDecoderProperties (line 163) | public interface ISetDecoderProperties
method SetDecoderProperties (line 165) | void SetDecoderProperties(byte[] properties);
FILE: ClientUpdater/Compression/LZ/IMatchFinder.cs
type IInWindowStream (line 16) | interface IInWindowStream
method SetStream (line 18) | void SetStream(System.IO.Stream inStream);
method Init (line 19) | void Init();
method ReleaseStream (line 20) | void ReleaseStream();
method GetIndexByte (line 21) | Byte GetIndexByte(Int32 index);
method GetMatchLen (line 22) | UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit);
method GetNumAvailableBytes (line 23) | UInt32 GetNumAvailableBytes();
type IMatchFinder (line 26) | interface IMatchFinder : IInWindowStream
method Create (line 28) | void Create(UInt32 historySize, UInt32 keepAddBufferBefore,
method GetMatches (line 30) | UInt32 GetMatches(UInt32[] distances);
method Skip (line 31) | void Skip(UInt32 num);
FILE: ClientUpdater/Compression/LZ/LzBinTree.cs
class BinTree (line 17) | public class BinTree : InWindow, IMatchFinder
method SetType (line 44) | public void SetType(int numHashBytes)
method SetStream (line 61) | public new void SetStream(System.IO.Stream stream) { base.SetStream(st...
method ReleaseStream (line 62) | public new void ReleaseStream() { base.ReleaseStream(); }
method Init (line 64) | public new void Init()
method MovePos (line 73) | public new void MovePos()
method GetIndexByte (line 82) | public new Byte GetIndexByte(Int32 index) { return base.GetIndexByte(i...
method GetMatchLen (line 84) | public new UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit)
method GetNumAvailableBytes (line 87) | public new UInt32 GetNumAvailableBytes() { return base.GetNumAvailable...
method Create (line 89) | public void Create(UInt32 historySize, UInt32 keepAddBufferBefore,
method GetMatches (line 128) | public UInt32 GetMatches(UInt32[] distances)
method Skip (line 262) | public void Skip(UInt32 num)
method NormalizeLinks (line 354) | void NormalizeLinks(UInt32[] items, UInt32 numItems, UInt32 subValue)
method Normalize (line 367) | void Normalize()
method SetCutValue (line 375) | public void SetCutValue(UInt32 cutValue) { _cutValue = cutValue; }
FILE: ClientUpdater/Compression/LZ/LzInWindow.cs
class InWindow (line 17) | public class InWindow
method MoveBlock (line 34) | public void MoveBlock()
method ReadBlock (line 49) | public virtual void ReadBlock()
method Free (line 75) | void Free() { _bufferBase = null; }
method Create (line 77) | public void Create(UInt32 keepSizeBefore, UInt32 keepSizeAfter, UInt32...
method SetStream (line 91) | public void SetStream(System.IO.Stream stream) { _stream = stream; }
method ReleaseStream (line 92) | public void ReleaseStream() { _stream = null; }
method Init (line 94) | public void Init()
method MovePos (line 103) | public void MovePos()
method GetIndexByte (line 115) | public Byte GetIndexByte(Int32 index) { return _bufferBase[_bufferOffs...
method GetMatchLen (line 118) | public UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit)
method GetNumAvailableBytes (line 132) | public UInt32 GetNumAvailableBytes() { return _streamPos - _pos; }
method ReduceOffsets (line 134) | public void ReduceOffsets(Int32 subValue)
FILE: ClientUpdater/Compression/LZ/LzOutWindow.cs
class OutWindow (line 15) | public class OutWindow
method Create (line 25) | public void Create(uint windowSize)
method Init (line 37) | public void Init(System.IO.Stream stream, bool solid)
method Train (line 49) | public bool Train(System.IO.Stream stream)
method ReleaseStream (line 73) | public void ReleaseStream()
method Flush (line 79) | public void Flush()
method CopyBlock (line 90) | public void CopyBlock(uint distance, uint len)
method PutByte (line 105) | public void PutByte(byte b)
method GetByte (line 112) | public byte GetByte(uint distance)
FILE: ClientUpdater/Compression/LZMA/LzmaBase.cs
class Base (line 14) | internal abstract class Base
type State (line 24) | public struct State
method Init (line 27) | public void Init() { Index = 0; }
method UpdateChar (line 28) | public void UpdateChar()
method UpdateMatch (line 34) | public void UpdateMatch() { Index = (uint)(Index < 7 ? 7 : 10); }
method UpdateRep (line 35) | public void UpdateRep() { Index = (uint)(Index < 7 ? 8 : 11); }
method UpdateShortRep (line 36) | public void UpdateShortRep() { Index = (uint)(Index < 7 ? 9 : 11); }
method IsCharState (line 37) | public bool IsCharState() { return Index < 7; }
method GetLenToPosState (line 50) | public static uint GetLenToPosState(uint len)
FILE: ClientUpdater/Compression/LZMA/LzmaDecoder.cs
class Decoder (line 20) | public class Decoder : ICoder, ISetDecoderProperties // ,System.IO.Stream
class LenDecoder (line 22) | class LenDecoder
method Create (line 31) | public void Create(uint numPosStates)
method Init (line 41) | public void Init()
method Decode (line 53) | public uint Decode(RangeCoder.Decoder rangeDecoder, uint posState)
class LiteralDecoder (line 72) | class LiteralDecoder
type Decoder2 (line 74) | struct Decoder2
method Create (line 77) | public void Create() { m_Decoders = new BitDecoder[0x300]; }
method Init (line 78) | public void Init() { for (int i = 0; i < 0x300; i++) m_Decoders[i]...
method DecodeNormal (line 80) | public byte DecodeNormal(RangeCoder.Decoder rangeDecoder)
method DecodeWithMatchByte (line 89) | public byte DecodeWithMatchByte(RangeCoder.Decoder rangeDecoder, b...
method Create (line 115) | public void Create(int numPosBits, int numPrevBits)
method Init (line 129) | public void Init()
method GetState (line 136) | uint GetState(uint pos, byte prevByte)
method DecodeNormal (line 139) | public byte DecodeNormal(RangeCoder.Decoder rangeDecoder, uint pos, ...
method DecodeWithMatchByte (line 142) | public byte DecodeWithMatchByte(RangeCoder.Decoder rangeDecoder, uin...
method Decoder (line 173) | public Decoder()
method Decoder (line 180) | public Decoder(CancellationToken cancellationToken) : this()
method SetDictionarySize (line 185) | void SetDictionarySize(uint dictionarySize)
method SetLiteralProperties (line 196) | void SetLiteralProperties(int lp, int lc)
method SetPosBitsProperties (line 205) | void SetPosBitsProperties(int pb)
method Init (line 216) | void Init(System.IO.Stream inStream, System.IO.Stream outStream)
method Code (line 248) | public void Code(System.IO.Stream inStream, System.IO.Stream outStream,
method SetDecoderProperties (line 370) | public void SetDecoderProperties(byte[] properties)
method Train (line 388) | public bool Train(System.IO.Stream stream)
FILE: ClientUpdater/Compression/LZMA/LzmaEncoder.cs
class Encoder (line 20) | public class Encoder : ICoder, ISetCoderProperties, IWriteCoderProperties
type EMatchFinderType (line 22) | enum EMatchFinderType
method Encoder (line 32) | static Encoder()
method GetPosSlot (line 46) | static UInt32 GetPosSlot(UInt32 pos)
method GetPosSlot2 (line 55) | static UInt32 GetPosSlot2(UInt32 pos)
method BaseInit (line 68) | void BaseInit()
class LiteralEncoder (line 79) | class LiteralEncoder
type Encoder2 (line 81) | public struct Encoder2
method Create (line 85) | public void Create() { m_Encoders = new BitEncoder[0x300]; }
method Init (line 87) | public void Init() { for (int i = 0; i < 0x300; i++) m_Encoders[i]...
method Encode (line 89) | public void Encode(RangeCoder.Encoder rangeEncoder, byte symbol)
method EncodeMatched (line 100) | public void EncodeMatched(RangeCoder.Encoder rangeEncoder, byte ma...
method GetPrice (line 119) | public uint GetPrice(bool matchMode, byte matchByte, byte symbol)
method Create (line 154) | public void Create(int numPosBits, int numPrevBits)
method Init (line 167) | public void Init()
method GetSubCoder (line 174) | public Encoder2 GetSubCoder(UInt32 pos, Byte prevByte)
class LenEncoder (line 178) | class LenEncoder
method LenEncoder (line 186) | public LenEncoder()
method Init (line 195) | public void Init(UInt32 numPosStates)
method Encode (line 207) | public void Encode(RangeCoder.Encoder rangeEncoder, UInt32 symbol, U...
method SetPrices (line 231) | public void SetPrices(UInt32 posState, UInt32 numSymbols, UInt32[] p...
class LenPriceTableEncoder (line 257) | class LenPriceTableEncoder : LenEncoder
method SetTableSize (line 263) | public void SetTableSize(UInt32 tableSize) { _tableSize = tableSize; }
method GetPrice (line 265) | public UInt32 GetPrice(UInt32 symbol, UInt32 posState)
method UpdateTable (line 270) | void UpdateTable(UInt32 posState)
method UpdateTables (line 276) | public void UpdateTables(UInt32 numPosStates)
method Encode (line 282) | public new void Encode(RangeCoder.Encoder rangeEncoder, UInt32 symbo...
class Optimal (line 291) | class Optimal
method MakeAsChar (line 310) | public void MakeAsChar() { BackPrev = 0xFFFFFFFF; Prev1IsChar = fals...
method MakeAsShortRep (line 311) | public void MakeAsShortRep() { BackPrev = 0; ; Prev1IsChar = false; }
method IsShortRep (line 312) | public bool IsShortRep() { return (BackPrev == 0); }
method Create (line 375) | void Create()
method Encoder (line 395) | public Encoder()
method Encoder (line 403) | public Encoder(CancellationToken cancellationToken) : this()
method SetWriteEndMarkerMode (line 408) | void SetWriteEndMarkerMode(bool writeEndMarker)
method Init (line 413) | void Init()
method ReadMatchDistances (line 449) | void ReadMatchDistances(out UInt32 lenRes, out UInt32 numDistancePairs)
method MovePos (line 464) | void MovePos(UInt32 num)
method GetRepLen1Price (line 473) | UInt32 GetRepLen1Price(Base.State state, UInt32 posState)
method GetPureRepPrice (line 479) | UInt32 GetPureRepPrice(UInt32 repIndex, Base.State state, UInt32 posSt...
method GetRepPrice (line 501) | UInt32 GetRepPrice(UInt32 repIndex, UInt32 len, Base.State state, UInt...
method GetPosLenPrice (line 507) | UInt32 GetPosLenPrice(UInt32 pos, UInt32 len, UInt32 posState)
method Backward (line 519) | UInt32 Backward(out UInt32 backRes, UInt32 cur)
method GetOptimum (line 557) | UInt32 GetOptimum(UInt32 position, out UInt32 backRes)
method ChangePair (line 1048) | bool ChangePair(UInt32 smallDist, UInt32 bigDist)
method WriteEndMarker (line 1054) | void WriteEndMarker(UInt32 posState)
method Flush (line 1073) | void Flush(UInt32 nowPos)
method CodeOneBlock (line 1081) | public void CodeOneBlock(out Int64 inSize, out Int64 outSize, out bool...
method ReleaseMFStream (line 1249) | void ReleaseMFStream()
method SetOutStream (line 1258) | void SetOutStream(System.IO.Stream outStream) { _rangeEncoder.SetStrea...
method ReleaseOutStream (line 1259) | void ReleaseOutStream() { _rangeEncoder.ReleaseStream(); }
method ReleaseStreams (line 1261) | void ReleaseStreams()
method SetStreams (line 1267) | void SetStreams(System.IO.Stream inStream, System.IO.Stream outStream,
method Code (line 1291) | public void Code(System.IO.Stream inStream, System.IO.Stream outStream,
method WriteCoderProperties (line 1324) | public void WriteCoderProperties(System.IO.Stream outStream)
method FillDistancesPrices (line 1335) | void FillDistancesPrices()
method FillAlignPrices (line 1367) | void FillAlignPrices()
method FindMatchFinder (line 1381) | static int FindMatchFinder(string s)
method SetCoderProperties (line 1389) | public void SetCoderProperties(CoderPropID[] propIDs, object[] propert...
method SetTrainSize (line 1495) | public void SetTrainSize(uint trainSize)
FILE: ClientUpdater/Compression/RangeCoder/RangeCoder.cs
class Encoder (line 14) | class Encoder
method SetStream (line 27) | public void SetStream(System.IO.Stream stream)
method ReleaseStream (line 32) | public void ReleaseStream()
method Init (line 37) | public void Init()
method FlushData (line 47) | public void FlushData()
method FlushStream (line 53) | public void FlushStream()
method CloseStream (line 58) | public void CloseStream()
method Encode (line 63) | public void Encode(uint start, uint size, uint total)
method ShiftLow (line 74) | public void ShiftLow()
method EncodeDirectBits (line 91) | public void EncodeDirectBits(uint v, int numTotalBits)
method EncodeBit (line 106) | public void EncodeBit(uint size0, int numTotalBits, uint symbol)
method GetProcessedSizeAdd (line 123) | public long GetProcessedSizeAdd()
class Decoder (line 131) | class Decoder
method Init (line 139) | public void Init(System.IO.Stream stream)
method ReleaseStream (line 150) | public void ReleaseStream()
method CloseStream (line 156) | public void CloseStream()
method Normalize (line 161) | public void Normalize()
method Normalize2 (line 170) | public void Normalize2()
method GetThreshold (line 179) | public uint GetThreshold(uint total)
method Decode (line 184) | public void Decode(uint start, uint size, uint total)
method DecodeDirectBits (line 191) | public uint DecodeDirectBits(int numTotalBits)
method DecodeBit (line 222) | public uint DecodeBit(uint size0, int numTotalBits)
FILE: ClientUpdater/Compression/RangeCoder/RangeCoderBit.cs
type BitEncoder (line 14) | struct BitEncoder
method Init (line 24) | public void Init() { Prob = kBitModelTotal >> 1; }
method UpdateModel (line 26) | public void UpdateModel(uint symbol)
method Encode (line 34) | public void Encode(Encoder encoder, uint symbol)
method BitEncoder (line 59) | static BitEncoder()
method GetPrice (line 72) | public uint GetPrice(uint symbol)
method GetPrice0 (line 76) | public uint GetPrice0() { return ProbPrices[Prob >> kNumMoveReducingBi...
method GetPrice1 (line 77) | public uint GetPrice1() { return ProbPrices[(kBitModelTotal - Prob) >>...
type BitDecoder (line 80) | struct BitDecoder
method UpdateModel (line 88) | public void UpdateModel(int numMoveBits, uint symbol)
method Init (line 96) | public void Init() { Prob = kBitModelTotal >> 1; }
method Decode (line 98) | public uint Decode(RangeCoder.Decoder rangeDecoder)
FILE: ClientUpdater/Compression/RangeCoder/RangeCoderBitTree.cs
type BitTreeEncoder (line 14) | struct BitTreeEncoder
method BitTreeEncoder (line 19) | public BitTreeEncoder(int numBitLevels)
method Init (line 25) | public void Init()
method Encode (line 31) | public void Encode(Encoder rangeEncoder, UInt32 symbol)
method ReverseEncode (line 43) | public void ReverseEncode(Encoder rangeEncoder, UInt32 symbol)
method GetPrice (line 55) | public UInt32 GetPrice(UInt32 symbol)
method ReverseGetPrice (line 69) | public UInt32 ReverseGetPrice(UInt32 symbol)
method ReverseGetPrice (line 83) | public static UInt32 ReverseGetPrice(BitEncoder[] Models, UInt32 start...
method ReverseEncode (line 98) | public static void ReverseEncode(BitEncoder[] Models, UInt32 startIndex,
type BitTreeDecoder (line 112) | struct BitTreeDecoder
method BitTreeDecoder (line 117) | public BitTreeDecoder(int numBitLevels)
method Init (line 123) | public void Init()
method Decode (line 129) | public uint Decode(RangeCoder.Decoder rangeDecoder)
method ReverseDecode (line 137) | public uint ReverseDecode(RangeCoder.Decoder rangeDecoder)
method ReverseDecode (line 151) | public static uint ReverseDecode(BitDecoder[] Models, UInt32 startIndex,
FILE: ClientUpdater/CustomComponent.cs
class CustomComponent (line 36) | public class CustomComponent
method CustomComponent (line 113) | public CustomComponent()
method CustomComponent (line 120) | public CustomComponent(string guiName, string iniName, string download...
method DownloadComponent (line 133) | public void DownloadComponent()
method StopDownload (line 147) | public void StopDownload()
method DoDownloadComponentAsync (line 156) | private async Task DoDownloadComponentAsync(CancellationToken cancella...
method HandleAfterCancelDownload (line 353) | private void HandleAfterCancelDownload()
method GetDownloadUri (line 361) | private Uri GetDownloadUri(string downloadPath, UpdaterFileInfo info)
method GetArchivePath (line 373) | private static string GetArchivePath(string path, UpdaterFileInfo info)
method CleanUpAfterDownload (line 381) | private void CleanUpAfterDownload()
method DoDownloadFinished (line 407) | private void DoDownloadFinished(bool success) => DownloadFinished?.Inv...
method ProgressMessageHandlerOnHttpReceiveProgress (line 409) | private void ProgressMessageHandlerOnHttpReceiveProgress(object sender...
FILE: ClientUpdater/UpdateMirror.cs
type UpdateMirror (line 21) | public readonly record struct UpdateMirror(string URL, string Name, stri...
FILE: ClientUpdater/Updater.cs
class Updater (line 40) | public static class Updater
method Initialize (line 200) | public static void Initialize(string gamePath, string resourcePath, st...
method CheckForUpdates (line 245) | public static void CheckForUpdates()
method CheckLocalFileVersions (line 257) | public static void CheckLocalFileVersions()
method StartUpdate (line 303) | public static void StartUpdate() => PerformUpdateAsync();
method StopUpdate (line 309) | public static void StopUpdate() => terminateUpdate = true;
method ClearVersionInfo (line 314) | public static void ClearVersionInfo()
method IsFileNonexistantOrOriginal (line 326) | public static bool IsFileNonexistantOrOriginal(string filePath)
method MoveMirrorDown (line 341) | public static void MoveMirrorDown(int mirrorIndex)
method MoveMirrorUp (line 353) | public static void MoveMirrorUp(int mirrorIndex)
method IsComponentDownloadInProgress (line 365) | public static bool IsComponentDownloadInProgress()
method GetComponentIndex (line 378) | public static int GetComponentIndex(string componentName)
method GetArchiveInfo (line 393) | internal static void GetArchiveInfo(IniFile versionFile, string filena...
method CreateFileInfo (line 409) | internal static UpdaterFileInfo CreateFileInfo(string filename, string...
method UpdateUserAgent (line 419) | internal static void UpdateUserAgent(HttpClient httpClient)
method DeleteFileAndWait (line 437) | internal static void DeleteFileAndWait(string filepath, int timeout = ...
method CreatePath (line 458) | internal static void CreatePath(string filePath)
method GetUniqueIdForFile (line 466) | internal static string GetUniqueIdForFile(string filePath)
method ReadUpdaterConfig (line 484) | private static void ReadUpdaterConfig()
method ReadLegacyUpdaterConfig (line 576) | private static void ReadLegacyUpdaterConfig(List<UpdateMirror> updateM...
method DoVersionCheckAsync (line 615) | private static async Task DoVersionCheckAsync()
method AreCustomComponentsOutdated (line 782) | private static bool AreCustomComponentsOutdated()
method ExecuteAfterUpdateScriptAsync (line 797) | private static async ValueTask ExecuteAfterUpdateScriptAsync()
method ExecutePreUpdateScriptAsync (line 829) | private static async ValueTask<bool> ExecutePreUpdateScriptAsync()
method ExecuteScript (line 862) | private static void ExecuteScript(string fileName)
method VersionCheckHandle (line 1098) | private static void VersionCheckHandle()
method VerifyLocalFileVersions (line 1170) | private static void VerifyLocalFileVersions()
method PerformUpdateAsync (line 1203) | private static async Task PerformUpdateAsync()
method DownloadFileAsync (line 1477) | private static async ValueTask<string> DownloadFileAsync(UpdaterFileIn...
method UpdateDownloadProgress (line 1584) | private static void UpdateDownloadProgress(int progressPercentage)
method ContainsAnyMask (line 1602) | private static bool ContainsAnyMask(string filePath)
method GetKeys (line 1619) | private static List<string> GetKeys(IniFile iniFile, string sectionName)
method TryGetUniqueId (line 1634) | private static string TryGetUniqueId(string filePath)
method CheckFileIdentifiers (line 1653) | private static string CheckFileIdentifiers(string fileInfoFilename, st...
method ProgressMessageHandlerOnHttpReceiveProgress (line 1692) | private static void ProgressMessageHandlerOnHttpReceiveProgress(object...
method DownloadProgressChanged (line 1694) | private static void DownloadProgressChanged(string currFileName, int c...
method DoCustomComponentsOutdatedEvent (line 1696) | private static void DoCustomComponentsOutdatedEvent() => OnCustomCompo...
method DoFileIdentifiersUpdatedEvent (line 1698) | private static void DoFileIdentifiersUpdatedEvent()
method DoOnUpdateFailed (line 1704) | private static void DoOnUpdateFailed(Exception ex) => OnUpdateFailed?....
method DoOnVersionStateChanged (line 1706) | private static void DoOnVersionStateChanged() => OnVersionStateChanged...
method DoUpdateCompleted (line 1708) | private static void DoUpdateCompleted() => OnUpdateCompleted?.Invoke();
FILE: ClientUpdater/UpdaterFileInfo.cs
type UpdaterFileInfo (line 21) | internal sealed record UpdaterFileInfo(string Filename, int Size)
FILE: ClientUpdater/VersionState.cs
type VersionState (line 21) | public enum VersionState
FILE: DXMainClient/AdminRestarter.cs
class AdminRestarter (line 15) | [SupportedOSPlatform("windows")]
method IsRunningAsAdministrator (line 22) | public static bool IsRunningAsAdministrator()
method RestartAsAdmin (line 40) | public static bool RestartAsAdmin()
FILE: DXMainClient/DXGUI/Campaign/CampaignCheckBox.cs
class CampaignCheckBox (line 13) | public class CampaignCheckBox : GameSessionCheckBox
method CampaignCheckBox (line 15) | public CampaignCheckBox(WindowManager windowManager) : base (windowMan...
method Initialize (line 19) | public override void Initialize()
method ParseControlINIAttribute (line 42) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
FILE: DXMainClient/DXGUI/Campaign/CampaignDropDown.cs
class CampaignDropDown (line 13) | public class CampaignDropDown : GameSessionDropDown
method CampaignDropDown (line 15) | public CampaignDropDown(WindowManager windowManager) : base (windowMan...
method Initialize (line 17) | public override void Initialize()
method ParseControlINIAttribute (line 40) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
FILE: DXMainClient/DXGUI/Campaign/CampaignSelector.cs
class CampaignSelector (line 28) | public class CampaignSelector : XNAWindow
method CampaignSelector (line 44) | public CampaignSelector(WindowManager windowManager, DiscordHandler di...
method AddMission (line 97) | private void AddMission(Mission mission)
method Initialize (line 115) | public override void Initialize()
method LbCampaignList_SelectedIndexChanged (line 289) | private void LbCampaignList_SelectedIndexChanged(object sender, EventA...
method CreateLetterboxedTexture (line 324) | private Texture2D CreateLetterboxedTexture(Texture2D sourceTexture, in...
method BtnCancel_LeftClick (line 379) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method BtnReturn_LeftClick (line 385) | private void BtnReturn_LeftClick(object sender, EventArgs e)
method BtnLaunch_LeftClick (line 390) | private void BtnLaunch_LeftClick(object sender, EventArgs e)
method AreFilesModified (line 410) | private bool AreFilesModified()
method CheaterWindow_YesClicked (line 425) | private void CheaterWindow_YesClicked(object sender, EventArgs e)
method LaunchMission (line 433) | private void LaunchMission(Mission mission)
method WriteMissionSectionToSpawnIni (line 548) | public static void WriteMissionSectionToSpawnIni(IniFile spawnIni, Mis...
method ToggleControls (line 605) | private void ToggleControls(bool enabled)
method GetComputerDifficulty (line 624) | private int GetComputerDifficulty() =>
method GameProcessExited_Callback (line 627) | private void GameProcessExited_Callback()
method GameProcessExited (line 632) | protected virtual void GameProcessExited()
method ReadMissionList (line 670) | private void ReadMissionList()
method LoadCustomMissions (line 682) | private void LoadCustomMissions()
method ParseBattleIni (line 715) | private bool ParseBattleIni(string path)
method LoadMissionsWithFilter (line 759) | public void LoadMissionsWithFilter(ISet<string> selectedTags, bool dis...
method SaveSettings (line 829) | private void SaveSettings()
method SaveUserSettings (line 835) | private void SaveUserSettings()
method SaveCampaignSettings (line 841) | private void SaveCampaignSettings()
method LoadSettings (line 871) | private void LoadSettings()
method LoadUserSettings (line 877) | private void LoadUserSettings() => userSettings.ForEach(c => c.Load());
method LoadCampaignSettings (line 879) | private void LoadCampaignSettings()
method Draw (line 898) | public override void Draw(GameTime gameTime)
method UpdateMissionPreview (line 903) | private void UpdateMissionPreview(string missionPreviewFileName)
FILE: DXMainClient/DXGUI/Campaign/CampaignTagSelector.cs
class CampaignTagSelector (line 16) | public class CampaignTagSelector : INItializableWindow
method CampaignTagSelector (line 22) | public CampaignTagSelector(WindowManager windowManager, DiscordHandler...
method Initialize (line 34) | public override void Initialize()
method BtnCancel_LeftClick (line 81) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method Open (line 86) | public void Open()
method NoFadeSwitch (line 94) | public void NoFadeSwitch()
FILE: DXMainClient/DXGUI/Campaign/CheaterWindow.cs
class CheaterWindow (line 14) | public class CheaterWindow : XNAWindow
method CheaterWindow (line 16) | public CheaterWindow(WindowManager windowManager) : base(windowManager)
method Initialize (line 22) | public override void Initialize()
method BtnCancel_LeftClick (line 76) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method BtnYes_LeftClick (line 81) | private void BtnYes_LeftClick(object sender, EventArgs e)
FILE: DXMainClient/DXGUI/GameClass.cs
class GameClass (line 40) | public class GameClass : Game
method GameClass (line 42) | public GameClass()
method Initialize (line 63) | protected override void Initialize()
method GetRandom (line 243) | private static Random GetRandom()
method BuildServiceProvider (line 252) | private IServiceProvider BuildServiceProvider(WindowManager windowMana...
method InitializeUISettings (line 337) | private void InitializeUISettings()
method SetGraphicsMode (line 372) | public static void SetGraphicsMode(WindowManager wm, bool centerOnScre...
method SetGraphicsMode (line 383) | public static void SetGraphicsMode(WindowManager wm, int windowWidth, ...
method SetGraphicsMode (line 394) | public static void SetGraphicsMode(WindowManager wm, int windowWidth, ...
class GraphicsModeInitializationException (line 536) | class GraphicsModeInitializationException : Exception
method GraphicsModeInitializationException (line 538) | public GraphicsModeInitializationException(string message) : base(mess...
FILE: DXMainClient/DXGUI/Generic/DropDownDataWriteMode.cs
type DropDownDataWriteMode (line 7) | public enum DropDownDataWriteMode
FILE: DXMainClient/DXGUI/Generic/ExtrasWindow.cs
class ExtrasWindow (line 13) | public class ExtrasWindow : XNAWindow
method ExtrasWindow (line 17) | public ExtrasWindow(WindowManager windowManager, StatisticsWindow stat...
method Initialize (line 22) | public override void Initialize()
method BtnExStatistics_LeftClick (line 62) | private void BtnExStatistics_LeftClick(object sender, EventArgs e)
method BtnExMapEditor_LeftClick (line 68) | private void BtnExMapEditor_LeftClick(object sender, EventArgs e)
method BtnExCredits_LeftClick (line 85) | private void BtnExCredits_LeftClick(object sender, EventArgs e)
method BtnExCancel_LeftClick (line 90) | private void BtnExCancel_LeftClick(object sender, EventArgs e)
FILE: DXMainClient/DXGUI/Generic/GameInProgressWindow.cs
class GameInProgressWindow (line 24) | public class GameInProgressWindow : XNAPanel
method GameInProgressWindow (line 28) | public GameInProgressWindow(WindowManager windowManager) : base(window...
method Initialize (line 39) | public override void Initialize()
method SharedUILogic_GameProcessStarted (line 92) | private void SharedUILogic_GameProcessStarted()
method SharedUILogic_GameProcessExited (line 130) | private void SharedUILogic_GameProcessExited()
method HandleGameProcessExited (line 135) | private void HandleGameProcessExited()
method CopyErrorLog (line 224) | private bool CopyErrorLog(string directory, string filename, DateTime?...
method CopySyncErrorLogs (line 263) | private bool CopySyncErrorLogs(string directory, DateTime? dateTime)
method GetNewestDebugSnapshotDirectory (line 306) | private string GetNewestDebugSnapshotDirectory()
method GetAllDebugSnapshotDirectories (line 336) | private List<string> GetAllDebugSnapshotDirectories()
method ProcessScreenshots (line 352) | private void ProcessScreenshots()
FILE: DXMainClient/DXGUI/Generic/GameLoadingWindow.cs
class GameLoadingWindow (line 21) | public class GameLoadingWindow : XNAWindow
method GameLoadingWindow (line 25) | public GameLoadingWindow(WindowManager windowManager, DiscordHandler d...
method Initialize (line 41) | public override void Initialize()
method ListBox_SelectedIndexChanged (line 89) | private void ListBox_SelectedIndexChanged(object sender, EventArgs e)
method Open (line 103) | public void Open()
method BtnCancel_LeftClick (line 108) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method BtnLaunch_LeftClick (line 113) | private void BtnLaunch_LeftClick(object sender, EventArgs e)
method BtnDelete_LeftClick (line 175) | private void BtnDelete_LeftClick(object sender, EventArgs e)
method DeleteMsgBox_YesClicked (line 190) | private void DeleteMsgBox_YesClicked(XNAMessageBox obj)
method GameProcessExited_Callback (line 199) | private void GameProcessExited_Callback()
method GameProcessExited (line 204) | protected virtual void GameProcessExited()
method ListSaves (line 213) | public void ListSaves()
method ParseSaveGame (line 247) | private void ParseSaveGame(string fileName)
FILE: DXMainClient/DXGUI/Generic/GameSessionCheckBox.cs
type CheckBoxMapScoringMode (line 13) | public enum CheckBoxMapScoringMode
class GameSessionCheckBox (line 35) | public class GameSessionCheckBox : XNAClientCheckBox, IGameSessionSetting
method GameSessionCheckBox (line 39) | public GameSessionCheckBox(WindowManager windowManager) : base (window...
method ParseControlINIAttribute (line 116) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method ApplySpawnIniCode (line 183) | public void ApplySpawnIniCode(IniFile spawnIni)
method ApplyMapCode (line 197) | public void ApplyMapCode(IniFile mapIni, GameMode gameMode)
method OnLeftClick (line 205) | public override void OnLeftClick(InputEventArgs inputEventArgs)
method ResetToDefault (line 217) | public void ResetToDefault()
FILE: DXMainClient/DXGUI/Generic/GameSessionDropDown.cs
class GameSessionDropDown (line 21) | public class GameSessionDropDown : XNAClientDropDown, IGameSessionSetting
method GameSessionDropDown (line 26) | public GameSessionDropDown(WindowManager windowManager) : base(windowM...
method ParseControlINIAttribute (line 82) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method ApplySpawnIniCode (line 163) | public void ApplySpawnIniCode(IniFile spawnIni)
method ApplyMapCode (line 189) | public void ApplyMapCode(IniFile mapIni, GameMode gameMode)
method OnLeftClick (line 199) | public override void OnLeftClick(InputEventArgs inputEventArgs)
FILE: DXMainClient/DXGUI/Generic/LoadingScreen.cs
class LoadingScreen (line 21) | public class LoadingScreen : XNAWindow
method LoadingScreen (line 23) | public LoadingScreen(
method Initialize (line 51) | public override void Initialize()
method GetINIAttributes (line 79) | protected override void GetINIAttributes(IniFile iniFile)
method InitUpdater (line 91) | private void InitUpdater()
method LogGameClientVersion (line 101) | private void LogGameClientVersion()
method Finish (line 107) | private void Finish()
method Update (line 137) | public override void Update(GameTime gameTime)
FILE: DXMainClient/DXGUI/Generic/MainMenu.cs
class MainMenu (line 33) | class MainMenu : XNAWindow, ISwitchable
method MainMenu (line 42) | public MainMenu(
method Initialize (line 169) | public override void Initialize()
method SetButtonHotkeys (line 338) | private void SetButtonHotkeys(bool enableHotkeys)
method OptionsWindow_EnabledChanged (line 371) | private void OptionsWindow_EnabledChanged(object sender, EventArgs e)
method SharedUILogic_GameProcessStarting (line 383) | private void SharedUILogic_GameProcessStarting()
method Updater_Restart (line 400) | private void Updater_Restart(object sender, EventArgs e) =>
method SettingsSaved (line 407) | private void SettingsSaved(object sender, EventArgs e)
method CheckRequiredFiles (line 437) | private void CheckRequiredFiles()
method CheckForbiddenFiles (line 466) | private void CheckForbiddenFiles()
method CheckIfFirstRun (line 501) | private void CheckIfFirstRun()
method CheckAndApplyTranslationGameFiles (line 521) | private void CheckAndApplyTranslationGameFiles(bool skipVersionCheck =...
method FirstRunMessageBox_NoClicked (line 544) | private void FirstRunMessageBox_NoClicked(XNAMessageBox messageBox)
method FirstRunMessageBox_YesClicked (line 550) | private void FirstRunMessageBox_YesClicked(XNAMessageBox messageBox) =...
method SharedUILogic_GameProcessStarted (line 552) | private void SharedUILogic_GameProcessStarted() => MusicOff();
method WindowManager_GameClosing (line 554) | private void WindowManager_GameClosing(object sender, EventArgs e) => ...
method SkirmishLobby_Exited (line 556) | private void SkirmishLobby_Exited(object sender, EventArgs e)
method LanLobby_Exited (line 562) | private void LanLobby_Exited(object sender, EventArgs e)
method CnCNetInfoController_CnCNetGameCountUpdated (line 573) | private void CnCNetInfoController_CnCNetGameCountUpdated(object sender...
method Clean (line 587) | private void Clean()
method PostInit (line 605) | public void PostInit()
method LoadThemeSong (line 708) | private void LoadThemeSong()
method RevertSwitchMainMenuMusicFormat (line 738) | private void RevertSwitchMainMenuMusicFormat()
method UpdateWindow_UpdateFailed (line 757) | private void UpdateWindow_UpdateFailed(object sender, UpdateFailureEve...
method UpdateWindow_UpdateCancelled (line 776) | private void UpdateWindow_UpdateCancelled(object sender, EventArgs e)
method UpdateWindow_UpdateCompleted (line 785) | private void UpdateWindow_UpdateCompleted(object sender, EventArgs e)
method LblUpdateStatus_LeftClick (line 802) | private void LblUpdateStatus_LeftClick(object sender, EventArgs e)
method LblVersion_LeftClick (line 815) | private void LblVersion_LeftClick(object sender, EventArgs e)
method ForceUpdate (line 820) | private void ForceUpdate()
method CheckForUpdates (line 832) | private void CheckForUpdates()
method Updater_FileIdentifiersUpdated (line 844) | private void Updater_FileIdentifiersUpdated()
method HandleFileIdentifierUpdate (line 850) | private void HandleFileIdentifierUpdate()
method Updater_OnCustomComponentsOutdated (line 892) | private void Updater_OnCustomComponentsOutdated()
method CCMsgBox_YesClicked (line 916) | private void CCMsgBox_YesClicked(XNAMessageBox messageBox)
method UpdateQueryWindow_UpdateDeclined (line 925) | private void UpdateQueryWindow_UpdateDeclined(object sender, EventArgs e)
method UpdateQueryWindow_UpdateAccepted (line 936) | private void UpdateQueryWindow_UpdateAccepted(object sender, EventArgs e)
method ManualUpdateQueryWindow_Closed (line 946) | private void ManualUpdateQueryWindow_Closed(object sender, EventArgs e)
method BtnOptions_LeftClick (line 951) | private void BtnOptions_LeftClick(object sender, EventArgs e)
method BtnNewCampaign_LeftClick (line 954) | private void BtnNewCampaign_LeftClick(object sender, EventArgs e)
method BtnLoadGame_LeftClick (line 957) | private void BtnLoadGame_LeftClick(object sender, EventArgs e)
method BtnLan_LeftClick (line 960) | private void BtnLan_LeftClick(object sender, EventArgs e)
method BtnCnCNet_LeftClick (line 973) | private void BtnCnCNet_LeftClick(object sender, EventArgs e) => topBar...
method BtnSkirmish_LeftClick (line 975) | private void BtnSkirmish_LeftClick(object sender, EventArgs e)
method BtnMapEditor_LeftClick (line 983) | private void BtnMapEditor_LeftClick(object sender, EventArgs e) => Lau...
method BtnStatistics_LeftClick (line 985) | private void BtnStatistics_LeftClick(object sender, EventArgs e) =>
method BtnCredits_LeftClick (line 988) | private void BtnCredits_LeftClick(object sender, EventArgs e)
method BtnExtras_LeftClick (line 993) | private void BtnExtras_LeftClick(object sender, EventArgs e) =>
method BtnExit_LeftClick (line 996) | private void BtnExit_LeftClick(object sender, EventArgs e)
method SharedUILogic_GameProcessExited (line 1004) | private void SharedUILogic_GameProcessExited() =>
method HandleGameProcessExited (line 1007) | private void HandleGameProcessExited()
method CncnetLobby_UpdateCheck (line 1026) | private void CncnetLobby_UpdateCheck(object sender, EventArgs e)
method Update (line 1032) | public override void Update(GameTime gameTime)
method Draw (line 1040) | public override void Draw(GameTime gameTime)
method PlayMusic (line 1051) | private void PlayMusic()
method FadeMusic (line 1078) | private void FadeMusic(GameTime gameTime)
method FadeMusicExit (line 1105) | private void FadeMusicExit()
method ExitClient (line 1134) | private void ExitClient()
method SwitchOn (line 1141) | public void SwitchOn()
method SwitchOff (line 1155) | public void SwitchOff()
method MusicOff (line 1161) | private void MusicOff()
method IsMediaPlayerAvailable (line 1182) | private bool IsMediaPlayerAvailable()
method LaunchMapEditor (line 1196) | private void LaunchMapEditor()
method GetSwitchName (line 1211) | public string GetSwitchName() => "Main Menu".L10N("Client:Main:MainMen...
FILE: DXMainClient/DXGUI/Generic/ManualUpdateQueryWindow.cs
class ManualUpdateQueryWindow (line 14) | public class ManualUpdateQueryWindow : XNAWindow
method ManualUpdateQueryWindow (line 19) | public ManualUpdateQueryWindow(WindowManager windowManager) : base(win...
method Initialize (line 26) | public override void Initialize()
method BtnDownload_LeftClick (line 61) | private void BtnDownload_LeftClick(object sender, EventArgs e)
method BtnClose_LeftClick (line 64) | private void BtnClose_LeftClick(object sender, EventArgs e)
method SetInfo (line 67) | public void SetInfo(string version, string downloadUrl)
FILE: DXMainClient/DXGUI/Generic/OptionPanels/AudioOptionsPanel.cs
class AudioOptionsPanel (line 11) | class AudioOptionsPanel : XNAOptionsPanel
method AudioOptionsPanel (line 25) | public AudioOptionsPanel(WindowManager windowManager, UserINISettings ...
method Initialize (line 47) | public override void Initialize()
method ChkMainMenuMusic_CheckedChanged (line 203) | private void ChkMainMenuMusic_CheckedChanged(object sender, EventArgs e)
method TrbScoreVolume_ValueChanged (line 209) | private void TrbScoreVolume_ValueChanged(object sender, EventArgs e)
method TrbSoundVolume_ValueChanged (line 214) | private void TrbSoundVolume_ValueChanged(object sender, EventArgs e)
method TrbVoiceVolume_ValueChanged (line 219) | private void TrbVoiceVolume_ValueChanged(object sender, EventArgs e)
method TrbClientVolume_ValueChanged (line 224) | private void TrbClientVolume_ValueChanged(object sender, EventArgs e)
method Load (line 230) | public override void Load()
method Save (line 247) | public override bool Save()
FILE: DXMainClient/DXGUI/Generic/OptionPanels/CnCNetOptionsPanel.cs
class CnCNetOptionsPanel (line 15) | class CnCNetOptionsPanel : XNAOptionsPanel
method CnCNetOptionsPanel (line 17) | public CnCNetOptionsPanel(WindowManager windowManager, UserINISettings...
method Initialize (line 44) | public override void Initialize()
method InitOptions (line 53) | private void InitOptions()
method InitAllowPrivateMessagesFromDropdown (line 176) | private void InitAllowPrivateMessagesFromDropdown()
method InitGameListPanel (line 220) | private void InitGameListPanel()
method ChkSkipLoginWindow_CheckedChanged (line 301) | private void ChkSkipLoginWindow_CheckedChanged(object sender, EventArg...
method ChkPersistentMode_CheckedChanged (line 306) | private void ChkPersistentMode_CheckedChanged(object sender, EventArgs e)
method CheckConnectOnStartupAllowance (line 311) | private void CheckConnectOnStartupAllowance()
method Load (line 323) | public override void Load()
method Save (line 359) | public override bool Save()
method SetAllowPrivateMessagesFromState (line 389) | private void SetAllowPrivateMessagesFromState(int state)
method GetAllowPrivateMessagesFromState (line 398) | private int GetAllowPrivateMessagesFromState()
FILE: DXMainClient/DXGUI/Generic/OptionPanels/ComponentsPanel.cs
class ComponentsPanel (line 15) | class ComponentsPanel : XNAOptionsPanel
method ComponentsPanel (line 17) | public ComponentsPanel(WindowManager windowManager, UserINISettings in...
method Initialize (line 26) | public override void Initialize()
method Updater_FileIdentifiersUpdated (line 82) | private void Updater_FileIdentifiersUpdated()
method Load (line 85) | public override void Load()
method UpdateInstallationButtons (line 92) | private void UpdateInstallationButtons()
method Btn_LeftClick (line 135) | private void Btn_LeftClick(object sender, EventArgs e)
method MsgBox_YesClicked (line 178) | private void MsgBox_YesClicked(XNAMessageBox messageBox)
method InstallComponent (line 190) | public void InstallComponent(int id)
method cc_DownloadProgressChanged (line 207) | private void cc_DownloadProgressChanged(CustomComponent c, int percent...
method HandleDownloadProgressChanged (line 212) | private void HandleDownloadProgressChanged(CustomComponent cc, int per...
method cc_DownloadFinished (line 229) | private void cc_DownloadFinished(CustomComponent c, bool success)
method HandleDownloadFinished (line 234) | private void HandleDownloadFinished(CustomComponent cc, bool success)
method CancelAllDownloads (line 266) | public void CancelAllDownloads()
method Open (line 282) | public void Open()
method GetSizeString (line 287) | private string GetSizeString(long size)
FILE: DXMainClient/DXGUI/Generic/OptionPanels/DisplayOptionsPanel.cs
class DisplayOptionsPanel (line 26) | class DisplayOptionsPanel : XNAOptionsPanel
method DisplayOptionsPanel (line 34) | public DisplayOptionsPanel(WindowManager windowManager, UserINISetting...
method Initialize (line 64) | public override void Initialize()
method AddCompatibilityFixControls (line 301) | [SupportedOSPlatform("windows")]
method PostInit (line 394) | public void PostInit()
method BtnGameCompatibilityFix_LeftClick (line 399) | [SupportedOSPlatform("windows")]
method BtnMapEditorCompatibilityFix_LeftClick (line 437) | [SupportedOSPlatform("windows")]
method ChkBorderlessMenu_CheckedChanged (line 477) | private void ChkBorderlessMenu_CheckedChanged(object sender, EventArgs e)
method ChkWindowedMode_CheckedChanged (line 502) | private void ChkWindowedMode_CheckedChanged(object sender, EventArgs e)
method LoadRenderer (line 517) | private void LoadRenderer()
method Load (line 535) | public override void Load()
method Save (line 621) | public override bool Save()
FILE: DXMainClient/DXGUI/Generic/OptionPanels/GameOptionsPanel.cs
class GameOptionsPanel (line 14) | class GameOptionsPanel : XNAOptionsPanel
method GameOptionsPanel (line 21) | public GameOptionsPanel(WindowManager windowManager, UserINISettings i...
method Initialize (line 43) | public override void Initialize()
method BtnConfigureHotkeys_LeftClick (line 183) | private void BtnConfigureHotkeys_LeftClick(object sender, EventArgs e)
method HotkeyConfigWindow_EnabledChanged (line 194) | private void HotkeyConfigWindow_EnabledChanged(object sender, EventArg...
method TrbScrollRate_ValueChanged (line 200) | private void TrbScrollRate_ValueChanged(object sender, EventArgs e)
method Load (line 205) | public override void Load()
method Save (line 220) | public override bool Save()
method ReverseScrollRate (line 234) | private int ReverseScrollRate(int scrollRate)
FILE: DXMainClient/DXGUI/Generic/OptionPanels/UpdaterOptionsPanel.cs
class UpdaterOptionsPanel (line 12) | class UpdaterOptionsPanel : XNAOptionsPanel
method UpdaterOptionsPanel (line 14) | public UpdaterOptionsPanel(WindowManager windowManager, UserINISetting...
method Initialize (line 25) | public override void Initialize()
method BtnForceUpdate_LeftClick (line 78) | private void BtnForceUpdate_LeftClick(object sender, EventArgs e)
method ForceUpdateMsgBox_YesClicked (line 92) | private void ForceUpdateMsgBox_YesClicked(XNAMessageBox obj)
method btnMoveUp_LeftClick (line 98) | private void btnMoveUp_LeftClick(object sender, EventArgs e)
method btnMoveDown_LeftClick (line 114) | private void btnMoveDown_LeftClick(object sender, EventArgs e)
method Load (line 130) | public override void Load()
method Save (line 151) | public override bool Save()
method ToggleMainMenuOnlyOptions (line 170) | public override void ToggleMainMenuOnlyOptions(bool enable)
FILE: DXMainClient/DXGUI/Generic/OptionsWindow.cs
class OptionsWindow (line 17) | public class OptionsWindow : XNAWindow
method OptionsWindow (line 19) | public OptionsWindow(WindowManager windowManager, GameCollection gameC...
method Initialize (line 38) | public override void Initialize()
method SetTopBar (line 111) | public void SetTopBar(XNAControl topBar) => this.topBar = topBar;
method GetINIAttributes (line 118) | protected override void GetINIAttributes(IniFile iniFile)
method TabControl_SelectedIndexChanged (line 126) | private void TabControl_SelectedIndexChanged(object sender, EventArgs e)
method BtnBack_LeftClick (line 135) | private void BtnBack_LeftClick(object sender, EventArgs e)
method ExitDownloadCancelConfirmation_YesClicked (line 152) | private void ExitDownloadCancelConfirmation_YesClicked(XNAMessageBox m...
method BtnSave_LeftClick (line 159) | private void BtnSave_LeftClick(object sender, EventArgs e)
method SaveDownloadCancelConfirmation_YesClicked (line 175) | private void SaveDownloadCancelConfirmation_YesClicked(XNAMessageBox m...
method SaveSettings (line 182) | private void SaveSettings()
method RestartMsgBox_YesClicked (line 215) | private void RestartMsgBox_YesClicked(XNAMessageBox messageBox) => Win...
method RefreshOptionPanels (line 224) | private bool RefreshOptionPanels()
method RefreshSettings (line 245) | public void RefreshSettings()
method Open (line 258) | public void Open()
method ToggleMainMenuOnlyOptions (line 270) | public void ToggleMainMenuOnlyOptions(bool enable)
method SwitchToCustomComponentsPanel (line 278) | public void SwitchToCustomComponentsPanel()
method InstallCustomComponent (line 286) | public void InstallCustomComponent(int id) => componentsPanel.InstallC...
method PostInit (line 288) | public void PostInit()
FILE: DXMainClient/DXGUI/Generic/PrivacyNotification.cs
class PrivacyNotification (line 13) | class PrivacyNotification : XNAWindow
method PrivacyNotification (line 15) | public PrivacyNotification(WindowManager windowManager) : base(windowM...
method Initialize (line 20) | public override void Initialize()
method Update (line 86) | public override void Update(GameTime gameTime)
FILE: DXMainClient/DXGUI/Generic/StatisticsWindow.cs
class StatisticsWindow (line 17) | public class StatisticsWindow : XNAWindow
method StatisticsWindow (line 19) | public StatisticsWindow(WindowManager windowManager, MapLoader mapLoader)
method Initialize (line 84) | public override void Initialize()
method StatisticsWindow_VisibleChanged (line 427) | private void StatisticsWindow_VisibleChanged(object sender, EventArgs e)
method Instance_GameAdded (line 432) | private void Instance_GameAdded(object sender, EventArgs e)
method ChkIncludeSpectatedGames_CheckedChanged (line 437) | private void ChkIncludeSpectatedGames_CheckedChanged(object sender, Ev...
method AddTotalStatisticsLabel (line 442) | private void AddTotalStatisticsLabel(string name, string text, Point l...
method TabControl_SelectedIndexChanged (line 451) | private void TabControl_SelectedIndexChanged(object sender, EventArgs e)
method CmbGameClassFilter_SelectedIndexChanged (line 469) | private void CmbGameClassFilter_SelectedIndexChanged(object sender, Ev...
method CmbGameModeFilter_SelectedIndexChanged (line 474) | private void CmbGameModeFilter_SelectedIndexChanged(object sender, Eve...
method LbGameList_SelectedIndexChanged (line 479) | private void LbGameList_SelectedIndexChanged(object sender, EventArgs e)
method TeamIndexToString (line 581) | private string TeamIndexToString(int teamIndex)
method ReadStatistics (line 591) | private void ReadStatistics()
method ListGameModes (line 598) | private void ListGameModes()
method ListGames (line 623) | private void ListGames()
method ListAllGames (line 678) | private void ListAllGames()
method ListOnlineGames (line 688) | private void ListOnlineGames()
method ListPvPGames (line 717) | private void ListPvPGames()
method ListCoOpGames (line 748) | private void ListCoOpGames()
method ListSkirmishGames (line 786) | private void ListSkirmishGames()
method ListGameIndexIfPrerequisitesMet (line 819) | private void ListGameIndexIfPrerequisitesMet(int gameIndex)
method SetTotalStatistics (line 846) | private void SetTotalStatistics()
method FindLocalPlayer (line 980) | private PlayerStatistics FindLocalPlayer(MatchStatistics ms)
method GetHighestIndex (line 995) | private int GetHighestIndex(int[] t)
method ClearAllStatistics (line 1012) | private void ClearAllStatistics()
method BtnReturnToMenu_LeftClick (line 1022) | private void BtnReturnToMenu_LeftClick(object sender, EventArgs e)
method BtnClearStatistics_LeftClick (line 1027) | private void BtnClearStatistics_LeftClick(object sender, EventArgs e)
method ClearStatisticsConfirmation_YesClicked (line 1035) | private void ClearStatisticsConfirmation_YesClicked(XNAMessageBox mess...
FILE: DXMainClient/DXGUI/Generic/TopBar.cs
class TopBar (line 21) | public class TopBar : XNAPanel
method TopBar (line 37) | public TopBar(
method AddPrimarySwitchable (line 85) | public void AddPrimarySwitchable(ISwitchable switchable)
method RemovePrimarySwitchable (line 91) | public void RemovePrimarySwitchable(ISwitchable switchable)
method SetSecondarySwitch (line 97) | public void SetSecondarySwitch(ISwitchable switchable)
method SetTertiarySwitch (line 100) | public void SetTertiarySwitch(ISwitchable switchable)
method SetOptionsWindow (line 103) | public void SetOptionsWindow(OptionsWindow optionsWindow)
method OptionsWindow_EnabledChanged (line 109) | private void OptionsWindow_EnabledChanged(object sender, EventArgs e)
method Clean (line 120) | public void Clean()
method Initialize (line 126) | public override void Initialize()
method PrivateMessageHandler_UnreadMessageCountUpdated (line 230) | private void PrivateMessageHandler_UnreadMessageCountUpdated(object se...
method UpdatePrivateMessagesBtnLabel (line 233) | private void UpdatePrivateMessagesBtnLabel(int unreadMessageCount)
method CnCNetInfoController_CnCNetGameCountUpdated (line 243) | private void CnCNetInfoController_CnCNetGameCountUpdated(object sender...
method ConnectionManager_ConnectionLost (line 254) | private void ConnectionManager_ConnectionLost(object sender, Online.Ev...
method ConnectionManager_ConnectAttemptFailed (line 260) | private void ConnectionManager_ConnectAttemptFailed(object sender, Eve...
method ConnectionManager_AttemptedServerChanged (line 266) | private void ConnectionManager_AttemptedServerChanged(object sender, O...
method ConnectionManager_WelcomeMessageReceived (line 272) | private void ConnectionManager_WelcomeMessageReceived(object sender, O...
method ConnectionManager_Disconnected (line 275) | private void ConnectionManager_Disconnected(object sender, EventArgs e)
method ConnectionEvent (line 282) | private void ConnectionEvent(string text)
method BtnLogout_LeftClick (line 290) | private void BtnLogout_LeftClick(object sender, EventArgs e)
method ConnectionManager_Connected (line 297) | private void ConnectionManager_Connected(object sender, EventArgs e)
method SwitchToPrimary (line 300) | public void SwitchToPrimary()
method GetTopMostPrimarySwitchable (line 303) | public ISwitchable GetTopMostPrimarySwitchable()
method SwitchToSecondary (line 306) | public void SwitchToSecondary()
method BtnCnCNetLobby_LeftClick (line 309) | private void BtnCnCNetLobby_LeftClick(object sender, EventArgs e)
method BtnMainButton_LeftClick (line 321) | private void BtnMainButton_LeftClick(object sender, EventArgs e)
method BtnPrivateMessages_LeftClick (line 334) | private void BtnPrivateMessages_LeftClick(object sender, EventArgs e)
method BtnOptions_LeftClick (line 337) | private void BtnOptions_LeftClick(object sender, EventArgs e)
method Keyboard_OnKeyPressed (line 343) | private void Keyboard_OnKeyPressed(object sender, KeyPressEventArgs e)
method OnMouseOnControl (line 368) | public override void OnMouseOnControl()
method BringDown (line 376) | void BringDown()
method SetMainButtonText (line 382) | public void SetMainButtonText(string text)
method SetSwitchButtonsClickable (line 385) | public void SetSwitchButtonsClickable(bool allowClick)
method SetOptionsButtonClickable (line 395) | public void SetOptionsButtonClickable(bool allowClick)
method SetLanMode (line 401) | public void SetLanMode(bool lanMode)
method Update (line 411) | public override void Update(GameTime gameTime)
method Draw (line 451) | public override void Draw(GameTime gameTime)
type SwitchType (line 459) | public enum SwitchType
FILE: DXMainClient/DXGUI/Generic/URLHandler.cs
class URLHandler (line 15) | public static class URLHandler
method OpenLink (line 20) | public static void OpenLink(WindowManager wm, string url)
FILE: DXMainClient/DXGUI/Generic/UpdateQueryWindow.cs
class UpdateQueryWindow (line 14) | public class UpdateQueryWindow : XNAWindow
method UpdateQueryWindow (line 22) | public UpdateQueryWindow(WindowManager windowManager) : base(windowMan...
method Initialize (line 29) | public override void Initialize()
method LblChangelogLink_LeftClick (line 77) | private void LblChangelogLink_LeftClick(object sender, EventArgs e)
method BtnYes_LeftClick (line 82) | private void BtnYes_LeftClick(object sender, EventArgs e)
method BtnNo_LeftClick (line 87) | private void BtnNo_LeftClick(object sender, EventArgs e)
method SetInfo (line 92) | public void SetInfo(string version, int updateSize)
FILE: DXMainClient/DXGUI/Generic/UpdateWindow.cs
class UpdateWindow (line 18) | public class UpdateWindow : XNAWindow
method UpdateWindow (line 35) | public UpdateWindow(WindowManager windowManager) : base(windowManager)
method Initialize (line 64) | public override void Initialize()
method Updater_FileIdentifiersUpdated (line 150) | private void Updater_FileIdentifiersUpdated()
method Updater_LocalFileCheckProgressChanged (line 173) | private void Updater_LocalFileCheckProgressChanged(int checkedFileCoun...
method UpdateFileProgress (line 179) | private void UpdateFileProgress(int value)
method Updater_UpdateProgressChanged (line 185) | private void Updater_UpdateProgressChanged(string currFileName, int cu...
method HandleUpdateProgressChange (line 196) | private void HandleUpdateProgressChange()
method Updater_OnFileDownloadCompleted (line 240) | private void Updater_OnFileDownloadCompleted(string archiveName)
method HandleFileDownloadCompleted (line 245) | private void HandleFileDownloadCompleted(string archiveName)
method Updater_OnUpdateCompleted (line 250) | private void Updater_OnUpdateCompleted()
method HandleUpdateCompleted (line 255) | private void HandleUpdateCompleted()
method Updater_OnUpdateFailed (line 263) | private void Updater_OnUpdateFailed(Exception ex)
method HandleUpdateFailed (line 268) | private void HandleUpdateFailed(string updateFailureErrorMessage)
method BtnCancel_LeftClick (line 276) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method CloseWindow (line 284) | private void CloseWindow()
method SetData (line 294) | public void SetData(string newGameVersion)
method ForceUpdate (line 300) | public void ForceUpdate()
method Update (line 308) | public override void Update(GameTime gameTime)
method Draw (line 327) | public override void Draw(GameTime gameTime)
class UpdateFailureEventArgs (line 343) | public class UpdateFailureEventArgs : EventArgs
method UpdateFailureEventArgs (line 345) | public UpdateFailureEventArgs(string reason)
class TaskbarProgress (line 366) | public class TaskbarProgress
type TaskbarStates (line 368) | public enum TaskbarStates
type ITaskbarList3 (line 377) | [ComImportAttribute()]
method HrInit (line 383) | [PreserveSig]
method AddTab (line 385) | [PreserveSig]
method DeleteTab (line 387) | [PreserveSig]
method ActivateTab (line 389) | [PreserveSig]
method SetActiveAlt (line 391) | [PreserveSig]
method MarkFullscreenWindow (line 395) | [PreserveSig]
method SetProgressValue (line 399) | [PreserveSig]
method SetProgressState (line 401) | [PreserveSig]
class TaskbarInstance (line 405) | [GuidAttribute("56FDF344-FD6D-11d0-958A-006097C9A090")]
method SetState (line 414) | public void SetState(IntPtr windowHandle, TaskbarStates taskbarState)
method SetValue (line 419) | public void SetValue(IntPtr windowHandle, double progressValue, double...
FILE: DXMainClient/DXGUI/IGameSessionSetting.cs
type IGameSessionSetting (line 8) | public interface IGameSessionSetting
method ApplySpawnIniCode (line 34) | void ApplySpawnIniCode(IniFile spawnIni);
method ApplyMapCode (line 39) | void ApplyMapCode(IniFile mapIni, GameMode gameMode);
FILE: DXMainClient/DXGUI/IMessageView.cs
type IMessageView (line 5) | public interface IMessageView
method AddMessage (line 7) | void AddMessage(ChatMessage message);
FILE: DXMainClient/DXGUI/ISwitchable.cs
type ISwitchable (line 6) | public interface ISwitchable
method SwitchOn (line 8) | void SwitchOn();
method SwitchOff (line 10) | void SwitchOff();
method GetSwitchName (line 12) | string GetSwitchName();
FILE: DXMainClient/DXGUI/Multiplayer/ChatListBox.cs
class ChatListBox (line 20) | public class ChatListBox : XNAListBox, IMessageView
method ChatListBox (line 22) | public ChatListBox(WindowManager windowManager) : base(windowManager)
method ChatListBox_DoubleLeftClick (line 27) | private void ChatListBox_DoubleLeftClick(object sender, EventArgs e)
method AddMessage (line 45) | public void AddMessage(string message)
method AddMessage (line 50) | public void AddMessage(string sender, string message, Color color)
method AddMessage (line 55) | public void AddMessage(ChatMessage message)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/ChoiceNotificationBox.cs
class ChoiceNotificationBox (line 21) | public class ChoiceNotificationBox : XNAPanel
method ChoiceNotificationBox (line 27) | public ChoiceNotificationBox(WindowManager windowManager) : base(windo...
method Initialize (line 52) | public override void Initialize()
method Show (line 109) | public void Show(
method Hide (line 142) | public void Hide()
method Update (line 151) | public override void Update(GameTime gameTime)
method AffirmativeButton_LeftClick (line 190) | private void AffirmativeButton_LeftClick(object sender, EventArgs e)
method NegativeButton_LeftClick (line 196) | private void NegativeButton_LeftClick(object sender, EventArgs e)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetGameLoadingLobby.cs
class CnCNetGameLoadingLobby (line 24) | public class CnCNetGameLoadingLobby : GameLoadingLobbyBase
method CnCNetGameLoadingLobby (line 40) | public CnCNetGameLoadingLobby(
method Initialize (line 106) | public override void Initialize()
method Refresh (line 148) | public override void Refresh(bool isHost)
method BtnChangeTunnel_LeftClick (line 156) | private void BtnChangeTunnel_LeftClick(object sender, EventArgs e) => ...
method GameBroadcastTimer_TimeElapsed (line 158) | private void GameBroadcastTimer_TimeElapsed(object sender, EventArgs e...
method ConnectionManager_Disconnected (line 160) | private void ConnectionManager_Disconnected(object sender, EventArgs e...
method ConnectionManager_ConnectionLost (line 162) | private void ConnectionManager_ConnectionLost(object sender, Connectio...
method SetUp (line 167) | public void SetUp(bool isHost, CnCNetTunnel tunnel, Channel channel,
method TunnelHandler_CurrentTunnelPinged (line 187) | private void TunnelHandler_CurrentTunnelPinged(object sender, EventArg...
method Clear (line 195) | public void Clear()
method Channel_CTCPReceived (line 227) | private void Channel_CTCPReceived(object sender, ChannelCTCPEventArgs e)
method OnJoined (line 241) | public void OnJoined()
method Channel_UserAdded (line 282) | private void Channel_UserAdded(object sender, ChannelUserEventArgs e)
method Channel_UserLeft (line 296) | private void Channel_UserLeft(object sender, UserNameEventArgs e)
method Channel_UserQuitIRC (line 302) | private void Channel_UserQuitIRC(object sender, UserNameEventArgs e)
method RemovePlayer (line 308) | private void RemovePlayer(string playerName)
method Channel_MessageAdded (line 330) | private void Channel_MessageAdded(object sender, IRCMessageEventArgs e)
method AddNotice (line 345) | protected override void AddNotice(string message, Color color) => chan...
method BroadcastOptions (line 347) | protected override void BroadcastOptions()
method SendChatMessage (line 370) | protected override void SendChatMessage(string message)
method RequestReadyStatus (line 377) | protected override void RequestReadyStatus() =>
method GetReadyNotification (line 380) | protected override void GetReadyNotification()
method NotAllPresentNotification (line 390) | protected override void NotAllPresentNotification()
method ShowTunnelSelectionWindow (line 401) | private void ShowTunnelSelectionWindow(string description)
method TunnelSelectionWindow_TunnelSelected (line 407) | private void TunnelSelectionWindow_TunnelSelected(object sender, Tunne...
method HandleGetReadyNotification (line 416) | private void HandleGetReadyNotification(string sender)
method HandleNotAllPresentNotification (line 424) | private void HandleNotAllPresentNotification(string sender)
method HandleFileHashCommand (line 432) | private void HandleFileHashCommand(string sender, string fileHash)
method HandleCheaterNotification (line 447) | private void HandleCheaterNotification(string sender, string cheaterName)
method HandleTunnelPing (line 458) | private void HandleTunnelPing(string sender, int pingInMs)
method HandleOptionsMessage (line 469) | private void HandleOptionsMessage(string sender, string data)
method HandleInvalidSaveIndexCommand (line 517) | private void HandleInvalidSaveIndexCommand(string sender)
method HandleStartGameCommand (line 531) | private void HandleStartGameCommand(string sender, string data)
method HandlePlayerReadyRequest (line 568) | private void HandlePlayerReadyRequest(string sender, int readyStatus)
method HandleTunnelServerChangeMessage (line 583) | private void HandleTunnelServerChangeMessage(string sender, string tun...
method HandleTunnelServerChange (line 611) | private void HandleTunnelServerChange(CnCNetTunnel tunnel)
method HostStartGame (line 620) | protected override void HostStartGame()
method WriteSpawnIniAdditions (line 653) | protected override void WriteSpawnIniAdditions(IniFile spawnIni)
method HandleGameProcessExited (line 661) | protected override void HandleGameProcessExited()
method LeaveGame (line 668) | protected override void LeaveGame() => Clear();
method ChangeChatColor (line 670) | public void ChangeChatColor(IRCColor chatColor)
method BroadcastGame (line 676) | private void BroadcastGame()
method GetSwitchName (line 726) | public override string GetSwitchName() => "Load Game".L10N("Client:Mai...
method UpdateDiscordPresence (line 728) | protected override void UpdateDiscordPresence(bool resetTimer = false)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLobby.cs
class CnCNetLobby (line 32) | internal class CnCNetLobby : XNAWindow, ISwitchable
method CnCNetLobby (line 36) | public CnCNetLobby(WindowManager windowManager, CnCNetManager connecti...
method GameList_ClientRectangleUpdated (line 149) | private void GameList_ClientRectangleUpdated(object sender, EventArgs e)
method LogoutEvent (line 154) | private void LogoutEvent(object sender, EventArgs e)
method Initialize (line 159) | public override void Initialize()
method BtnGameSortAlpha_LeftClick (line 380) | private void BtnGameSortAlpha_LeftClick(object sender, EventArgs e)
method SortAndRefreshHostedGames (line 389) | private void SortAndRefreshHostedGames()
method BtnGameFilterOptions_LeftClick (line 394) | private void BtnGameFilterOptions_LeftClick(object sender, EventArgs e)
method RefreshGameSortAlphaBtn (line 402) | private void RefreshGameSortAlphaBtn()
method RefreshGameFiltersBtn (line 408) | private void RefreshGameFiltersBtn()
method GameFiltersPanel_VisibleChanged (line 413) | private void GameFiltersPanel_VisibleChanged(object sender, EventArgs e)
method TbGameSearch_InputReceived (line 422) | private void TbGameSearch_InputReceived(object sender, EventArgs e)
method HostedGameMatches (line 434) | private bool HostedGameMatches(GenericHostedGame hg)
method GameOptionsMatch (line 481) | private bool GameOptionsMatch(HostedCnCNetGame game)
method OnCnCNetGameCountUpdated (line 505) | private void OnCnCNetGameCountUpdated(object sender, PlayerCountEventA...
method UpdateOnlineCount (line 507) | private void UpdateOnlineCount(int playerCount) => lblOnlineCount.Text...
method InitializeGameList (line 509) | private void InitializeGameList()
method PostUIInit (line 570) | private void PostUIInit()
method ConnectionManager_BannedFromChannel (line 659) | private void ConnectionManager_BannedFromChannel(object sender, Channe...
method SharedUILogic_GameProcessStarted (line 684) | private void SharedUILogic_GameProcessStarted()
method SharedUILogic_GameProcessExited (line 690) | private void SharedUILogic_GameProcessExited()
method Instance_SettingsSaved (line 696) | private void Instance_SettingsSaved(object sender, EventArgs e)
method LbPlayerList_RightClick (line 724) | private void LbPlayerList_RightClick(object sender, EventArgs e)
method LbChatMessages_RightClick (line 739) | private void LbChatMessages_RightClick(object sender, EventArgs e)
method ShowPlayerMessageContextMenu (line 747) | private void ShowPlayerMessageContextMenu(ChatMessage chatMessage)
method LbPlayerList_DoubleLeftClick (line 757) | private void LbPlayerList_DoubleLeftClick(object sender, EventArgs e)
method LoginWindow_Connect (line 770) | private void LoginWindow_Connect(object sender, EventArgs e)
method LoginWindow_Cancelled (line 782) | private void LoginWindow_Cancelled(object sender, EventArgs e)
method GameLoadingLobby_GameLeft (line 788) | private void GameLoadingLobby_GameLeft(object sender, EventArgs e)
method GameLobby_GameLeft (line 798) | private void GameLobby_GameLeft(object sender, EventArgs e)
method SetLogOutButtonText (line 808) | private void SetLogOutButtonText()
method BtnJoinGame_LeftClick (line 825) | private void BtnJoinGame_LeftClick(object sender, EventArgs e) => Join...
method LbGameList_DoubleLeftClick (line 827) | private void LbGameList_DoubleLeftClick(object sender, EventArgs e) =>...
method LbGameList_RightClick (line 829) | private void LbGameList_RightClick(object sender, EventArgs e)
method PasswordRequestWindow_PasswordEntered (line 840) | private void PasswordRequestWindow_PasswordEntered(object sender, Pass...
method GetJoinGameErrorBase (line 842) | private string GetJoinGameErrorBase()
method GetJoinGameErrorByIndex (line 858) | private string GetJoinGameErrorByIndex(int gameIndex)
method GetJoinGameError (line 871) | private string GetJoinGameError(HostedCnCNetGame hg)
method JoinSelectedGame (line 888) | private void JoinSelectedGame()
method JoinGameByIndex (line 897) | private bool JoinGameByIndex(int gameIndex, string password)
method JoinGame (line 916) | private bool JoinGame(HostedCnCNetGame hg, string password, IMessageVi...
method _JoinGame (line 964) | private void _JoinGame(HostedCnCNetGame hg, string password)
method GameChannel_TargetChangeTooFast (line 996) | private void GameChannel_TargetChangeTooFast(object sender, MessageEve...
method GameChannel_ChannelFull (line 1002) | private void GameChannel_ChannelFull(object sender, EventArgs e) =>
method GameChannel_InviteOnlyErrorOnJoin (line 1006) | private void GameChannel_InviteOnlyErrorOnJoin(object sender, EventArg...
method FindGameByChannelName (line 1025) | private HostedCnCNetGame FindGameByChannelName(string channelName)
method GameChannel_InvalidPasswordEntered_NewGame (line 1034) | private void GameChannel_InvalidPasswordEntered_NewGame(object sender,...
method GameChannel_UserAdded (line 1040) | private void GameChannel_UserAdded(object sender, Online.ChannelUserEv...
method ClearGameJoinAttempt (line 1053) | private void ClearGameJoinAttempt(Channel channel)
method ClearGameChannelEvents (line 1059) | private void ClearGameChannelEvents(Channel channel)
method BtnNewGame_LeftClick (line 1069) | private void BtnNewGame_LeftClick(object sender, EventArgs e)
method Gcw_GameCreated (line 1083) | private void Gcw_GameCreated(object sender, GameCreationEventArgs e)
method Gcw_LoadedGameCreated (line 1114) | private void Gcw_LoadedGameCreated(object sender, GameCreationEventArg...
method GameChannel_InvalidPasswordEntered_LoadedGame (line 1136) | private void GameChannel_InvalidPasswordEntered_LoadedGame(object send...
method GameLoadingChannel_UserAdded (line 1145) | private void GameLoadingChannel_UserAdded(object sender, ChannelUserEv...
method RandomizeChannelName (line 1164) | private string RandomizeChannelName()
method Gcw_Cancelled (line 1178) | private void Gcw_Cancelled(object sender, EventArgs e) => gameCreation...
method TbChatInput_EnterPressed (line 1180) | private void TbChatInput_EnterPressed(object sender, EventArgs e)
method SetChatColor (line 1192) | private void SetChatColor()
method DdColor_SelectedIndexChanged (line 1201) | private void DdColor_SelectedIndexChanged(object sender, EventArgs e)
method ConnectionManager_Disconnected (line 1207) | private void ConnectionManager_Disconnected(object sender, EventArgs e)
method ConnectionManager_WelcomeMessageReceived (line 1232) | private void ConnectionManager_WelcomeMessageReceived(object sender, E...
method ConnectionManager_PrivateCTCPReceived (line 1267) | private void ConnectionManager_PrivateCTCPReceived(object sender, Priv...
method HandleGameInviteCommand (line 1278) | private void HandleGameInviteCommand(string sender, string argumentsSt...
method HandleGameInvitationFailedNotification (line 1370) | private void HandleGameInvitationFailedNotification(string sender)
method DdCurrentChannel_SelectedIndexChanged (line 1384) | private void DdCurrentChannel_SelectedIndexChanged(object sender, Even...
method RefreshPlayerList (line 1438) | private void RefreshPlayerList(object sender, EventArgs e)
method RefreshPlayerListUser (line 1468) | private void RefreshPlayerListUser(ChannelUser user)
method CurrentChatChannel_UserGameIndexUpdated (line 1475) | private void CurrentChatChannel_UserGameIndexUpdated(object sender, Ch...
method OnChatMessagesCleared (line 1486) | private void OnChatMessagesCleared()
method AddMessageToChat (line 1493) | private void AddMessageToChat(ChatMessage message)
method CurrentChatChannel_MessageAdded (line 1507) | private void CurrentChatChannel_MessageAdded(object sender, IRCMessage...
method GameBroadcastChannel_UserLeftOrQuit (line 1514) | private void GameBroadcastChannel_UserLeftOrQuit(object sender, UserNa...
method GameBroadcastChannel_CTCPReceived (line 1527) | private void GameBroadcastChannel_CTCPReceived(object sender, ChannelC...
method UpdateMessageBox_YesClicked (line 1751) | private void UpdateMessageBox_YesClicked(XNAMessageBox messageBox) =>
method UpdateMessageBox_NoClicked (line 1754) | private void UpdateMessageBox_NoClicked(XNAMessageBox messageBox) => u...
method BtnLogout_LeftClick (line 1756) | private void BtnLogout_LeftClick(object sender, EventArgs e)
method SwitchOn (line 1773) | public void SwitchOn()
method SwitchOff (line 1786) | public void SwitchOff() => Disable();
method GetSwitchName (line 1788) | public string GetSwitchName() => "CnCNet Lobby".L10N("Client:Main:CnCN...
method CanReceiveInvitationMessagesFrom (line 1790) | private bool CanReceiveInvitationMessagesFrom(string username)
method GetUserTexture (line 1809) | private Texture2D GetUserTexture(string username)
method DismissInvalidInvitations (line 1823) | private void DismissInvalidInvitations()
method DismissInvitation (line 1846) | private void DismissInvitation(UserChannelPair invitationIdentity)
method GetHostedGameForUser (line 1866) | private HostedCnCNetGame GetHostedGameForUser(IRCUser user)
method JoinUser (line 1877) | private void JoinUser(IRCUser user, IMessageView messageView)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLoginWindow.cs
class CnCNetLoginWindow (line 12) | class CnCNetLoginWindow : XNAWindow
method CnCNetLoginWindow (line 14) | public CnCNetLoginWindow(WindowManager windowManager) : base(windowMan...
method Initialize (line 30) | public override void Initialize()
method Instance_SettingsSaved (line 110) | private void Instance_SettingsSaved(object sender, EventArgs e)
method BtnCancel_LeftClick (line 115) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method ChkRememberMe_CheckedChanged (line 120) | private void ChkRememberMe_CheckedChanged(object sender, EventArgs e)
method ChkPersistentMode_CheckedChanged (line 125) | private void ChkPersistentMode_CheckedChanged(object sender, EventArgs e)
method CheckAutoConnectAllowance (line 130) | private void CheckAutoConnectAllowance()
method BtnConnect_LeftClick (line 137) | private void BtnConnect_LeftClick(object sender, EventArgs e)
method LoadSettings (line 159) | public void LoadSettings()
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/GameCreationEventArgs.cs
class GameCreationEventArgs (line 6) | class GameCreationEventArgs : EventArgs
method GameCreationEventArgs (line 8) | public GameCreationEventArgs(string roomName, int maxPlayers,
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/GameCreationWindow.cs
class GameCreationWindow (line 17) | class GameCreationWindow : XNAWindow
method GameCreationWindow (line 19) | public GameCreationWindow(WindowManager windowManager, TunnelHandler t...
method Initialize (line 51) | public override void Initialize()
method LbTunnelList_ListRefreshed (line 196) | private void LbTunnelList_ListRefreshed(object sender, EventArgs e)
method Instance_SettingsSaved (line 210) | private void Instance_SettingsSaved(object sender, EventArgs e)
method BtnCancel_LeftClick (line 215) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method BtnLoadMPGame_LeftClick (line 220) | private void BtnLoadMPGame_LeftClick(object sender, EventArgs e)
method BtnCreateGame_LeftClick (line 248) | private void BtnCreateGame_LeftClick(object sender, EventArgs e)
method BtnDisplayAdvancedOptions_LeftClick (line 272) | private void BtnDisplayAdvancedOptions_LeftClick(object sender, EventA...
method Refresh (line 297) | public void Refresh()
method AllowLoadingGame (line 302) | private bool AllowLoadingGame()
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/GlobalContextMenu.cs
class GlobalContextMenu (line 24) | public class GlobalContextMenu : XNAContextMenu
method GlobalContextMenu (line 58) | public GlobalContextMenu(
method Initialize (line 75) | public override void Initialize()
method Invite (line 109) | private void Invite()
method UpdateButtons (line 129) | private void UpdateButtons()
method UpdatePlayerBasedButtons (line 135) | private void UpdatePlayerBasedButtons()
method UpdateMessageBasedButtons (line 156) | private void UpdateMessageBasedButtons()
method CopyLink (line 197) | private void CopyLink(string link)
method GetIrcUserIdent (line 209) | private void GetIrcUserIdent(Action<string> callback)
method GetIrcUser (line 230) | private IRCUser GetIrcUser()
method Show (line 247) | public void Show(string playerName, Point cursorPoint)
method Show (line 255) | public void Show(IRCUser ircUser, Point cursorPoint)
method Show (line 263) | public void Show(ChannelUser channelUser, Point cursorPoint)
method Show (line 271) | public void Show(ChatMessage chatMessage, Point cursorPoint)
method Show (line 279) | public void Show(GlobalContextMenuData data, Point cursorPoint)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/GlobalContextMenuData.cs
class GlobalContextMenuData (line 5) | public class GlobalContextMenuData
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/LoadOrSaveGameOptionPresetWindow.cs
class LoadOrSaveGameOptionPresetWindow (line 13) | public class LoadOrSaveGameOptionPresetWindow : XNAWindow
method LoadOrSaveGameOptionPresetWindow (line 37) | public LoadOrSaveGameOptionPresetWindow(WindowManager windowManager) :...
method Initialize (line 133) | public override void Initialize()
method Show (line 146) | public void Show(bool isLoad)
method DropDownPresetSelect_SelectedIndexChanged (line 165) | private void DropDownPresetSelect_SelectedIndexChanged(object sender, ...
method DropDownPresetSelect_SelectedIndexChanged_IsSave (line 176) | private void DropDownPresetSelect_SelectedIndexChanged_IsSave()
method RefreshButtons (line 195) | private void RefreshButtons()
method LoadPresets (line 212) | private void LoadPresets()
method ShowLoad (line 230) | private void ShowLoad()
method ShowSave (line 242) | private void ShowSave()
method BtnLoadSave_LeftClick (line 252) | private void BtnLoadSave_LeftClick(object sender, EventArgs e)
method BtnDelete_LeftClick (line 268) | private void BtnDelete_LeftClick(object sender, EventArgs e)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/MapSharingConfirmationPanel.cs
class MapSharingConfirmationPanel (line 12) | class MapSharingConfirmationPanel : XNAPanel
method MapSharingConfirmationPanel (line 14) | public MapSharingConfirmationPanel(WindowManager windowManager) : base...
method Initialize (line 31) | public override void Initialize()
method ShowForMapDownload (line 65) | public void ShowForMapDownload()
method SetDownloadingStatus (line 72) | public void SetDownloadingStatus()
method SetFailedStatus (line 78) | public void SetFailedStatus()
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/PasswordRequestWindow.cs
class PasswordRequestWindow (line 11) | internal class PasswordRequestWindow : XNAWindow
method PasswordRequestWindow (line 13) | public PasswordRequestWindow(WindowManager windowManager, PrivateMessa...
method Initialize (line 27) | public override void Initialize()
method TextBoxPassword_EnterPressed (line 71) | private void TextBoxPassword_EnterPressed(object sender, EventArgs eve...
method PasswordRequestWindow_EnabledChanged (line 76) | private void PasswordRequestWindow_EnabledChanged(object sender, Event...
method BtnCancel_LeftClick (line 91) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method BtnOK_LeftClick (line 96) | private void BtnOK_LeftClick(object sender, EventArgs e)
method SetHostedGame (line 108) | public void SetHostedGame(HostedCnCNetGame hostedGame)
class PasswordEventArgs (line 114) | public class PasswordEventArgs : EventArgs
method PasswordEventArgs (line 116) | public PasswordEventArgs(string password, HostedCnCNetGame hostedGame)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/PrivateMessageNotificationBox.cs
class PrivateMessageNotificationBox (line 21) | public class PrivateMessageNotificationBox : XNAPanel
method PrivateMessageNotificationBox (line 27) | public PrivateMessageNotificationBox(WindowManager windowManager) : ba...
method Initialize (line 44) | public override void Initialize()
method Show (line 107) | public void Show(Texture2D gameIcon, string sender, string message)
method Hide (line 132) | public void Hide()
method Update (line 142) | public override void Update(GameTime gameTime)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/PrivateMessagingPanel.cs
class PrivateMessagingPanel (line 10) | public class PrivateMessagingPanel : DarkeningPanel
method PrivateMessagingPanel (line 12) | public PrivateMessagingPanel(WindowManager windowManager) : base(windo...
method OnLeftClick (line 16) | public override void OnLeftClick(InputEventArgs inputEventArgs)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/PrivateMessagingWindow.cs
class PrivateMessagingWindow (line 23) | public class PrivateMessagingWindow : XNAWindow, ISwitchable
method PrivateMessagingWindow (line 38) | public PrivateMessagingWindow(
method Initialize (line 106) | public override void Initialize()
method ChatListBox_RightClick (line 230) | private void ChatListBox_RightClick(object sender, EventArgs e)
method UserList_LeftDoubleClick (line 243) | private void UserList_LeftDoubleClick(object sender, EventArgs e)
method RecentPlayersList_RightClick (line 249) | private void RecentPlayersList_RightClick(object sender, RecentPlayerT...
method ConnectionManager_UserGameIndexUpdated (line 252) | private void ConnectionManager_UserGameIndexUpdated(object sender, Use...
method ConnectionManager_UserRemoved (line 260) | private void ConnectionManager_UserRemoved(object sender, UserNameInde...
method ConnectionManager_UserAdded (line 309) | private void ConnectionManager_UserAdded(object sender, UserEventArgs e)
method RefreshAllUsers (line 345) | private void RefreshAllUsers()
method SetInviteChannelInfo (line 381) | public void SetInviteChannelInfo(string channelName, string gameName, ...
method ClearInviteChannelInfo (line 388) | public void ClearInviteChannelInfo() => SetInviteChannelInfo(string.Em...
method NotificationBox_LeftClick (line 390) | private void NotificationBox_LeftClick(object sender, EventArgs e) => ...
method LbUserList_RightClick (line 392) | private void LbUserList_RightClick(object sender, EventArgs e)
method PlayerContextMenu_JoinUser (line 408) | private void PlayerContextMenu_JoinUser(object sender, JoinUserEventAr...
method SharedUILogic_GameProcessExited (line 416) | private void SharedUILogic_GameProcessExited() =>
method HandleGameProcessExited (line 419) | private void HandleGameProcessExited()
method IsPlayerOnline (line 428) | private bool IsPlayerOnline(string playerName) => !string.IsNullOrEmpt...
method PrivateMessageHandler_PrivateMessageReceived (line 430) | private void PrivateMessageHandler_PrivateMessageReceived(object sende...
method HandleNotification (line 498) | private void HandleNotification(IRCUser ircUser, string message)
method ShowNotification (line 508) | private void ShowNotification(IRCUser ircUser, string message)
method MatchItemForName (line 519) | private Predicate<XNAListBoxItem> MatchItemForName(string userName) =>...
method FindItemForName (line 521) | private XNAListBoxItem FindItemForName(string userName) => lbUserList....
method FindItemIndexForName (line 523) | private int FindItemIndexForName(string userName) => lbUserList.Items....
method TbMessageInput_EnterPressed (line 525) | private void TbMessageInput_EnterPressed(object sender, EventArgs e)
method LbUserList_SelectedIndexChanged (line 573) | private void LbUserList_SelectedIndexChanged(object sender, EventArgs e)
method MessagesTabSelected (line 605) | private void MessagesTabSelected()
method FriendsListTabSelected (line 625) | private void FriendsListTabSelected()
method RecentPlayersTabSelected (line 646) | private void RecentPlayersTabSelected()
method AllPlayersTabSelected (line 656) | private void AllPlayersTabSelected()
method ShowRecentPlayers (line 664) | private void ShowRecentPlayers(bool show)
method TabControl_SelectedIndexChanged (line 686) | private void TabControl_SelectedIndexChanged(object sender, EventArgs e)
method AddPlayerToList (line 713) | private void AddPlayerToList(IRCUser user, bool isOnline, string label...
method GetUserTexture (line 726) | private Texture2D GetUserTexture(IRCUser user)
method InitPM (line 738) | public void InitPM(string name)
method SwitchOn (line 782) | public void SwitchOn()
method SetJoinUserAction (line 817) | public void SetJoinUserAction(Action<IRCUser, IMessageView> joinUserAc...
method SwitchOff (line 822) | public void SwitchOff() => Disable();
method GetSwitchName (line 824) | public string GetSwitchName() => "Private Messaging".L10N("Client:Main...
class PrivateMessage (line 829) | class PrivateMessage
method PrivateMessage (line 831) | public PrivateMessage(IRCUser user, string message)
class RecentPlayerMessageView (line 841) | class RecentPlayerMessageView : IMessageView
method RecentPlayerMessageView (line 845) | public RecentPlayerMessageView(WindowManager windowManager)
method AddMessage (line 850) | public void AddMessage(ChatMessage message)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/RecentPlayerTable.cs
class RecentPlayerTable (line 10) | public class RecentPlayerTable : XNAMultiColumnListBox
method RecentPlayerTable (line 16) | public RecentPlayerTable(WindowManager windowManager, CnCNetManager co...
method Initialize (line 21) | public override void Initialize()
method AddRecentPlayer (line 32) | public void AddRecentPlayer(RecentPlayer recentPlayer)
method CreateColumnHeader (line 55) | private XNAPanel CreateColumnHeader(string headerText)
method AddColumn (line 74) | private void AddColumn(string headerText)
method ListBox_RightClick (line 82) | private void ListBox_RightClick(object sender, EventArgs e)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/RecentPlayerTableRightClickEventArgs.cs
class RecentPlayerTableRightClickEventArgs (line 6) | public class RecentPlayerTableRightClickEventArgs : EventArgs
method RecentPlayerTableRightClickEventArgs (line 10) | public RecentPlayerTableRightClickEventArgs(IRCUser ircUser)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/TunnelListBox.cs
class TunnelListBox (line 18) | class TunnelListBox : XNAMultiColumnListBox
method TunnelListBox (line 24) | public TunnelListBox(WindowManager windowManager, TunnelHandler tunnel...
method SelectTunnel (line 78) | public void SelectTunnel(string address)
method IsTunnelSelected (line 94) | public bool IsTunnelSelected(string address) =>
method TunnelHandler_TunnelsRefreshed (line 97) | private void TunnelHandler_TunnelsRefreshed(object sender, EventArgs e)
method TunnelHandler_TunnelPinged (line 159) | private void TunnelHandler_TunnelPinged(int tunnelIndex)
method GetTunnelRating (line 183) | private int GetTunnelRating(CnCNetTunnel tunnel)
method TunnelListBox_SelectedIndexChanged (line 195) | private void TunnelListBox_SelectedIndexChanged(object sender, EventAr...
method ParseCountryCodeFlagOffsets (line 204) | private static Dictionary<string, int> ParseCountryCodeFlagOffsets()
method GetFlagRectangle (line 273) | private static Rectangle? GetFlagRectangle(string countryCode)
class FlagListBox (line 290) | private class FlagListBox : XNAListBox
method FlagListBox (line 295) | public FlagListBox(WindowManager windowManager, TunnelHandler tunnel...
method Draw (line 302) | public override void Draw(GameTime gameTime)
FILE: DXMainClient/DXGUI/Multiplayer/CnCNet/TunnelSelectionWindow.cs
class TunnelSelectionWindow (line 13) | class TunnelSelectionWindow : XNAWindow
method TunnelSelectionWindow (line 15) | public TunnelSelectionWindow(WindowManager windowManager, TunnelHandle...
method Initialize (line 29) | public override void Initialize()
method BtnApply_LeftClick (line 79) | private void BtnApply_LeftClick(object sender, EventArgs e)
method BtnCancel_LeftClick (line 90) | private void BtnCancel_LeftClick(object sender, EventArgs e) => Disabl...
method LbTunnelList_SelectedIndexChanged (line 92) | private void LbTunnelList_SelectedIndexChanged(object sender, EventArg...
method Open (line 101) | public void Open(string description, string tunnelAddress = null)
class TunnelEventArgs (line 124) | class TunnelEventArgs : EventArgs
method TunnelEventArgs (line 126) | public TunnelEventArgs(CnCNetTunnel tunnel)
FILE: DXMainClient/DXGUI/Multiplayer/GameFiltersPanel.cs
class GameFiltersScrollPanel (line 18) | internal class GameFiltersScrollPanel : XNAScrollPanel
method GameFiltersScrollPanel (line 20) | public GameFiltersScrollPanel(WindowManager windowManager) : base(wind...
method GetContentPanel (line 24) | public XNAPanel GetContentPanel() => ContentPanel;
class GameFiltersPanel (line 27) | public class GameFiltersPanel : XNAPanel
class GameOptionFilterControl (line 47) | private class GameOptionFilterControl
method GameFiltersPanel (line 58) | public GameFiltersPanel(WindowManager windowManager, GameLobbyBase gam...
method Initialize (line 63) | public override void Initialize()
method CreateGameOptionFilters (line 185) | private void CreateGameOptionFilters()
method BtnSave_LeftClick (line 394) | private void BtnSave_LeftClick(object sender, EventArgs e)
method BtnCancel_LeftClick (line 400) | private void BtnCancel_LeftClick(object sender, EventArgs e)
method BtnResetDefaults_LeftClick (line 405) | private void BtnResetDefaults_LeftClick(object sender, EventArgs e)
method Save (line 410) | private void Save()
method Load (line 452) | private void Load()
method ResetDefaults (line 486) | private void ResetDefaults()
method Show (line 492) | public void Show()
method Cancel (line 504) | public void Cancel()
method UpdateScrollContentHeight (line 508) | private void UpdateScrollContentHeight()
method CreateDivider (line 515) | private XNAPanel CreateDivider(int y, int width, int height = 1)
FILE: DXMainClient/DXGUI/Multiplayer/GameInformationIconOnlyPanel.cs
class GameInformationIconOnlyPanel (line 12) | public class GameInformationIconOnlyPanel : XNAPanel
method GameInformationIconOnlyPanel (line 16) | public GameInformationIconOnlyPanel(WindowManager windowManager, Textu...
method Draw (line 22) | public override void Draw(GameTime gameTime)
FILE: DXMainClient/DXGUI/Multiplayer/GameInformationIconPanel.cs
class GameInformationIconPanel (line 14) | public class GameInformationIconPanel : XNAPanel
method GameInformationIconPanel (line 22) | public GameInformationIconPanel(WindowManager windowManager, Texture2D...
method Draw (line 31) | public override void Draw(GameTime gameTime)
FILE: DXMainClient/DXGUI/Multiplayer/GameInformationPanel.cs
class GameInformationPanel (line 25) | public class GameInformationPanel : XNAPanel
method GameInformationPanel (line 29) | public GameInformationPanel(WindowManager windowManager, MapLoader map...
method Initialize (line 93) | public override void Initialize()
method SetInfo (line 186) | public void SetInfo(GenericHostedGame game)
method SetGameOptionsInfo (line 293) | private void SetGameOptionsInfo(GenericHostedGame game)
method SetLegendInfo (line 430) | private void SetLegendInfo(GenericHostedGame game)
method UpdatePanelHeight (line 465) | private void UpdatePanelHeight()
method CreateDivider (line 478) | private XNAPanel CreateDivider(int y, int height = 1)
method ClearLegendIconPanel (line 486) | private void ClearLegendIconPanel()
method ClearInfo (line 492) | public void ClearInfo()
method Draw (line 515) | public override void Draw(GameTime gameTime)
method RenderMapPreview (line 526) | private void RenderMapPreview()
FILE: DXMainClient/DXGUI/Multiplayer/GameListBox.cs
class GameListBox (line 24) | public class GameListBox : XNAListBox
method GameListBox (line 31) | public GameListBox(WindowManager windowManager, MapLoader mapLoader,
method RemoveGame (line 77) | public void RemoveGame(int index)
method GameListMatch (line 89) | private static Predicate<XNAListBoxItem> GameListMatch(XNAListBoxItem ...
method Refresh (line 103) | public void Refresh()
method AddGame (line 126) | public void AddGame(GenericHostedGame game)
method GetSortedAndFilteredGames (line 136) | private IEnumerable<GenericHostedGame> GetSortedAndFilteredGames()
method GetSortedGames (line 143) | private IEnumerable<GenericHostedGame> GetSortedGames()
method SortAndRefreshHostedGames (line 168) | public void SortAndRefreshHostedGames()
method ClearGames (line 173) | public void ClearGames()
method Initialize (line 179) | public override void Initialize()
method InitSkillLevelIcons (line 209) | private void InitSkillLevelIcons()
method IsValidGameIndex (line 221) | private bool IsValidGameIndex(int index)
method ShowGamePanelInfoForIndex (line 226) | private void ShowGamePanelInfoForIndex(int index)
method GameListBox_SelectedIndexChanged (line 244) | private void GameListBox_SelectedIndexChanged(object sender, EventArgs e)
method GameListBox_HoveredIndexChanged (line 249) | private void GameListBox_HoveredIndexChanged(object sender, EventArgs e)
method GetGameOptionIcons (line 255) | private (List<Texture2D> leftIcons, List<Texture2D> rightIcons) GetGam...
method AddGameToList (line 308) | private void AddGameToList(GenericHostedGame hg)
method Update (line 352) | public override void Update(GameTime gameTime)
method Draw (line 375) | public override void Draw(GameTime gameTime)
FILE: DXMainClient/DXGUI/Multiplayer/GameLoadingLobbyBase.cs
class GameLoadingLobbyBase (line 20) | public abstract class GameLoadingLobbyBase : XNAWindow, ISwitchable
method GameLoadingLobbyBase (line 22) | public GameLoadingLobbyBase(WindowManager windowManager, DiscordHandle...
method Initialize (line 76) | public override void Initialize()
method UpdateDiscordPresence (line 215) | protected abstract void UpdateDiscordPresence(bool resetTimer = false);
method ResetDiscordPresence (line 220) | protected void ResetDiscordPresence() => discordHandler.UpdatePresence();
method BtnLeaveGame_LeftClick (line 222) | private void BtnLeaveGame_LeftClick(object sender, EventArgs e) => Lea...
method LeaveGame (line 224) | protected virtual void LeaveGame()
method fsw_Created (line 230) | private void fsw_Created(object sender, FileSystemEventArgs e) =>
method HandleFSWEvent (line 233) | private void HandleFSWEvent(FileSystemEventArgs e)
method BtnLoadGame_LeftClick (line 243) | private void BtnLoadGame_LeftClick(object sender, EventArgs e)
method RequestReadyStatus (line 266) | protected abstract void RequestReadyStatus();
method GetReadyNotification (line 268) | protected virtual void GetReadyNotification()
method NotAllPresentNotification (line 280) | protected virtual void NotAllPresentNotification() =>
method HostStartGame (line 283) | protected abstract void HostStartGame();
method LoadGame (line 285) | protected void LoadGame()
method SharedUILogic_GameProcessExited (line 346) | private void SharedUILogic_GameProcessExited() =>
method HandleGameProcessExited (line 349) | protected virtual void HandleGameProcessExited()
method WriteSpawnIniAdditions (line 373) | protected virtual void WriteSpawnIniAdditions(IniFile spawnIni)
method AddNotice (line 378) | protected void AddNotice(string notice) => AddNotice(notice, Color.Whi...
method AddNotice (line 380) | protected abstract void AddNotice(string message, Color color);
method Refresh (line 387) | public virtual void Refresh(bool isHost)
method CopyPlayerDataToUI (line 456) | protected void CopyPlayerDataToUI()
method GetIPAddressForPlayer (line 479) | protected virtual string GetIPAddressForPlayer(PlayerInfo pInfo) => "0...
method DdSavedGame_SelectedIndexChanged (line 481) | private void DdSavedGame_SelectedIndexChanged(object sender, EventArgs e)
method TbChatInput_EnterPressed (line 496) | private void TbChatInput_EnterPressed(object sender, EventArgs e)
method BroadcastOptions (line 509) | protected abstract void BroadcastOptions();
method SendChatMessage (line 511) | protected abstract void SendChatMessage(string message);
method Draw (line 513) | public override void Draw(GameTime gameTime)
method SwitchOn (line 521) | public void SwitchOn() => Enable();
method SwitchOff (line 523) | public void SwitchOff() => Disable();
method GetSwitchName (line 525) | public abstract string GetSwitchName();
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/ChatBoxCommand.cs
class ChatBoxCommand (line 9) | public class ChatBoxCommand
method ChatBoxCommand (line 11) | public ChatBoxCommand(string command, string description, bool hostOnl...
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/CnCNetGameLobby.cs
class CnCNetGameLobby (line 25) | public class CnCNetGameLobby : MultiplayerGameLobby
method CnCNetGameLobby (line 44) | public CnCNetGameLobby(
method Initialize (line 185) | public override void Initialize()
method MultiplayerName_RightClick (line 241) | private void MultiplayerName_RightClick(object sender, MultiplayerName...
method BtnChangeTunnel_LeftClick (line 250) | private void BtnChangeTunnel_LeftClick(object sender, EventArgs e) => ...
method GameBroadcastTimer_TimeElapsed (line 252) | private void GameBroadcastTimer_TimeElapsed(object sender, EventArgs e...
method SetUp (line 254) | public void SetUp(Channel channel, bool isHost, int playerLimit,
method TunnelHandler_CurrentTunnelPinged (line 299) | private void TunnelHandler_CurrentTunnelPinged(object sender, EventArg...
method GameHostInactiveChecker_CloseEvent (line 301) | private void GameHostInactiveChecker_CloseEvent(object sender, EventAr...
method StartInactiveCheck (line 303) | public void StartInactiveCheck()
method StopInactiveCheck (line 311) | public void StopInactiveCheck() => gameHostInactiveChecker?.Stop();
method OnJoined (line 313) | public void OnJoined()
method UpdatePing (line 349) | private void UpdatePing()
method CopyPlayerDataToUI (line 364) | protected override void CopyPlayerDataToUI()
method PrintTunnelServerInformation (line 375) | private void PrintTunnelServerInformation(string s)
method ShowTunnelSelectionWindow (line 389) | private void ShowTunnelSelectionWindow(string description)
method TunnelSelectionWindow_TunnelSelected (line 395) | private void TunnelSelectionWindow_TunnelSelected(object sender, Tunne...
method BtnGameLobbySettings_LeftClick (line 402) | private void BtnGameLobbySettings_LeftClick(object sender, EventArgs e)
method GameLobbySettingsWindow_SettingsChanged (line 411) | private void GameLobbySettingsWindow_SettingsChanged(object sender, Ga...
method UpdateGameLobbySettings (line 419) | private void UpdateGameLobbySettings(string newGameRoomName, int newMa...
method BroadcastGameLobbySettings (line 500) | private void BroadcastGameLobbySettings()
method ApplyGameLobbySettings (line 517) | private void ApplyGameLobbySettings(string sender, string message)
method ChangeChatColor (line 565) | public void ChangeChatColor(IRCColor chatColor)
method Clear (line 571) | public override void Clear()
method LeaveGameLobby (line 617) | public void LeaveGameLobby()
method ConnectionManager_Disconnected (line 630) | private void ConnectionManager_Disconnected(object sender, EventArgs e...
method ConnectionManager_ConnectionLost (line 632) | private void ConnectionManager_ConnectionLost(object sender, Connectio...
method HandleConnectionLoss (line 634) | private void HandleConnectionLoss()
method Channel_UserNameChanged (line 640) | private void Channel_UserNameChanged(object sender, UserNameChangedEve...
method BtnLeaveGame_LeftClick (line 653) | protected override void BtnLeaveGame_LeftClick(object sender, EventArg...
method UpdateDiscordPresence (line 655) | protected override void UpdateDiscordPresence(bool resetTimer = false)
method Channel_UserQuitIRC (line 674) | private void Channel_UserQuitIRC(object sender, UserNameEventArgs e)
method Channel_UserLeft (line 688) | private void Channel_UserLeft(object sender, UserNameEventArgs e)
method Channel_UserKicked (line 702) | private void Channel_UserKicked(object sender, UserNameEventArgs e)
method Channel_UserListReceived (line 725) | private void Channel_UserListReceived(object sender, EventArgs e)
method Channel_UserAdded (line 739) | private void Channel_UserAdded(object sender, ChannelUserEventArgs e)
method RemovePlayer (line 781) | private void RemovePlayer(string playerName)
method Channel_ChannelModesChanged (line 804) | private void Channel_ChannelModesChanged(object sender, ChannelModeEve...
method Channel_CTCPReceived (line 821) | private void Channel_CTCPReceived(object sender, ChannelCTCPEventArgs e)
method Channel_MessageAdded (line 837) | private void Channel_MessageAdded(object sender, IRCMessageEventArgs e)
method HostLaunchGame (line 856) | protected override void HostLaunchGame()
method RequestPlayerOptions (line 896) | protected override void RequestPlayerOptions(int side, int color, int ...
method RequestReadyStatus (line 913) | protected override void RequestReadyStatus()
method AddNotice (line 940) | protected override void AddNotice(string message, Color color) => chan...
method HandleOptionsRequest (line 945) | private void HandleOptionsRequest(string playerName, int options)
method HandleReadyRequest (line 1018) | private void HandleReadyRequest(string playerName, int readyStatus)
method BroadcastPlayerOptions (line 1038) | protected override void BroadcastPlayerOptions()
method PlayerExtraOptions_OptionsChanged (line 1077) | protected override void PlayerExtraOptions_OptionsChanged(object sende...
method BroadcastPlayerExtraOptions (line 1083) | protected override void BroadcastPlayerExtraOptions()
method ApplyPlayerOptions (line 1096) | private void ApplyPlayerOptions(string sender, string message)
method OnGameOptionChanged (line 1199) | protected override void OnGameOptionChanged()
method ApplyGameOptions (line 1247) | private void ApplyGameOptions(string sender, string message)
method RequestMap (line 1418) | private void RequestMap(string mapSHA1)
method ShowOfficialMapMissingMessage (line 1434) | private void ShowOfficialMapMissingMessage(string sha1)
method MapSharingConfirmationPanel_MapDownloadConfirmed (line 1442) | private void MapSharingConfirmationPanel_MapDownloadConfirmed(object s...
method ChangeMap (line 1450) | protected override void ChangeMap(GameModeMap gameModeMap)
method HandleMapUpdated (line 1456) | protected override void HandleMapUpdated(Map updatedMap, string previo...
method GameProcessExited (line 1469) | protected override void GameProcessExited()
method GameStartAborted (line 1474) | protected void GameStartAborted()
method ResetGameState (line 1479) | protected void ResetGameState()
method NonHostLaunchGame (line 1504) | private void NonHostLaunchGame(string sender, string message)
method StartGame (line 1574) | protected override void StartGame()
method WriteSpawnIniAdditions (line 1594) | protected override void WriteSpawnIniAdditions(IniFile iniFile)
method SendChatMessage (line 1612) | protected override void SendChatMessage(string message) => channel.Sen...
method HandleNotification (line 1616) | private void HandleNotification(string sender, Action handler)
method HandleIntNotification (line 1624) | private void HandleIntNotification(string sender, int parameter, Actio...
method GetReadyNotification (line 1632) | protected override void GetReadyNotification()
method AISpectatorsNotification (line 1644) | protected override void AISpectatorsNotification()
method InsufficientPlayersNotification (line 1652) | protected override void InsufficientPlayersNotification()
method TooManyPlayersNotification (line 1660) | protected override void TooManyPlayersNotification()
method SharedColorsNotification (line 1668) | protected override void SharedColorsNotification()
method SharedStartingLocationNotification (line 1676) | protected override void SharedStartingLocationNotification()
method LockGameNotification (line 1684) | protected override void LockGameNotification()
method NotVerifiedNotification (line 1692) | protected override void NotVerifiedNotification(int playerIndex)
method StillInGameNotification (line 1700) | protected override void StillInGameNotification(int playerIndex)
method GameStartedNotification (line 1708) | private void GameStartedNotification(string sender)
method ReturnNotification (line 1718) | private void ReturnNotification(string sender)
method HandleTunnelPing (line 1731) | private void HandleTunnelPing(string sender, int ping)
method FileHashNotification (line 1741) | private void FileHashNotification(string sender, string filesHash)
method CheaterNotification (line 1759) | private void CheaterNotification(string sender, string cheaterName)
method BroadcastDiceRoll (line 1767) | protected override void BroadcastDiceRoll(int dieSides, int[] results)
method HandleLockGameButtonClick (line 1776) | protected override void HandleLockGameButtonClick()
method LockGame (line 1796) | protected override void LockGame()
method UnlockGame (line 1806) | protected override void UnlockGame(bool announce)
method KickPlayer (line 1818) | protected override void KickPlayer(int playerIndex)
method BanPlayer (line 1829) | protected override void BanPlayer(int playerIndex)
method HandleCheatDetectedMessage (line 1846) | private void HandleCheatDetectedMessage(string sender) =>
method HandleTunnelServerChangeMessage (line 1849) | private void HandleTunnelServerChangeMessage(string sender, string tun...
method HandleTunnelServerChange (line 1879) | private void HandleTunnelServerChange(CnCNetTunnel tunnel)
method UpdateLaunchGameButtonStatus (line 1894) | protected override bool UpdateLaunchGameButtonStatus()
method MapSharer_MapDownloadFailed (line 1902) | private void MapSharer_MapDownloadFailed(object sender, SHA1EventArgs e)
method MapSharer_HandleMapDownloadFailed (line 1905) | private void MapSharer_HandleMapDownloadFailed(SHA1EventArgs e)
method MapSharer_MapDownloadComplete (line 1930) | private void MapSharer_MapDownloadComplete(object sender, SHA1EventArg...
method MapSharer_HandleMapDownloadComplete (line 1933) | private void MapSharer_HandleMapDownloadComplete(SHA1EventArgs e)
method MapLoader_MapChanged (line 1941) | private void MapLoader_MapChanged(object sender, MapChangedEventArgs e)
method HandleMapAdded (line 1961) | protected override void HandleMapAdded(Map addedMap)
method MapSharer_MapUploadFailed (line 2009) | private void MapSharer_MapUploadFailed(object sender, MapEventArgs e) =>
method MapSharer_HandleMapUploadFailed (line 2012) | private void MapSharer_HandleMapUploadFailed(MapEventArgs e)
method MapSharer_MapUploadComplete (line 2026) | private void MapSharer_MapUploadComplete(object sender, MapEventArgs e...
method MapSharer_HandleMapUploadComplete (line 2029) | private void MapSharer_HandleMapUploadComplete(MapEventArgs e)
method HandleMapUploadRequest (line 2045) | private void HandleMapUploadRequest(string sender, string mapSHA1)
method HandleMapTransferFailMessage (line 2093) | private void HandleMapTransferFailMessage(string sender, string sha1)
method HandleMapDownloadRequest (line 2124) | private void HandleMapDownloadRequest(string sender, string sha1)
method HandleMapSharingBlockedMessage (line 2138) | private void HandleMapSharingBlockedMessage(string sender)
method DownloadMapByIdCommand (line 2159) | private void DownloadMapByIdCommand(string parameters)
method AccelerateGameBroadcasting (line 2226) | private void AccelerateGameBroadcasting() =>
method BroadcastGame (line 2229) | private void BroadcastGame()
method GetSwitchName (line 2317) | public override string GetSwitchName() => "Game Lobby".L10N("Client:Ma...
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/CommandHandlerBase.cs
class CommandHandlerBase (line 3) | public abstract class CommandHandlerBase
method CommandHandlerBase (line 5) | public CommandHandlerBase(string commandName)
method Handle (line 12) | public abstract bool Handle(string sender, string message);
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/IntCommandHandler.cs
class IntCommandHandler (line 5) | public class IntCommandHandler : CommandHandlerBase
method IntCommandHandler (line 7) | public IntCommandHandler(string commandName, Action<string, int> handl...
method Handle (line 14) | public override bool Handle(string sender, string message)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/IntNotificationHandler.cs
class IntNotificationHandler (line 5) | public class IntNotificationHandler : CommandHandlerBase
method IntNotificationHandler (line 7) | public IntNotificationHandler(string commandName, Action<string, int, ...
method Handle (line 17) | public override bool Handle(string sender, string message)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/NoParamCommandHandler.cs
class NoParamCommandHandler (line 8) | public class NoParamCommandHandler : CommandHandlerBase
method NoParamCommandHandler (line 10) | public NoParamCommandHandler(string commandName, Action<string> comman...
method Handle (line 17) | public override bool Handle(string sender, string message)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/NotificationHandler.cs
class NotificationHandler (line 5) | public class NotificationHandler : CommandHandlerBase
method NotificationHandler (line 7) | public NotificationHandler(string commandName, Action<string, Action> ...
method Handle (line 17) | public override bool Handle(string sender, string message)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/StringCommandHandler.cs
class StringCommandHandler (line 5) | class StringCommandHandler : CommandHandlerBase
method StringCommandHandler (line 7) | public StringCommandHandler(string commandName, Action<string, string>...
method Handle (line 14) | public override bool Handle(string sender, string message)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/CoopBriefingBox.cs
class CoopBriefingBox (line 11) | class CoopBriefingBox : XNAPanel
method CoopBriefingBox (line 16) | public CoopBriefingBox(WindowManager windowManager) : base(windowManager)
method Initialize (line 29) | public override void Initialize()
method ParseControlINIAttribute (line 45) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method SetFadeVisibility (line 57) | public void SetFadeVisibility(bool visible)
method SetAlpha (line 62) | public void SetAlpha(float alpha)
method SetText (line 67) | public void SetText(string text)
method Update (line 76) | public override void Update(GameTime gameTime)
method Draw (line 90) | public override void Draw(GameTime gameTime)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameHostInactiveChecker.cs
class GameHostInactiveChecker (line 10) | public class GameHostInactiveChecker
method GameHostInactiveChecker (line 21) | public GameHostInactiveChecker(WindowManager windowManager)
method TimerOnElapsed (line 30) | private void TimerOnElapsed(object sender, ElapsedEventArgs e)
method Start (line 41) | public void Start()
method Reset (line 47) | public void Reset()
method Stop (line 53) | public void Stop() => timer.Stop();
method SendCloseEvent (line 55) | private void SendCloseEvent()
method ShowWarning (line 61) | private void ShowWarning()
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameLaunchButton.cs
class GameLaunchButton (line 10) | public class GameLaunchButton : XNAClientButton
method GameLaunchButton (line 12) | public GameLaunchButton(WindowManager windowManager) : base(windowMana...
method InitStarDisplay (line 18) | public void InitStarDisplay(Texture2D[] rankTextures)
method Initialize (line 30) | public override void Initialize()
method UpdateStarPosition (line 41) | private void UpdateStarPosition()
method SetRank (line 50) | public void SetRank(int rank)
class StarDisplay (line 57) | class StarDisplay : XNAControl
method StarDisplay (line 59) | public StarDisplay(WindowManager windowManager, Texture2D[] rankTextur...
method Initialize (line 71) | public override void Initialize()
method Draw (line 76) | public override void Draw(GameTime gameTime)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameLeftEventArgs.cs
class GameLeftEventArgs (line 4) | public class GameLeftEventArgs
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs
class GameLobbyBase (line 32) | public abstract class GameLobbyBase : INItializableWindow
type Rank (line 34) | protected record Rank
method GameLobbyBase (line 69) | public GameLobbyBase(
method GetBroadcastableSettings (line 96) | public List<IGameSessionSetting> GetBroadcastableSettings()
method FindLocalPlayer (line 174) | protected virtual PlayerInfo FindLocalPlayer() => Players.Find(p => p....
method Initialize (line 220) | public override void Initialize()
method InitBtnMapSort (line 366) | private void InitBtnMapSort()
method InitializeGameOptionPresetUI (line 390) | private void InitializeGameOptionPresetUI()
method BtnMapSortAlphabetically_LeftClick (line 426) | private void BtnMapSortAlphabetically_LeftClick(object sender, EventAr...
method RefreshMapSortAlphabeticallyBtn (line 435) | private void RefreshMapSortAlphabeticallyBtn()
method MapLoader_MapChanged (line 441) | private void MapLoader_MapChanged(object sender, MapChangedEventArgs e)
method HandleMapAdded (line 460) | protected virtual void HandleMapAdded(Map addedMap)
method HandleMapUpdated (line 468) | protected virtual void HandleMapUpdated(Map updatedMap, string previou...
method HandleMapRemoved (line 484) | private void HandleMapRemoved(Map removedMap)
method ShouldShowMapInCurrentFilter (line 510) | private bool ShouldShowMapInCurrentFilter(Map map)
method CreateGameFilterItem (line 525) | private static XNADropDownItem CreateGameFilterItem(string text, GameM...
method IsFavoriteMapsSelected (line 534) | protected bool IsFavoriteMapsSelected() => ddGameModeMapFilter.Selecte...
method GetFavoriteGameModeMaps (line 536) | private List<GameModeMap> GetFavoriteGameModeMaps() =>
method GetGameModeMaps (line 539) | private Func<List<GameModeMap>> GetGameModeMaps(GameMode gm) => () =>
method RefreshBtnPlayerExtraOptionsOpenTexture (line 542) | private void RefreshBtnPlayerExtraOptionsOpenTexture()
method HandleGameOptionPresetSaveCommand (line 554) | protected void HandleGameOptionPresetSaveCommand(GameOptionPresetEvent...
method HandleGameOptionPresetSaveCommand (line 556) | protected void HandleGameOptionPresetSaveCommand(string presetName)
method HandleGameOptionPresetLoadCommand (line 563) | protected void HandleGameOptionPresetLoadCommand(GameOptionPresetEvent...
method HandleGameOptionPresetLoadCommand (line 565) | protected void HandleGameOptionPresetLoadCommand(string presetName)
method AddNotice (line 573) | protected void AddNotice(string message) => AddNotice(message, Color.W...
method AddNotice (line 575) | protected abstract void AddNotice(string message, Color color);
method BtnPickRandomMap_LeftClick (line 577) | private void BtnPickRandomMap_LeftClick(object sender, EventArgs e) =>...
method TbMapSearch_InputReceived (line 579) | private void TbMapSearch_InputReceived(object sender, EventArgs e) => ...
method TbMapSearch_RightClick (line 581) | private void TbMapSearch_RightClick(object sender, EventArgs e) => sea...
method SetSearchAllGameModes (line 583) | private void SetSearchAllGameModes(bool value)
method Dropdown_SelectedIndexChanged (line 591) | private void Dropdown_SelectedIndexChanged(object sender, EventArgs e)
method ChkBox_CheckedChanged (line 601) | private void ChkBox_CheckedChanged(object sender, EventArgs e)
method OnGameOptionChanged (line 611) | protected virtual void OnGameOptionChanged()
method DdGameModeMapFilter_SelectedIndexChanged (line 618) | protected void DdGameModeMapFilter_SelectedIndexChanged(object sender,...
method BtnPlayerExtraOptions_LeftClick (line 633) | protected void BtnPlayerExtraOptions_LeftClick(object sender, EventArg...
method ApplyPlayerExtraOptions (line 641) | protected void ApplyPlayerExtraOptions(string sender, string message)
method AddPlayerExtraOptionForcedNotice (line 667) | private void AddPlayerExtraOptionForcedNotice(bool disabled, string type)
method GetSortedGameModeMaps (line 672) | protected List<GameModeMap> GetSortedGameModeMaps()
method ListMaps (line 693) | protected void ListMaps()
method GetDefaultMapRankIndex (line 807) | protected abstract int GetDefaultMapRankIndex(GameModeMap gameModeMap);
method LbGameModeMapList_RightClick (line 809) | private void LbGameModeMapList_RightClick(object sender, EventArgs e)
method CanDeleteMap (line 824) | private bool CanDeleteMap()
method DeleteMapConfirmation (line 829) | private void DeleteMapConfirmation()
method ShowInFolder (line 839) | private void ShowInFolder() => Map?.OpenContainingFolder();
method MapPreviewBox_ToggleFavorite (line 841) | private void MapPreviewBox_ToggleFavorite(object sender, EventArgs e) =>
method ToggleFavoriteMap (line 844) | protected virtual void ToggleFavoriteMap()
method RefreshForFavoriteMapRemoved (line 853) | protected void RefreshForFavoriteMapRemoved()
method DeleteSelectedMap (line 866) | private void DeleteSelectedMap(XNAMessageBox messageBox)
method LbGameModeMapList_SelectedIndexChanged (line 895) | private void LbGameModeMapList_SelectedIndexChanged()
method LbGameModeMapList_SelectedIndexChanged (line 910) | private void LbGameModeMapList_SelectedIndexChanged(object sender, Eve...
method LbGameModeMapList_HoveredIndexChanged (line 913) | private void LbGameModeMapList_HoveredIndexChanged(object sender, Even...
method PickRandomMap (line 929) | private void PickRandomMap()
method GetMapList (line 948) | private List<Map> GetMapList(int playerCount)
method RefreshGameModeFilter (line 979) | protected void RefreshGameModeFilter()
method RefreshMapSelectionUI (line 1001) | protected void RefreshMapSelectionUI()
method AddSideToDropDown (line 1017) | protected void AddSideToDropDown(XNADropDown dd, string name, string? ...
method InitPlayerOptionDropdowns (line 1031) | protected void InitPlayerOptionDropdowns()
method GeneratePlayerOptionCaption (line 1184) | private XNALabel GeneratePlayerOptionCaption(string name, string text,...
method PlayerExtraOptions_OptionsChanged (line 1196) | protected virtual void PlayerExtraOptions_OptionsChanged(object sender...
method EnablePlayerOptionDropDown (line 1234) | private void EnablePlayerOptionDropDown(XNAClientDropDown clientDropDo...
method GetPlayerInfoForIndex (line 1241) | protected PlayerInfo GetPlayerInfoForIndex(int playerIndex)
method GetPlayerExtraOptions (line 1252) | protected PlayerExtraOptions GetPlayerExtraOptions() =>
method SetPlayerExtraOptions (line 1255) | protected void SetPlayerExtraOptions(PlayerExtraOptions playerExtraOpt...
method GetTeamMappingsError (line 1257) | protected string GetTeamMappingsError() => GetPlayerExtraOptions()?.Ge...
method LoadTextureOrNull (line 1259) | private Texture2D LoadTextureOrNull(string name) =>
method GetRandomSelectors (line 1267) | private void GetRandomSelectors(List<string> selectorNames, List<int[]...
method BtnLaunchGame_LeftClick (line 1293) | protected abstract void BtnLaunchGame_LeftClick(object sender, EventAr...
method BtnLeaveGame_LeftClick (line 1295) | protected abstract void BtnLeaveGame_LeftClick(object sender, EventArg...
method UpdateDiscordPresence (line 1301) | protected abstract void UpdateDiscordPresence(bool resetTimer = false);
method ResetDiscordPresence (line 1306) | protected void ResetDiscordPresence() => discordHandler.UpdatePresence();
method LoadDefaultGameModeMap (line 1308) | protected void LoadDefaultGameModeMap()
method GetDefaultGameModeMapFilterIndex (line 1318) | protected int GetDefaultGameModeMapFilterIndex()
method GetDefaultGameModeMapFilter (line 1327) | protected GameModeMapFilter GetDefaultGameModeMapFilter()
method GetSpectatorSideIndex (line 1332) | private int GetSpectatorSideIndex() => SideCount + RandomSelectorCount;
method CheckDisallowedSidesForGroup (line 1338) | protected void CheckDisallowedSidesForGroup(bool forHumanPlayers)
method CheckDisallowedSides (line 1469) | protected void CheckDisallowedSides()
method GetDisallowedSidesForGroup (line 1479) | protected bool[] GetDisallowedSidesForGroup(bool forHumanPlayers)
method GetDisallowedSides (line 1496) | protected bool[] GetDisallowedSides()
method Randomize (line 1525) | protected virtual PlayerHouseInfo[] Randomize(List<TeamStartMapping> t...
method WriteSpawnIni (line 1616) | private PlayerHouseInfo[] WriteSpawnIni(Random pseudoRandom)
method GetPvPTeamCount (line 1795) | private int GetPvPTeamCount()
method IsPlayerSpectator (line 1821) | protected bool IsPlayerSpectator(PlayerInfo pInfo)
method GetIPAddressForPlayer (line 1829) | protected virtual string GetIPAddressForPlayer(PlayerInfo player) => "...
method WriteSpawnIniAdditions (line 1837) | protected virtual void WriteSpawnIniAdditions(IniFile iniFile)
method InitializeMatchStatistics (line 1842) | private void InitializeMatchStatistics(PlayerHouseInfo[] houseInfos)
method WriteMap (line 1889) | private void WriteMap(PlayerHouseInfo[] houseInfos, Random pseudoRandom)
method CopySupplementalMapFiles (line 1948) | private void CopySupplementalMapFiles(IniFile mapIni)
method DeleteSupplementalMapFiles (line 1984) | private void DeleteSupplementalMapFiles()
method GetSupplementalMapFiles (line 2006) | private static IEnumerable<string> GetSupplementalMapFiles(string base...
method ManipulateStartingLocations (line 2021) | private void ManipulateStartingLocations(IniFile mapIni, PlayerHouseIn...
method StartGame (line 2129) | protected virtual void StartGame()
method GameProcessExited_Callback (line 2143) | private void GameProcessExited_Callback() => AddCallback(new Action(Ga...
method GameProcessExited (line 2145) | protected virtual void GameProcessExited()
method CopyPlayerDataFromUI (line 2168) | protected virtual void CopyPlayerDataFromUI(object sender, EventArgs e)
method ClearReadyStatuses (line 2246) | protected void ClearReadyStatuses(bool resetAutoReady = false)
method CanRightClickMultiplayer (line 2255) | private bool CanRightClickMultiplayer(XNADropDownItem selectedPlayer)
method MultiplayerName_RightClick (line 2262) | private void MultiplayerName_RightClick(object sender, EventArgs e)
method CopyPlayerDataToUI (line 2280) | protected virtual void CopyPlayerDataToUI()
method UpdateMapPreviewBoxEnabledStatus (line 2396) | protected abstract void UpdateMapPreviewBoxEnabledStatus();
method KickPlayer (line 2402) | protected virtual void KickPlayer(int playerIndex)
method BanPlayer (line 2411) | protected virtual void BanPlayer(int playerIndex)
method SetMapLabels (line 2419) | protected virtual void SetMapLabels()
method ChangeMap (line 2440) | protected virtual void ChangeMap(GameModeMap gameModeMap)
method ApplyForcedCheckBoxOptions (line 2601) | private void ApplyForcedCheckBoxOptions(List<GameLobbyCheckBox> option...
method ApplyForcedDropDownOptions (line 2616) | private void ApplyForcedDropDownOptions(List<GameLobbyDropDown> option...
method AILevelToName (line 2631) | protected string AILevelToName(int aiLevel)
method GetGameType (line 2636) | protected GameType GetGameType()
method GetRank (line 2649) | protected Rank GetRank()
method AddGameOptionPreset (line 2817) | protected string AddGameOptionPreset(string name)
method LoadGameOptionPreset (line 2838) | public bool LoadGameOptionPreset(string name)
method UpdateLaunchGameButtonStatus (line 2877) | protected virtual bool UpdateLaunchGameButtonStatus()
method AllowPlayerOptionsChange (line 2882) | protected abstract bool AllowPlayerOptionsChange();
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyCheckBox.cs
class GameLobbyCheckBox (line 17) | public class GameLobbyCheckBox : GameSessionCheckBox
method GameLobbyCheckBox (line 19) | public GameLobbyCheckBox(WindowManager windowManager) : base(windowMan...
method Initialize (line 43) | public override void Initialize()
method ParseControlINIAttribute (line 66) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method ApplyDisallowedSideIndex (line 97) | public void ApplyDisallowedSideIndex(bool[] disallowedArray)
method OnLeftClick (line 112) | public override void OnLeftClick(InputEventArgs inputEventArgs)
method Draw (line 125) | public override void Draw(GameTime gameTime)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyDropDown.cs
class GameLobbyDropDown (line 9) | public class GameLobbyDropDown : GameSessionDropDown
method GameLobbyDropDown (line 11) | public GameLobbyDropDown(WindowManager windowManager) : base(windowMan...
method Initialize (line 17) | public override void Initialize()
method ParseControlINIAttribute (line 40) | protected override void ParseControlINIAttribute(IniFile iniFile, stri...
method OnLeftClick (line 53) | public override void OnLeftClick(InputEventArgs inputEventArgs)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbySettingsEventArgs.cs
class GameLobbySettingsEventArgs (line 5) | public class GameLobbySettingsEventArgs(string gameRoomName, int maxPlay...
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbySettingsWindow.cs
class GameLobbySettingsWindow (line 15) | public class GameLobbySettingsWindow(WindowManager windowManager) : XNAW...
method Initialize (line 34) | public override void Initialize()
method Open (line 137) | public void Open(string currentGameName, int currentMaxPlayers, int cu...
method BtnSave_LeftClick (line 147) | private void BtnSave_LeftClick(object sender, EventArgs e)
method BtnCancel_LeftClick (line 169) | private void BtnCancel_LeftClick(object sender, EventArgs e)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameModeMapFilter.cs
class GameModeMapFilter (line 8) | public class GameModeMapFilter
method GameModeMapFilter (line 12) | public GameModeMapFilter(Func<List<GameModeMap>> filterAction)
method Any (line 17) | public bool Any() => GetGameModeMaps().Any();
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/GameType.cs
type GameType (line 3) | public enum GameType
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/LANGameLobby.cs
class LANGameLobby (line 25) | public class LANGameLobby : MultiplayerGameLobby
method LANGameLobby (line 46) | public LANGameLobby(WindowManager windowManager, string iniName,
method WindowManager_GameClosing (line 85) | private void WindowManager_GameClosing(object sender, EventArgs e)
method HandleFileHashCommand (line 91) | private void HandleFileHashCommand(string sender, string fileHash)
method Initialize (line 133) | public override void Initialize()
method SetUp (line 140) | public void SetUp(bool isHost,
method PostJoin (line 183) | public void PostJoin()
method ListenForClients (line 193) | private void ListenForClients()
method HandleClientConnection (line 236) | private void HandleClientConnection(object clientInfo)
method AddPlayer (line 288) | private void AddPlayer(LANPlayerInfo lpInfo)
method LpInfo_ConnectionLost (line 312) | private void LpInfo_ConnectionLost(object sender, EventArgs e)
method HandleConnectionLost (line 317) | private void HandleConnectionLost(LANPlayerInfo lpInfo)
method LpInfo_MessageReceived (line 333) | private void LpInfo_MessageReceived(object sender, NetworkMessageEvent...
method HandleClientMessage (line 339) | private void HandleClientMessage(string data, LANPlayerInfo lpInfo)
method CleanUpPlayer (line 352) | private void CleanUpPlayer(LANPlayerInfo lpInfo)
method HandleServerCommunication (line 361) | private void HandleServerCommunication()
method HandleMessageFromServer (line 466) | private void HandleMessageFromServer(string message)
method BtnLeaveGame_LeftClick (line 479) | protected override void BtnLeaveGame_LeftClick(object sender, EventArg...
method LeaveGame (line 481) | protected void LeaveGame(string message = null)
method UpdateDiscordPresence (line 492) | protected override void UpdateDiscordPresence(bool resetTimer = false)
method Clear (line 511) | public override void Clear()
method SetChatColorIndex (line 535) | public void SetChatColorIndex(int colorIndex)
method GetSwitchName (line 541) | public override string GetSwitchName() => "LAN Game Lobby".L10N("Clien...
method AddNotice (line 543) | protected override void AddNotice(string message, Color color) =>
method BroadcastPlayerOptions (line 546) | protected override void BroadcastPlayerOptions()
method BroadcastPlayerExtraOptions (line 574) | protected override void BroadcastPlayerExtraOptions()
method HostLaunchGame (line 581) | protected override void HostLaunchGame() => BroadcastMessage(LAUNCH_GA...
method GetIPAddressForPlayer (line 583) | protected override string GetIPAddressForPlayer(PlayerInfo player)
method RequestPlayerOptions (line 589) | protected override void RequestPlayerOptions(int side, int color, int ...
method RequestReadyStatus (line 600) | protected override void RequestReadyStatus() =>
method SendChatMessage (line 603) | protected override void SendChatMessage(string message)
method OnGameOptionChanged (line 612) | protected override void OnGameOptionChanged()
method GetReadyNotification (line 640) | protected override void GetReadyNotification()
method ClearPingIndicators (line 651) | protected override void ClearPingIndicators()
method UpdatePlayerPingIndicator (line 656) | protected override void UpdatePlayerPingIndicator(PlayerInfo pInfo)
method BroadcastMessage (line 666) | private void BroadcastMessage(string message, bool otherPlayersOnly = ...
method PlayerExtraOptions_OptionsChanged (line 678) | protected override void PlayerExtraOptions_OptionsChanged(object sende...
method SendMessageToHost (line 684) | private void SendMessageToHost(string message)
method UnlockGame (line 704) | protected override void UnlockGame(bool manual)
method LockGame (line 714) | protected override void LockGame()
method GameProcessExited (line 724) | protected override void GameProcessExited()
method ReturnNotification (line 746) | private void ReturnNotification(string sender)
method Update (line 759) | public override void Update(GameTime gameTime)
method BroadcastGame (line 806) | private void BroadcastGame()
method GameHost_HandleChatCommand (line 829) | private void GameHost_HandleChatCommand(string sender, string data)
method Player_HandleChatCommand (line 844) | private void Player_HandleChatCommand(string data)
method GameHost_HandleReturnCommand (line 862) | private void GameHost_HandleReturnCommand(string sender)
method Player_HandleReturnCommand (line 867) | private void Player_HandleReturnCommand(string sender)
method HandleGetReadyCommand (line 872) | private void HandleGetReadyCommand()
method HandleHostQuit (line 878) | private void HandleHostQuit()
method HandlePlayerOptionsRequest (line 884) | private void HandlePlayerOptionsRequest(string sender, string data)
method HandlePlayerExtraOptionsBroadcast (line 946) | private void HandlePlayerExtraOptionsBroadcast(string data) => ApplyPl...
method HandlePlayerOptionsBroadcast (line 948) | private void HandlePlayerOptionsBroadcast(string data)
method HandlePlayerQuit (line 1031) | private void HandlePlayerQuit(string sender)
method HandleGameOptionsMessage (line 1046) | private void HandleGameOptionsMessage(string data)
method GameHost_HandleReadyRequest (line 1135) | private void GameHost_HandleReadyRequest(string sender, string autoReady)
method HandleGameLaunchCommand (line 1148) | private void HandleGameLaunchCommand(string gameId)
method HandlePing (line 1159) | private void HandlePing()
method BroadcastDiceRoll (line 1164) | protected override void BroadcastDiceRoll(int dieSides, int[] results)
method Host_HandleDiceRoll (line 1170) | private void Host_HandleDiceRoll(string sender, string result)
method Client_HandleDiceRoll (line 1175) | private void Client_HandleDiceRoll(string data)
method WriteSpawnIniAdditions (line 1186) | protected override void WriteSpawnIniAdditions(IniFile iniFile)
class LobbyNotificationEventArgs (line 1196) | public class LobbyNotificationEventArgs : EventArgs
method LobbyNotificationEventArgs (line 1198) | public LobbyNotificationEventArgs(string notification)
class GameBroadcastEventArgs (line 1206) | public class GameBroadcastEventArgs : EventArgs
method GameBroadcastEventArgs (line 1208) | public GameBroadcastEventArgs(string message)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/MapCodeHelper.cs
class MapCodeHelper (line 16) | public static class MapCodeHelper
method GetMapEncoding (line 18) | public static Encoding GetMapEncoding(string filepath) => Translation....
method ApplyMapCode (line 26) | public static void ApplyMapCode(IniFile mapIni, string customIniPath, ...
method ApplyMapCode (line 49) | public static void ApplyMapCode(IniFile mapIni, IniFile mapCodeIni)
method ReplaceMapObjects (line 65) | private static void ReplaceMapObjects(IniFile mapIni, IniFile mapCodeI...
method GetObjectID (line 105) | private static string GetObjectID(string value, string sectionName)
method GetKeyValuePairs (line 123) | private static List<KeyValuePair<string, string>> GetKeyValuePairs(Ini...
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/MapPreviewBox.cs
type MapPreviewBoxExtraMapPreviewTexture (line 21) | struct MapPreviewBoxExtraMapPreviewTexture
method MapPreviewBoxExtraMapPreviewTexture (line 27) | public MapPreviewBoxExtraMapPreviewTexture(Texture2D texture, Point po...
class MapPreviewBox (line 38) | public class MapPreviewBox : XNAPanel, ICompositeControl
method MapPreviewBox (line 53) | public MapPreviewBox(WindowManager windowManager, MapLoader mapLoader)...
method MapPreviewBox_NameChanged (line 68) | private void MapPreviewBox_NameChanged(object sender, EventArgs e)
method SetFields (line 73) | public void SetFields(List<PlayerInfo> players, List<PlayerInfo> aiPla...
method Initialize (line 185) | public override void Initialize()
method MapPreviewBox_RightClick (line 260) | private void MapPreviewBox_RightClick(object sender, EventArgs e)
method ToggleFavoriteMap (line 272) | private void ToggleFavoriteMap()
method ToggleExtraTextures (line 277) | private void ToggleExtraTextures()
method ShowInFolder (line 285) | private void ShowInFolder() => GameModeMap?.Map.OpenContainingFolder();
method ContextMenu_OptionSelected (line 287) | private void ContextMenu_OptionSelected(int index)
method Indicator_LeftClick (line 322) | private void Indicator_LeftClick(object sender, EventArgs e)
method Indicator_RightClick (line 383) | private void Indicator_RightClick(object sender, EventArgs e)
method UpdateMap (line 413) | private void UpdateMap()
method RefreshFavoriteBtn (line 551) | public void RefreshFavoriteBtn()
method RefreshExtraTexturesBtn (line 562) | public void RefreshExtraTexturesBtn()
method PreviewTexturePointToControlAreaPoint (line 571) | private Point PreviewTexturePointToControlAreaPoint(Point previewTextu...
method UpdateStartingLocationTexts (line 577) | public void UpdateStartingLocationTexts()
method OnMouseEnter (line 632) | public override void OnMouseEnter()
method OnMouseLeave (line 647) | public override void OnMouseLeave()
method OnLeftClick (line 661) | public override void OnLeftClick(InputEventArgs inputEventArgs)
method Draw (line 682) | public override void Draw(GameTime gameTime)
method DrawPreviewTexture (line 723) | private void DrawPreviewTexture(Point renderPoint)
class LocalStartingLocationEventArgs (line 733) | public class LocalStartingLocationEventArgs : EventArgs
method LocalStartingLocationEventArgs (line 735) | public LocalStartingLocationEventArgs(int startingLocationIndex)
FILE: DXMainClient/DXGUI/Multiplayer/GameLobby/MultiplayerGameLobby.cs
class MultiplayerGameLobby (line 26) | public abstract class MultiplayerGameLobby : GameLobbyBase, ISwitchable
method MultiplayerGameLobby (line 31) | public MultiplayerGameLobby(WindowManager windowManager, string iniName,
method AddChatBoxCommand (line 121) | protected void AddChatBoxCommand(ChatBoxCommand command) => chatBoxCom...
method Initialize (line 123) | public override void Initialize()
method ParseHostPlayerControls (line 210) | private void ParseHostPlayerControls()
method PostInitialize (line 235) | protected void PostInitialize()
method fsw_Created (line 241) | private void fsw_Created(object sender, FileSystemEventArgs e)
method FSWEvent (line 246) | private void FSWEvent(FileSystemEventArgs e)
method StartGame (line 266) | protected override void StartGame()
method GameProcessExited (line 277) | protected override void GameProcessExited()
method GenerateGameID (line 303) | private void GenerateGameID()
method BtnLockGame_LeftClick (line 323) | private void BtnLockGame_LeftClick(object sender, EventArgs e)
method HandleLockGameButtonClick (line 328) | protected virtual void HandleLockGameButtonClick()
method LockGame (line 336) | protected abstract void LockGame();
method UnlockGame (line 338) | protected abstract void UnlockGame(bool manual);
method TbChatInput_EnterPressed (line 340) | private void TbChatInput_EnterPressed(object sender, EventArgs e)
method ChkAutoReady_CheckedChanged (line 396) | private void ChkAutoReady_CheckedChanged(object sender, EventArgs e)
method ResetAutoReadyCheckbox (line 402) | protected void ResetAutoReadyCheckbox()
method SetFrameSendRate (line 410) | private void SetFrameSendRate(string value)
method SetMaxAhead (line 427) | private void SetMaxAhead(string value)
method SetProtocolVersion (line 444) | private void SetProtocolVersion(string value)
method SetStartingLocationClearance (line 467) | private void SetStartingLocationClearance(string value)
method SetRandomStartingLocations (line 482) | protected void SetRandomStartingLocations(bool newValue)
method RollDiceCommand (line 498) | private void RollDiceCommand(string dieType)
method LoadCustomMap (line 541) | private void LoadCustomMap(string mapName)
method BroadcastDiceRoll (line 560) | protected abstract void BroadcastDiceRoll(int dieSides, int[] results);
method HandleDiceRollResult (line 572) | protected void HandleDiceRollResult(string senderName, string result)
method PrintDiceRollResult (line 603) | protected void PrintDiceRollResult(string senderName, int dieSides, in...
method SendChatMessage (line 610) | pr
Condensed preview — 482 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,719K chars).
[
{
"path": ".editorconfig",
"chars": 17239,
"preview": "root = true\n\n# All files\n[*]\nindent_style = space\n\n# Xml files\n[*.xml]\nindent_size = 2\n\n# C# files\n[*.cs]\n\n#### Core Edi"
},
{
"path": ".gitattributes",
"chars": 2531,
"preview": "###############################################################################\n# Set default behavior to automatically "
},
{
"path": ".github/FUNDING.yml",
"chars": 761,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": ".github/ISSUE_TEMPLATE/bug-report.yml",
"chars": 3009,
"preview": "name: Bug Report\ndescription: Open an issue to ask for a XNA Client bug to be fixed.\ntitle: \"Your bug report title here\""
},
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 204,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: Official channels on C&C Mod Haven\n url: https://discord.gg/Smv4"
},
{
"path": ".github/ISSUE_TEMPLATE/feature-request.yml",
"chars": 679,
"preview": "name: Feature Request\ndescription: Open an issue to ask for a XNA Client feature to be implemented.\ntitle: \"Your feature"
},
{
"path": ".github/copilot-coding-agent-setup.md",
"chars": 3085,
"preview": "# GitHub Copilot coding agent setup instructions\n\nThis section only applies to the GitHub Copilot coding agent, running "
},
{
"path": ".github/copilot-instructions.md",
"chars": 1661,
"preview": "# Agent Instructions\n\n\n## General information\n\n### Project structure\n\n| Path | Description |\n|------|-------------|\n| `D"
},
{
"path": ".github/workflows/build.yml",
"chars": 608,
"preview": "name: build client\n\non:\n push:\n branches: [ master, develop ]\n pull_request:\n branches: [ master, develop ]\n wo"
},
{
"path": ".github/workflows/copilot-setup-steps.yml",
"chars": 1911,
"preview": "name: Copilot setup steps\n\n# Automatically run the setup steps when they are changed to allow for easy validation, and\n#"
},
{
"path": ".github/workflows/pr-build-comment.yml",
"chars": 2622,
"preview": "name: automatic comment on pull request\non:\n workflow_run:\n workflows: ['build client']\n types: [completed]\njobs:"
},
{
"path": ".github/workflows/release-build.yml",
"chars": 1380,
"preview": "name: release build\n\non:\n release:\n types: [published]\n\npermissions:\n contents: write\n\njobs:\n build:\n runs-on: "
},
{
"path": ".gitignore",
"chars": 7219,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n##\n## G"
},
{
"path": ".gitmodules",
"chars": 113,
"preview": "[submodule \"Rampastring.XNAUI\"]\n\tpath = Rampastring.XNAUI\n\turl = https://github.com/CnCNet/Rampastring.XNAUI.git\n"
},
{
"path": "AdditionalFiles/UpdateServerScripts/preupdateexec",
"chars": 224,
"preview": "[Rename]\nOLD_FILE_PATH=NEW_FILE_PATH\n\n[Delete]\nFILE_PATH\n\n[RenameFolder]\nOLD_FOLDER_PATH=NEW_FOLDER_PATH\n\n[RenameAndMerg"
},
{
"path": "AdditionalFiles/UpdateServerScripts/updateexec",
"chars": 224,
"preview": "[Rename]\nOLD_FILE_PATH=NEW_FILE_PATH\n\n[Delete]\nFILE_PATH\n\n[RenameFolder]\nOLD_FOLDER_PATH=NEW_FOLDER_PATH\n\n[RenameAndMerg"
},
{
"path": "AdditionalFiles/VersionFileWriter/VersionConfig.ini",
"chars": 2500,
"preview": "; Mod version.\n[Version]\n1\n\n; Mod updater version.\n; Will prompt (either in update status or actual dialog prompt, see b"
},
{
"path": "ClientCore/CCIniFile.cs",
"chars": 2342,
"preview": "using Rampastring.Tools;\nusing System.IO;\n\nnamespace ClientCore\n{\n public class CCIniFile : IniFile\n {\n pu"
},
{
"path": "ClientCore/ClientConfiguration.cs",
"chars": 31184,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Runtime.InteropServices"
},
{
"path": "ClientCore/ClientCore.csproj",
"chars": 415,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <Description>CnCNet Client Core Library</Description>\n </Prope"
},
{
"path": "ClientCore/Enums/AllowPrivateMessagesFromEnum.cs",
"chars": 173,
"preview": "namespace ClientCore.Enums\n{\n public enum AllowPrivateMessagesFromEnum\n {\n All = 1,\n CurrentChannel"
},
{
"path": "ClientCore/Enums/ClientType.cs",
"chars": 121,
"preview": "namespace ClientCore.Enums\n{\n public enum ClientType\n {\n TS,\n YR,\n Ares,\n RA,\n }\n}"
},
{
"path": "ClientCore/Enums/ClientTypeHelper.cs",
"chars": 1015,
"preview": "using System;\nusing System.Linq;\nusing ClientCore.Extensions;\n\nnamespace ClientCore.Enums\n{\n public static class Cli"
},
{
"path": "ClientCore/Enums/SortDirection.cs",
"chars": 126,
"preview": "namespace ClientCore.Enums\n{\n public enum SortDirection\n {\n None = 0,\n Asc = 1,\n Desc = 2\n "
},
{
"path": "ClientCore/Extensions/ArrayExtensions.cs",
"chars": 3211,
"preview": "using System;\n\nnamespace ClientCore.Extensions;\n\n// https://stackoverflow.com/a/65894979/20766970\npublic static class A"
},
{
"path": "ClientCore/Extensions/EnumExtensions.cs",
"chars": 715,
"preview": "using System;\nusing System.Linq;\nusing System.Text;\n\nnamespace ClientCore.Extensions\n{\n public static class EnumExte"
},
{
"path": "ClientCore/Extensions/EnumerableExtensions.cs",
"chars": 1097,
"preview": "using System.Collections.Generic;\nusing System.Linq;\n\nnamespace ClientCore.Extensions;\n\npublic static class EnumerableE"
},
{
"path": "ClientCore/Extensions/FileExtensions.cs",
"chars": 4660,
"preview": "using System;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing System.Runtime.Versioning;\nusing System.Text"
},
{
"path": "ClientCore/Extensions/IniFileExtensions.cs",
"chars": 2762,
"preview": "#nullable enable\n\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing Rampastring.Tools;\n\nnamespa"
},
{
"path": "ClientCore/Extensions/StringExtensions.cs",
"chars": 5141,
"preview": "using System;\nusing System.Text.RegularExpressions;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing ClientC"
},
{
"path": "ClientCore/I18N/Translation.cs",
"chars": 14441,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.IO;\nusing System.Linq;\nusing S"
},
{
"path": "ClientCore/I18N/TranslationGameFile.cs",
"chars": 510,
"preview": "namespace ClientCore.I18N;\n\n/// <summary>\n/// Describes a file to try and copy into the game folder with a translation."
},
{
"path": "ClientCore/INIProcessing/IniPreprocessInfoStore.cs",
"chars": 4720,
"preview": "using Rampastring.Tools;\nusing System;\nusing System.Collections.Generic;\nusing System.IO;\nusing ClientCore.Extensions;\n"
},
{
"path": "ClientCore/INIProcessing/IniPreprocessor.cs",
"chars": 1962,
"preview": "using Rampastring.Tools;\nusing System.Collections.Generic;\nusing System.IO;\n\nnamespace ClientCore.INIProcessing\n{\n /"
},
{
"path": "ClientCore/INIProcessing/PreprocessorBackgroundTask.cs",
"chars": 2837,
"preview": "using Rampastring.Tools;\nusing System.IO;\nusing System.Threading.Tasks;\nusing System.Collections.Generic;\n\nnamespace Cl"
},
{
"path": "ClientCore/LoadingScreenController.cs",
"chars": 837,
"preview": "using System;\nusing Rampastring.Tools;\n\nnamespace ClientCore\n{\n public static class LoadingScreenController\n {\n "
},
{
"path": "ClientCore/OSVersion.cs",
"chars": 95,
"preview": "public enum OSVersion\n{\n UNKNOWN,\n WINXP,\n WINVISTA,\n WIN7,\n WIN810,\n UNIX\n}"
},
{
"path": "ClientCore/PlatformShim/EncodingExt.cs",
"chars": 1520,
"preview": "#nullable enable\nusing System.Text;\n\nnamespace ClientCore.PlatformShim;\n\npublic static class EncodingExt\n{\n static En"
},
{
"path": "ClientCore/ProcessLauncher.cs",
"chars": 424,
"preview": "using System.Diagnostics;\n\nnamespace ClientCore\n{\n public static class ProcessLauncher\n {\n public static v"
},
{
"path": "ClientCore/ProfanityFilter.cs",
"chars": 3548,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Text.RegularExpressions;\n\nnamespace ClientCore\n{\n public"
},
{
"path": "ClientCore/ProgramConstants.cs",
"chars": 6100,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\nusing System.Text;\nusing System.Refl"
},
{
"path": "ClientCore/SavedGameManager.cs",
"chars": 5489,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing Rampastring.Tools;\n\nnamespace ClientCore\n{\n /"
},
{
"path": "ClientCore/Settings/BoolSetting.cs",
"chars": 792,
"preview": "using Rampastring.Tools;\n\nnamespace ClientCore.Settings\n{\n public class BoolSetting : INISetting<bool>\n {\n "
},
{
"path": "ClientCore/Settings/DoubleSetting.cs",
"chars": 801,
"preview": "using Rampastring.Tools;\n\nnamespace ClientCore.Settings\n{\n public class DoubleSetting : INISetting<double>\n {\n "
},
{
"path": "ClientCore/Settings/IIniSetting.cs",
"chars": 179,
"preview": "namespace ClientCore.Settings\n{\n /// <summary>\n /// A dummy interface for checking for INISetting in reflection.\n"
},
{
"path": "ClientCore/Settings/INISetting.cs",
"chars": 1503,
"preview": "using Rampastring.Tools;\n\nnamespace ClientCore.Settings\n{\n /// <summary>\n /// A base class for an INI setting.\n "
},
{
"path": "ClientCore/Settings/IntRangeSetting.cs",
"chars": 1417,
"preview": "using Rampastring.Tools;\n\nnamespace ClientCore.Settings\n{\n /// <summary>\n /// Similar to IntSetting, this setting"
},
{
"path": "ClientCore/Settings/IntSetting.cs",
"chars": 774,
"preview": "using Rampastring.Tools;\n\nnamespace ClientCore.Settings\n{\n public class IntSetting : INISetting<int>\n {\n p"
},
{
"path": "ClientCore/Settings/StringListSetting.cs",
"chars": 1395,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Rampastring.Tools;\n\nnamespace ClientCore.Setti"
},
{
"path": "ClientCore/Settings/StringSetting.cs",
"chars": 790,
"preview": "using Rampastring.Tools;\n\nnamespace ClientCore.Settings\n{\n public class StringSetting : INISetting<string>\n {\n "
},
{
"path": "ClientCore/Settings/UserINISettings.cs",
"chars": 25616,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Linq;\n\nusing ClientCore.Enums;\nusing Clien"
},
{
"path": "ClientCore/Statistics/DataWriter.cs",
"chars": 1596,
"preview": "using System;\nusing System.Buffers.Binary;\nusing System.IO;\nusing System.Text;\n\nnamespace ClientCore.Statistics\n{\n i"
},
{
"path": "ClientCore/Statistics/GameParsers/LogFileStatisticsParser.cs",
"chars": 6774,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing Rampastring.Tools;\n\nnamespace ClientCore.Statist"
},
{
"path": "ClientCore/Statistics/GenericMatchParser.cs",
"chars": 319,
"preview": "namespace ClientCore.Statistics\n{\n public abstract class GenericMatchParser\n {\n public MatchStatistics Sta"
},
{
"path": "ClientCore/Statistics/GenericStatisticsManager.cs",
"chars": 986,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\n\nnamespace ClientCore.Statistics\n{\n public abstract"
},
{
"path": "ClientCore/Statistics/MatchStatistics.cs",
"chars": 4106,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.IO;\nusing System.Text;\nusing ClientCore.Statistics.GamePar"
},
{
"path": "ClientCore/Statistics/PlayerStatistics.cs",
"chars": 2230,
"preview": "using System;\nusing System.IO;\n\nnamespace ClientCore.Statistics\n{\n public class PlayerStatistics\n {\n publi"
},
{
"path": "ClientCore/Statistics/StatisticsManager.cs",
"chars": 25387,
"preview": "using System;\nusing System.Buffers.Binary;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.IO;\nusing "
},
{
"path": "ClientGUI/ClientGUI.csproj",
"chars": 773,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <Description>CnCNet Client UI Library</Description>\n </Propert"
},
{
"path": "ClientGUI/ClientGUICreator.cs",
"chars": 6060,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing Microsoft.Extensions."
},
{
"path": "ClientGUI/DarkeningPanel.cs",
"chars": 3413,
"preview": "using Rampastring.XNAUI.XNAControls;\nusing System;\nusing Rampastring.XNAUI;\nusing Microsoft.Xna.Framework;\n\nnamespace C"
},
{
"path": "ClientGUI/GameProcessLogic.cs",
"chars": 7993,
"preview": "using System;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing ClientCore;\nusing "
},
{
"path": "ClientGUI/HotkeyConfigurationWindow.cs",
"chars": 31324,
"preview": "#nullable enable\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\n\nusing ClientCore;\nusing Cli"
},
{
"path": "ClientGUI/ICompositeControl.cs",
"chars": 744,
"preview": "using System.Collections.Generic;\n\nusing Rampastring.XNAUI.XNAControls;\n\nnamespace ClientGUI;\n\n/// <summary>\n/// Indica"
},
{
"path": "ClientGUI/IME/DummyIMEHandler.cs",
"chars": 452,
"preview": "#nullable enable\nusing Microsoft.Xna.Framework;\n\nnamespace ClientGUI.IME\n{\n internal class DummyIMEHandler : IMEHand"
},
{
"path": "ClientGUI/IME/IMEHandler.cs",
"chars": 8783,
"preview": "#nullable enable\nusing System;\nusing System.Collections.Concurrent;\nusing System.Diagnostics;\n\nusing Microsoft.Xna.Frame"
},
{
"path": "ClientGUI/IME/SdlIMEHandler.cs",
"chars": 468,
"preview": "#nullable enable\nusing Microsoft.Xna.Framework;\n\nnamespace ClientGUI.IME;\n\n/// <summary>\n/// Integrate IME to DesktopGL"
},
{
"path": "ClientGUI/IME/WinFormsIMEHandler.cs",
"chars": 1491,
"preview": "#nullable enable\nusing System;\n\nusing ImeSharp;\n\nusing Microsoft.Xna.Framework;\n\nusing Rampastring.Tools;\n\nnamespace Cl"
},
{
"path": "ClientGUI/INIConfigException.cs",
"chars": 286,
"preview": "using System;\n\nnamespace ClientGUI\n{\n /// <summary>\n /// The exception that is thrown when INI data is invalid.\n "
},
{
"path": "ClientGUI/INItializableWindow.cs",
"chars": 11934,
"preview": "using ClientCore;\nusing ClientCore.I18N;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nusing Microsoft.Xn"
},
{
"path": "ClientGUI/IToolTipContainer.cs",
"chars": 141,
"preview": "namespace ClientGUI;\n\npublic interface IToolTipContainer\n{\n public ToolTip ToolTip { get; }\n public string ToolTi"
},
{
"path": "ClientGUI/Parser.cs",
"chars": 9904,
"preview": "/*********************************************************************\n* Dawn of the Tiberium Age MonoGame/XNA CnCNet C"
},
{
"path": "ClientGUI/ScreenResolution.cs",
"chars": 8310,
"preview": "#nullable enable\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing ClientCore;\n\nusing Microsoft"
},
{
"path": "ClientGUI/Settings/FileSettingCheckBox.cs",
"chars": 5728,
"preview": "using ClientCore;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\nusing System.Collections.Generic;\nusing System.IO;\nu"
},
{
"path": "ClientGUI/Settings/FileSettingDropDown.cs",
"chars": 4426,
"preview": "using ClientCore;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\nusing System.Collections.Generic;\nusing System.IO;\n\n"
},
{
"path": "ClientGUI/Settings/FileSourceDestinationInfo.cs",
"chars": 7564,
"preview": "using ClientCore;\nusing ClientCore.Extensions;\nusing Rampastring.Tools;\nusing System;\nusing System.Collections.Generic;"
},
{
"path": "ClientGUI/Settings/IFileSetting.cs",
"chars": 774,
"preview": "namespace ClientGUI.Settings\n{\n interface IFileSetting : IUserSetting\n {\n /// <summary>\n /// Determ"
},
{
"path": "ClientGUI/Settings/IUserSetting.cs",
"chars": 1213,
"preview": "namespace ClientGUI.Settings\n{\n public interface IUserSetting\n {\n\n /// <summary>\n /// INI section n"
},
{
"path": "ClientGUI/Settings/SettingCheckBox.cs",
"chars": 3405,
"preview": "using ClientCore;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\n\nnamespace ClientGUI.Settings\n{\n /// <summary>\n "
},
{
"path": "ClientGUI/Settings/SettingCheckBoxBase.cs",
"chars": 5297,
"preview": "using System;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\n\nnamespace ClientGUI.Settings\n{\n public abstract cla"
},
{
"path": "ClientGUI/Settings/SettingDropDown.cs",
"chars": 2603,
"preview": "using ClientCore;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\n\nnamespace ClientGUI.Settings\n{\n /// <summary>\n "
},
{
"path": "ClientGUI/Settings/SettingDropDownBase.cs",
"chars": 3147,
"preview": "using ClientCore.I18N;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\nusing Rampastring.XNAUI.XNAControls;\n\nnamespac"
},
{
"path": "ClientGUI/ToolTip.cs",
"chars": 6379,
"preview": "using ClientCore;\nusing Microsoft.Xna.Framework;\nusing Rampastring.XNAUI;\nusing Rampastring.XNAUI.XNAControls;\nusing Sys"
},
{
"path": "ClientGUI/TranslationGUIExtensions.cs",
"chars": 1138,
"preview": "using ClientCore.I18N;\n\nusing Rampastring.XNAUI.XNAControls;\n\nnamespace ClientGUI;\n\npublic static class TranslationGUIEx"
},
{
"path": "ClientGUI/TranslationINIParser.cs",
"chars": 4441,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Globalization;\nusing System.Linq;\nusing System.Text;\nusing"
},
{
"path": "ClientGUI/UIDesignConstants.cs",
"chars": 715,
"preview": "namespace ClientGUI\n{\n /// <summary>\n /// Contains constants used in user interface design.\n /// </summary>\n "
},
{
"path": "ClientGUI/XNAChatTextBox.cs",
"chars": 1853,
"preview": "using Microsoft.Xna.Framework.Input;\nusing Rampastring.XNAUI;\nusing Rampastring.XNAUI.XNAControls;\nusing System;\nusing "
},
{
"path": "ClientGUI/XNAClientButton.cs",
"chars": 2040,
"preview": "using Rampastring.XNAUI.XNAControls;\nusing Rampastring.XNAUI;\nusing Rampastring.Tools;\nusing System;\nusing ClientCore;\n"
},
{
"path": "ClientGUI/XNAClientCheckBox.cs",
"chars": 1334,
"preview": "using Rampastring.XNAUI.XNAControls;\nusing Rampastring.XNAUI;\nusing System;\nusing Rampastring.Tools;\nusing ClientCore;\n"
},
{
"path": "ClientGUI/XNAClientColorDropDown.cs",
"chars": 6122,
"preview": "using System.Collections.Generic;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nusing Microsoft.Xna.Frame"
},
{
"path": "ClientGUI/XNAClientDropDown.cs",
"chars": 1976,
"preview": "using Rampastring.XNAUI.XNAControls;\nusing Rampastring.XNAUI;\nusing Rampastring.Tools;\nusing System;\nusing ClientCore;\n"
},
{
"path": "ClientGUI/XNAClientLinkLabel.cs",
"chars": 3518,
"preview": "using Rampastring.XNAUI;\nusing Rampastring.Tools;\nusing ClientCore;\nusing Rampastring.XNAUI.XNAControls;\nusing ClientCo"
},
{
"path": "ClientGUI/XNAClientPreferredItemDropDown.cs",
"chars": 2374,
"preview": "using Microsoft.Xna.Framework;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\nusing Rampastring.XNAUI.XNAControls;\nu"
},
{
"path": "ClientGUI/XNAClientStateButton.cs",
"chars": 1946,
"preview": "using System;\nusing System.Collections.Generic;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework.Graphics;\nus"
},
{
"path": "ClientGUI/XNAClientTabControl.cs",
"chars": 1051,
"preview": "using Rampastring.XNAUI.XNAControls;\nusing Rampastring.XNAUI;\n\nnamespace ClientGUI\n{\n public class XNAClientTabContr"
},
{
"path": "ClientGUI/XNAClientToggleButton.cs",
"chars": 2733,
"preview": "using System;\nusing Microsoft.Xna.Framework.Graphics;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\nusing Rampastri"
},
{
"path": "ClientGUI/XNAExtraPanel.cs",
"chars": 1092,
"preview": "using Microsoft.Xna.Framework;\nusing Rampastring.XNAUI.XNAControls;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\n\n"
},
{
"path": "ClientGUI/XNALinkButton.cs",
"chars": 1480,
"preview": "using System;\nusing Rampastring.XNAUI;\nusing Rampastring.Tools;\nusing ClientCore;\n\nnamespace ClientGUI\n{\n public cla"
},
{
"path": "ClientGUI/XNAMessageBox.cs",
"chars": 11782,
"preview": "using ClientCore.Extensions;\nusing System;\nusing Microsoft.Xna.Framework;\nusing Rampastring.XNAUI.XNAControls;\nusing Ra"
},
{
"path": "ClientGUI/XNAOptionsPanel.cs",
"chars": 4027,
"preview": "using ClientCore;\nusing ClientGUI.Settings;\nusing Microsoft.Xna.Framework;\nusing Rampastring.Tools;\nusing Rampastring.X"
},
{
"path": "ClientGUI/XNAPlayerSlotIndicator.cs",
"chars": 3429,
"preview": "using Microsoft.Xna.Framework.Graphics;\nusing Rampastring.XNAUI;\nusing Rampastring.XNAUI.XNAControls;\nusing System;\nusi"
},
{
"path": "ClientGUI/XNAWindow.cs",
"chars": 3080,
"preview": "using ClientCore;\nusing Rampastring.Tools;\nusing System;\nusing System.Collections.Generic;\nusing Rampastring.XNAUI;\n\nna"
},
{
"path": "ClientGUI/XNAWindowBase.cs",
"chars": 2601,
"preview": "using ClientCore;\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\nusing Rampastring.XNAUI.XNAControls;\nusing System.L"
},
{
"path": "ClientUpdater/ClientUpdater.csproj",
"chars": 418,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <Title>CnCNet.ClientUpdater</Title>\n <Description>CnCNet Cli"
},
{
"path": "ClientUpdater/Compression/Common/CRC.cs",
"chars": 1465,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/Common/CommandLineParser.cs",
"chars": 7033,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/Common/InBuffer.cs",
"chars": 1709,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/Common/OutBuffer.cs",
"chars": 1288,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/CompressionHelper.cs",
"chars": 3630,
"preview": "// Copyright 2022-2024 CnCNet\n//\n// This program is free software: you can redistribute it and/or modify\n// it under th"
},
{
"path": "ClientUpdater/Compression/ICoder.cs",
"chars": 4004,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/LZ/IMatchFinder.cs",
"chars": 912,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/LZ/LzBinTree.cs",
"chars": 9661,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/LZ/LzInWindow.cs",
"chars": 4170,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/LZ/LzOutWindow.cs",
"chars": 2495,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/LZMA/LzmaBase.cs",
"chars": 3056,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/LZMA/LzmaDecoder.cs",
"chars": 12356,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/LZMA/LzmaEncoder.cs",
"chars": 44426,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/RangeCoder/RangeCoder.cs",
"chars": 4316,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/RangeCoder/RangeCoderBit.cs",
"chars": 3515,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/Compression/RangeCoder/RangeCoderBitTree.cs",
"chars": 3728,
"preview": "// ------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "ClientUpdater/CustomComponent.cs",
"chars": 15815,
"preview": "// Copyright 2022-2025 CnCNet\n//\n// This program is free software: you can redistribute it and/or modify\n// it under th"
},
{
"path": "ClientUpdater/UpdateMirror.cs",
"chars": 843,
"preview": "// Copyright 2022-2024 CnCNet\n//\n// This program is free software: you can redistribute it and/or modify\n// it under th"
},
{
"path": "ClientUpdater/Updater.cs",
"chars": 71216,
"preview": "// Copyright 2022-2025 CnCNet\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the"
},
{
"path": "ClientUpdater/UpdaterFileInfo.cs",
"chars": 1053,
"preview": "// Copyright 2022-2024 CnCNet\n//\n// This program is free software: you can redistribute it and/or modify\n// it under th"
},
{
"path": "ClientUpdater/VersionState.cs",
"chars": 894,
"preview": "// Copyright 2022-2024 CnCNet\n//\n// This program is free software: you can redistribute it and/or modify\n// it under th"
},
{
"path": "CommonAssemblies.txt",
"chars": 1750,
"preview": "ClientUpdater.dll\nClientUpdater.pdb\nCyotek.Drawing.BitmapFont.dll\nDiscordRPC.dll\nFacepunch.Steamworks.Win64.dll\nFontStas"
},
{
"path": "CommonAssembliesNetFx.txt",
"chars": 2212,
"preview": "ClientUpdater.dll\nClientUpdater.pdb\nCyotek.Drawing.BitmapFont.dll\nDiscordRPC.dll\nFacepunch.Steamworks.Win64.dll\nFontStas"
},
{
"path": "Contributing.md",
"chars": 11053,
"preview": "# Contributing\n\nThis file lists the contributing guidelines that are used in the project.\n\n### Commit style guide\n\nCommi"
},
{
"path": "DXClient.slnx",
"chars": 2135,
"preview": "<Solution>\n <Configurations>\n <BuildType Name=\"UniversalGLDebug\" />\n <BuildType Name=\"UniversalGLRelease\" />\n "
},
{
"path": "DXMainClient/AdminRestarter.cs",
"chars": 3387,
"preview": "#nullable enable\nusing System;\nusing System.Diagnostics;\nusing System.Runtime.Versioning;\nusing System.Security.Principa"
},
{
"path": "DXMainClient/DXGUI/Campaign/CampaignCheckBox.cs",
"chars": 1671,
"preview": "using System;\n\nusing ClientCore;\n\nusing DTAClient.DXGUI.Generic;\n\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\nusin"
},
{
"path": "DXMainClient/DXGUI/Campaign/CampaignDropDown.cs",
"chars": 1451,
"preview": "using System;\n\nusing ClientCore;\n\nusing DTAClient.DXGUI.Generic;\n\nusing Rampastring.Tools;\nusing Rampastring.XNAUI;\nusin"
},
{
"path": "DXMainClient/DXGUI/Campaign/CampaignSelector.cs",
"chars": 38005,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Globalization;\nusing System.IO;\nu"
},
{
"path": "DXMainClient/DXGUI/Campaign/CampaignTagSelector.cs",
"chars": 3748,
"preview": "using System;\nusing System.Collections.Generic;\n\nusing ClientCore;\n\nusing ClientGUI;\n\nusing DTAClient.Domain;\n\nusing Mi"
},
{
"path": "DXMainClient/DXGUI/Campaign/CheaterWindow.cs",
"chars": 3248,
"preview": "using System;\n\nusing ClientCore.Extensions;\n\nusing ClientGUI;\n\nusing Microsoft.Xna.Framework;\n\nusing Rampastring.XNAUI;"
},
{
"path": "DXMainClient/DXGUI/GameClass.cs",
"chars": 26754,
"preview": "using ClientCore;\nusing ClientGUI;\nusing ClientGUI.IME;\nusing DTAClient.Domain;\nusing DTAClient.DXGUI.Generic;\nusing Cli"
},
{
"path": "DXMainClient/DXGUI/Generic/DropDownDataWriteMode.cs",
"chars": 956,
"preview": "namespace DTAClient.DXGUI.Generic\n{\n /// <summary>\n /// An enum for controlling how the game lobbies'\n /// dro"
},
{
"path": "DXMainClient/DXGUI/Generic/ExtrasWindow.cs",
"chars": 3794,
"preview": "using ClientCore;\nusing ClientGUI;\nusing DTAClient.Domain;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\n"
},
{
"path": "DXMainClient/DXGUI/Generic/GameInProgressWindow.cs",
"chars": 16000,
"preview": "using Rampastring.XNAUI.XNAControls;\nusing Rampastring.Tools;\nusing System;\nusing ClientCore;\nusing Rampastring.XNAUI;\n"
},
{
"path": "DXMainClient/DXGUI/Generic/GameLoadingWindow.cs",
"chars": 9794,
"preview": "using ClientCore;\nusing ClientGUI;\nusing DTAClient.Domain;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nu"
},
{
"path": "DXMainClient/DXGUI/Generic/GameSessionCheckBox.cs",
"chars": 7368,
"preview": "using System;\n\nusing ClientGUI;\n\nusing DTAClient.Domain.Multiplayer;\nusing DTAClient.DXGUI.Multiplayer.GameLobby;\n\nusin"
},
{
"path": "DXMainClient/DXGUI/Generic/GameSessionDropDown.cs",
"chars": 7815,
"preview": "using System;\n\nusing ClientCore.Extensions;\nusing ClientCore.I18N;\n\nusing ClientGUI;\n\nusing DTAClient.Domain.Multiplaye"
},
{
"path": "DXMainClient/DXGUI/Generic/LoadingScreen.cs",
"chars": 5453,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing ClientCore;\nusin"
},
{
"path": "DXMainClient/DXGUI/Generic/MainMenu.cs",
"chars": 49390,
"preview": "using ClientCore;\nusing ClientCore.Enums;\nusing ClientCore.I18N;\nusing ClientGUI;\nusing DTAClient.Domain;\nusing DTAClien"
},
{
"path": "DXMainClient/DXGUI/Generic/ManualUpdateQueryWindow.cs",
"chars": 2666,
"preview": "using System;\nusing ClientCore;\nusing ClientCore.Extensions;\nusing ClientGUI;\nusing Microsoft.Xna.Framework;\nusing Ramp"
},
{
"path": "DXMainClient/DXGUI/Generic/OptionPanels/AudioOptionsPanel.cs",
"chars": 12219,
"preview": "using ClientCore.Extensions;\nusing ClientCore;\nusing ClientGUI;\nusing Microsoft.Xna.Framework;\nusing Rampastring.XNAUI;"
},
{
"path": "DXMainClient/DXGUI/Generic/OptionPanels/CnCNetOptionsPanel.cs",
"chars": 18301,
"preview": "using ClientCore.Extensions;\nusing ClientCore;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientGUI;\nusing Micros"
},
{
"path": "DXMainClient/DXGUI/Generic/OptionPanels/ComponentsPanel.cs",
"chars": 11032,
"preview": "using ClientCore.Extensions;\nusing ClientCore;\nusing ClientGUI;\nusing Microsoft.Xna.Framework;\nusing Rampastring.Tools;\n"
},
{
"path": "DXMainClient/DXGUI/Generic/OptionPanels/DisplayOptionsPanel.cs",
"chars": 34624,
"preview": "using ClientCore.Extensions;\nusing ClientCore;\nusing ClientGUI;\nusing DTAClient.Domain;\nusing Microsoft.Xna.Framework;\nu"
},
{
"path": "DXMainClient/DXGUI/Generic/OptionPanels/GameOptionsPanel.cs",
"chars": 10222,
"preview": "using ClientCore;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientGUI;\nusing ClientCore.Extensions;\nusing Client"
},
{
"path": "DXMainClient/DXGUI/Generic/OptionPanels/UpdaterOptionsPanel.cs",
"chars": 7220,
"preview": "using ClientCore.Extensions;\nusing ClientCore;\nusing ClientGUI;\nusing Microsoft.Xna.Framework;\nusing Rampastring.XNAUI;"
},
{
"path": "DXMainClient/DXGUI/Generic/OptionsWindow.cs",
"chars": 11558,
"preview": "using ClientCore.Extensions;\nusing ClientCore;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientCore.Enums;\nusing"
},
{
"path": "DXMainClient/DXGUI/Generic/PrivacyNotification.cs",
"chars": 4525,
"preview": "using ClientCore;\nusing ClientGUI;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nusing Rampastring.XNAUI;"
},
{
"path": "DXMainClient/DXGUI/Generic/StatisticsWindow.cs",
"chars": 44224,
"preview": "using ClientCore;\nusing ClientCore.Statistics;\nusing ClientGUI;\nusing DTAClient.Domain.Multiplayer;\nusing ClientCore.Ex"
},
{
"path": "DXMainClient/DXGUI/Generic/TopBar.cs",
"chars": 18738,
"preview": "using Rampastring.XNAUI.XNAControls;\nusing System;\nusing System.Collections.Generic;\nusing Rampastring.XNAUI;\nusing Mic"
},
{
"path": "DXMainClient/DXGUI/Generic/URLHandler.cs",
"chars": 2173,
"preview": "#nullable enable\nusing System;\nusing System.Linq;\n\nusing ClientCore;\nusing ClientCore.Extensions;\n\nusing ClientGUI;\n\nus"
},
{
"path": "DXMainClient/DXGUI/Generic/UpdateQueryWindow.cs",
"chars": 3898,
"preview": "using ClientCore;\nusing ClientGUI;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nusing Rampastring.XNAUI;"
},
{
"path": "DXMainClient/DXGUI/Generic/UpdateWindow.cs",
"chars": 16359,
"preview": "using ClientGUI;\nusing DTAClient.Domain;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nusing Rampastring."
},
{
"path": "DXMainClient/DXGUI/IGameSessionSetting.cs",
"chars": 1441,
"preview": "using DTAClient.Domain.Multiplayer;\n\nusing Rampastring.Tools;\n\nnamespace DTAClient.DXGUI;\n\n// TODO split the logic betwe"
},
{
"path": "DXMainClient/DXGUI/IMessageView.cs",
"chars": 147,
"preview": "using DTAClient.Online;\n\nnamespace DTAClient.DXGUI\n{\n public interface IMessageView\n {\n void AddMessage(Ch"
},
{
"path": "DXMainClient/DXGUI/ISwitchable.cs",
"chars": 247,
"preview": "namespace DTAClient.DXGUI\n{\n /// <summary>\n /// An interface for all switchable windows.\n /// </summary>\n p"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/ChatListBox.cs",
"chars": 2384,
"preview": "using System;\n\nusing ClientCore;\nusing ClientCore.Extensions;\n\nusing DTAClient.DXGUI.Generic;\nusing DTAClient.Online;\n\n"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/ChoiceNotificationBox.cs",
"chars": 7529,
"preview": "using ClientGUI;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nusing Microsoft.Xna.Framework.Graphics;\nus"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetGameLoadingLobby.cs",
"chars": 27162,
"preview": "using ClientCore;\nusing ClientGUI;\nusing DTAClient.Domain;\nusing DTAClient.Domain.Multiplayer;\nusing DTAClient.Domain.Mu"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLobby.cs",
"chars": 81232,
"preview": "using ClientCore;\nusing ClientGUI;\nusing DTAClient.Domain.Multiplayer;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/CnCNetLoginWindow.cs",
"chars": 7063,
"preview": "using ClientCore;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientGUI;\nusing ClientCore.Extensions;\nusing Micros"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/GameCreationEventArgs.cs",
"chars": 766,
"preview": "using DTAClient.Domain.Multiplayer.CnCNet;\nusing System;\n\nnamespace DTAClient.DXGUI.Multiplayer.CnCNet\n{\n class Game"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/GameCreationWindow.cs",
"chars": 14432,
"preview": "using ClientCore;\nusing ClientGUI;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientCore.Extensions;\nusing Microso"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/GlobalContextMenu.cs",
"chars": 10200,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing ClientCore;\nusing ClientCore.Extensions;\n\nusi"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/GlobalContextMenuData.cs",
"chars": 1233,
"preview": "using DTAClient.Online;\n\nnamespace DTAClient.DXGUI.Multiplayer.CnCNet\n{\n public class GlobalContextMenuData\n {\n "
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/LoadOrSaveGameOptionPresetWindow.cs",
"chars": 10370,
"preview": "using System;\nusing System.Linq;\nusing ClientGUI;\nusing DTAClient.Domain.Multiplayer;\nusing DTAClient.Online.EventArgum"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/MapSharingConfirmationPanel.cs",
"chars": 3062,
"preview": "using ClientGUI;\nusing ClientCore.Extensions;\nusing Rampastring.XNAUI;\nusing Rampastring.XNAUI.XNAControls;\nusing Syste"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/PasswordRequestWindow.cs",
"chars": 4546,
"preview": "using ClientGUI;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/PrivateMessageNotificationBox.cs",
"chars": 6104,
"preview": "using ClientCore;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nusing Microsoft.Xna.Framework.Graphics;\nu"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/PrivateMessagingPanel.cs",
"chars": 677,
"preview": "using ClientGUI;\nusing Rampastring.XNAUI;\n\nnamespace DTAClient.DXGUI.Multiplayer.CnCNet\n{\n /// <summary>\n /// A p"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/PrivateMessagingWindow.cs",
"chars": 32809,
"preview": "using ClientCore;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientGUI;\nusing DTAClient.Online;\nusing DTAClient.O"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/RecentPlayerTable.cs",
"chars": 3211,
"preview": "using System;\nusing System.Collections.Generic;\nusing DTAClient.Online;\nusing Rampastring.XNAUI;\nusing Rampastring.XNAU"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/RecentPlayerTableRightClickEventArgs.cs",
"chars": 333,
"preview": "using System;\nusing DTAClient.Online;\n\nnamespace DTAClient.DXGUI.Multiplayer.CnCNet\n{\n public class RecentPlayerTabl"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/TunnelListBox.cs",
"chars": 14279,
"preview": "using DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientCore.Extensions;\nusing Microsoft.Xna.Framework;\nusing Microsoft."
},
{
"path": "DXMainClient/DXGUI/Multiplayer/CnCNet/TunnelSelectionWindow.cs",
"chars": 5376,
"preview": "using ClientGUI;\nusing DTAClient.Domain.Multiplayer.CnCNet;\nusing ClientCore.Extensions;\nusing Rampastring.XNAUI;\nusing"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameFiltersPanel.cs",
"chars": 22699,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing ClientCore;\nusing ClientGUI;\nusing ClientCore."
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameInformationIconOnlyPanel.cs",
"chars": 836,
"preview": "using Microsoft.Xna.Framework;\nusing Microsoft.Xna.Framework.Graphics;\n\nusing Rampastring.XNAUI;\nusing Rampastring.XNAUI"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameInformationIconPanel.cs",
"chars": 1726,
"preview": "using System;\n\nusing Microsoft.Xna.Framework;\nusing Microsoft.Xna.Framework.Graphics;\n\nusing Rampastring.XNAUI;\nusing R"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameInformationPanel.cs",
"chars": 23736,
"preview": "using System;\nusing System.Diagnostics;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing ClientCore;\nusing C"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameListBox.cs",
"chars": 18340,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nusing ClientCore;\nusing ClientCore.Enums;\nusing Cli"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLoadingLobbyBase.cs",
"chars": 20746,
"preview": "using ClientCore;\nusing ClientCore.Statistics;\nusing ClientGUI;\nusing DTAClient.Domain;\nusing DTAClient.Domain.Multipla"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/ChatBoxCommand.cs",
"chars": 747,
"preview": "using System;\n\nnamespace DTAClient.DXGUI.Multiplayer.GameLobby\n{\n /// <summary>\n /// A command that can be execut"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/CnCNetGameLobby.cs",
"chars": 90823,
"preview": "using ClientCore;\nusing ClientGUI;\nusing DTAClient.Domain.Multiplayer;\nusing DTAClient.Domain;\nusing DTAClient.DXGUI.Gen"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/CommandHandlerBase.cs",
"chars": 365,
"preview": "namespace DTAClient.DXGUI.Multiplayer.GameLobby.CommandHandlers\n{\n public abstract class CommandHandlerBase\n {\n "
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/IntCommandHandler.cs",
"chars": 897,
"preview": "using System;\n\nnamespace DTAClient.DXGUI.Multiplayer.GameLobby.CommandHandlers\n{\n public class IntCommandHandler : C"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/IntNotificationHandler.cs",
"chars": 936,
"preview": "using System;\n\nnamespace DTAClient.DXGUI.Multiplayer.GameLobby.CommandHandlers\n{\n public class IntNotificationHandle"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/NoParamCommandHandler.cs",
"chars": 757,
"preview": "using System;\n\nnamespace DTAClient.DXGUI.Multiplayer.GameLobby.CommandHandlers\n{\n /// <summary>\n /// A command ha"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/NotificationHandler.cs",
"chars": 715,
"preview": "using System;\n\nnamespace DTAClient.DXGUI.Multiplayer.GameLobby.CommandHandlers\n{\n public class NotificationHandler :"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/CommandHandlers/StringCommandHandler.cs",
"chars": 922,
"preview": "using System;\n\nnamespace DTAClient.DXGUI.Multiplayer.GameLobby.CommandHandlers\n{\n class StringCommandHandler : Comma"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/CoopBriefingBox.cs",
"chars": 2802,
"preview": "using Rampastring.XNAUI.XNAControls;\nusing Rampastring.XNAUI;\nusing Microsoft.Xna.Framework;\nusing Rampastring.Tools;\n\n"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/GameHostInactiveChecker.cs",
"chars": 2246,
"preview": "using System;\nusing System.Timers;\nusing ClientCore;\nusing ClientCore.Extensions;\nusing ClientGUI;\nusing Rampastring.XN"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/GameLaunchButton.cs",
"chars": 2273,
"preview": "using ClientGUI;\nusing Microsoft.Xna.Framework;\nusing Microsoft.Xna.Framework.Graphics;\nusing Rampastring.XNAUI;\nusing "
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/GameLeftEventArgs.cs",
"chars": 145,
"preview": "#nullable enable\nnamespace DTAClient.DXGUI.Multiplayer.GameLobby;\n\npublic class GameLeftEventArgs\n{\n public string? "
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs",
"chars": 120022,
"preview": "using ClientCore;\nusing ClientCore.Statistics;\nusing ClientGUI;\nusing DTAClient.Domain;\nusing DTAClient.Domain.Multiplay"
},
{
"path": "DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyCheckBox.cs",
"chars": 4708,
"preview": "using System.Collections.Generic;\nusing System.Linq;\n\nusing ClientCore.Extensions;\n\nusing DTAClient.DXGUI.Generic;\n\nusin"
}
]
// ... and 282 more files (download for full content)
About this extraction
This page contains the full source code of the CnCNet/xna-cncnet-client GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 482 files (3.4 MB), approximately 909.8k tokens, and a symbol index with 2996 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.