first commit

This commit is contained in:
Beyhan Oğur
2026-09-03 04:45:36 +03:00
commit d5f52cc3d3
1038 changed files with 169579 additions and 0 deletions
@@ -0,0 +1,8 @@
schema_version: 1
module_path: launcher
title: ClassicAssist Launcher (WPF)
scope:
- ClassicAssist.Launcher/
source_files: []
depends_on: []
related_to: []
@@ -0,0 +1,7 @@
- Single WPF WinExe project (`net48`, `UseWPF=true`) whose entry point is `App.xaml.cs`; it bootstraps Exceptionless telemetry before showing the main window.
- MVVM layout: `BaseViewModel` provides `INotifyPropertyChanged` plus two in-process `ICommand` implementations (`RelayCommand`, `RelayAsyncCommand`). Each screen has a XAML view + code-behind window paired with a ViewModel (`MainViewModel`, `OptionsViewModel`, `ShardsViewModel`).
- `MainViewModel` owns the application lifecycle: reads/writes `Launcher.json` via Newtonsoft.Json, manages `ClientPaths`/`DataPaths`/`Plugins` collections, resolves shard hostnames through `Utility.ResolveAddress`, and finally `Process.Start`s `ClassicUO.exe` with `-plugins`, `-ip`, `-port`, `-uopath`, `-encryption`, `-shard` arguments. 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 in `Launcher.json`; `ShardsWindow` / `ShardsViewModel` edit them.
- ClassicUO launch flags are driven by reflection over `ClassicOptions`: each property is annotated with `ClassicOptionAttribute` (argument name, default value, conditional include rules), which both `ReadClassicOptions` (load from JSON) and `BuildClassicOptions` (emit CLI args) consume.
- UI helpers live in `Behaviours/` (WPF Interactivity behaviours), `Controls/EditTextBlock` (custom control), and `ValueConverters/` (boolean/cell-width converters). Resources are localized via `.resx` files under `Properties/`.
- Dependency direction: Views → ViewModels → `ShardManager`/`Utility`/`ClassicOptions`; no cross-viewmodel references except when one window passes its ViewModel into another (e.g. `ShowOptionsWindow` constructs `OptionsViewModel` with shared `Plugins`/`ClassicOptions`).
@@ -0,0 +1,5 @@
- ViewModels inherit `BaseViewModel` and expose properties via `SetProperty(ref _field, value)` so that `CommandManager.InvalidateRequerySuggested` is automatically called on change.
- User actions are bound to `ICommand` properties implemented as lazy-initialized `RelayCommand`/`RelayCommandAsync` fields, with optional `canExecute` predicates passed at construction.
- ClassicUO command-line flags are declared declaratively on `ClassicOptions` properties using `[ClassicOption(...)]` attributes rather than hard-coded string literals, and consumed uniformly via reflection in `ReadClassicOptions`/`BuildClassicOptions`.
- Per-user configuration is serialized/deserialized manually against `Newtonsoft.Json.Linq.JObject`/`JArray` instead of using POCO serialization, with explicit field-by-field read/write paths in `MainViewModel.Closing` and the constructor.
- Singleton services (e.g. `ShardManager`) use double-checked locking with a static `_lock` object exposed through a `GetInstance()` factory method.
@@ -0,0 +1 @@
WPF launcher that configures and starts ClassicUO clients with per-shard settings, plugin loading, and an options dialog for ClassicUO command-line flags.
@@ -0,0 +1 @@
.NET Framework 4.8 WPF; Newtonsoft.Json for JSON persistence; Trinet.Core.IO.Ntfs for NTFS alternate data stream cleanup; System.Windows.Interactivity.WPF for XAML behaviours; Exceptionless for crash reporting.