mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
- 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
27 lines
572 B
C#
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);
|
|
}
|
|
}
|