47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
using System;
|
|
using Aurora.Services.Settings;
|
|
|
|
namespace Aurora.Design.Views.Profile
|
|
{
|
|
public class ProfileViewModel : BaseViewModel
|
|
{
|
|
private ISettingsService _settingsService;
|
|
|
|
public ProfileViewModel(ISettingsService settingsService)
|
|
{
|
|
this._settingsService = settingsService;
|
|
}
|
|
|
|
public string Username
|
|
{
|
|
get { return this._settingsService.Username; }
|
|
set
|
|
{
|
|
this._settingsService.Username = value;
|
|
OnPropertyChanged("Username");
|
|
}
|
|
}
|
|
|
|
public string Port
|
|
{
|
|
get { return this._settingsService.DefaultPort.ToString(); }
|
|
set
|
|
{
|
|
Int32.TryParse(value, out int portNum);
|
|
this._settingsService.DefaultPort = portNum;
|
|
OnPropertyChanged("Port");
|
|
}
|
|
}
|
|
|
|
public string LibraryPath
|
|
{
|
|
get { return this._settingsService.LibraryLocation; }
|
|
set
|
|
{
|
|
this._settingsService.LibraryLocation = value;
|
|
OnPropertyChanged("LibraryPath");
|
|
}
|
|
}
|
|
}
|
|
}
|