1.8 KiB
1.8 KiB
- Single WPF WinExe project (
net48,UseWPF=true) whose entry point isApp.xaml.cs; it bootstraps Exceptionless telemetry before showing the main window. - MVVM layout:
BaseViewModelprovidesINotifyPropertyChangedplus two in-processICommandimplementations (RelayCommand,RelayAsyncCommand). Each screen has a XAML view + code-behind window paired with a ViewModel (MainViewModel,OptionsViewModel,ShardsViewModel). MainViewModelowns the application lifecycle: reads/writesLauncher.jsonvia Newtonsoft.Json, managesClientPaths/DataPaths/Pluginscollections, resolves shard hostnames throughUtility.ResolveAddress, and finallyProcess.StartsClassicUO.exewith-plugins,-ip,-port,-uopath,-encryption,-shardarguments. On exit it persists state back to JSON.- Shard configuration is split between built-in presets in the singleton
ShardManager(double-checked-lock single instance) and user-defined entries persisted inLauncher.json;ShardsWindow/ShardsViewModeledit them. - ClassicUO launch flags are driven by reflection over
ClassicOptions: each property is annotated withClassicOptionAttribute(argument name, default value, conditional include rules), which bothReadClassicOptions(load from JSON) andBuildClassicOptions(emit CLI args) consume. - UI helpers live in
Behaviours/(WPF Interactivity behaviours),Controls/EditTextBlock(custom control), andValueConverters/(boolean/cell-width converters). Resources are localized via.resxfiles underProperties/. - Dependency direction: Views → ViewModels →
ShardManager/Utility/ClassicOptions; no cross-viewmodel references except when one window passes its ViewModel into another (e.g.ShowOptionsWindowconstructsOptionsViewModelwith sharedPlugins/ClassicOptions).