Files
OwnCord/Client/OwnCord.Client/ViewModels/SettingsViewModel.cs
T
jevb 9707c4d4af feat: scaffold Phase 3 WPF client shell with MVVM and TDD structure
- WPF (.NET 8) project targeting net8.0-windows
- Models: ServerProfile (record), Channel, Message, User, Role
- ViewModels: ViewModelBase (INotifyPropertyChanged), RelayCommand<T>,
  ConnectViewModel (profiles, login/register toggle, connect command),
  MainViewModel (channels, messages, typing indicator, send command),
  SettingsViewModel (dark theme, notifications, PTT key)
- Services: IProfileService + ProfileService (AppData JSON, immutable ops),
  ICredentialService + CredentialService (DPAPI via ProtectedData),
  IWebSocketService + WebSocketService (ClientWebSocket stub)
- Views: ConnectPage (server address, login/register, profile selector),
  MainPage (3-column: channel list, message area, member list),
  App.xaml wires converters and startup
- Converters: BoolToVisibilityConverter, IntToVisibilityConverter
- Tests: ConnectViewModelTests (11 cases), MainViewModelTests (11 cases),
  ProfileServiceTests (6 cases) — ready to run once NuGet accessible
  (run: dotnet restore && dotnet test OwnCord.Client.Tests/)

Build: dotnet build OwnCord.Client/ succeeds with 0 warnings
2026-03-14 21:07:07 +01:00

27 lines
572 B
C#

namespace OwnCord.Client.ViewModels;
public sealed class SettingsViewModel : ViewModelBase
{
private bool _isDarkTheme;
private bool _mentionsOnly;
private string _pushToTalkKey = "F4";
public bool IsDarkTheme
{
get => _isDarkTheme;
set => SetField(ref _isDarkTheme, value);
}
public bool MentionsOnly
{
get => _mentionsOnly;
set => SetField(ref _mentionsOnly, value);
}
public string PushToTalkKey
{
get => _pushToTalkKey;
set => SetField(ref _pushToTalkKey, value);
}
}