2019-07-05 18:17:09 +00:00
|
|
|
|
using System;
|
2020-02-01 01:41:45 +00:00
|
|
|
|
using Aurora.Services.Settings;
|
2019-07-05 18:17:09 +00:00
|
|
|
|
|
|
|
|
|
namespace Aurora.Design.Views.Profile
|
|
|
|
|
{
|
|
|
|
|
public class ProfileViewModel : BaseViewModel
|
|
|
|
|
{
|
2020-02-01 01:41:45 +00:00
|
|
|
|
private ISettingsService _settingsService;
|
2019-07-05 18:17:09 +00:00
|
|
|
|
|
2020-02-01 01:41:45 +00:00
|
|
|
|
public ProfileViewModel(ISettingsService settingsService)
|
2019-07-05 18:17:09 +00:00
|
|
|
|
{
|
2020-02-01 01:41:45 +00:00
|
|
|
|
this._settingsService = settingsService;
|
2019-07-05 18:17:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Username
|
|
|
|
|
{
|
2020-02-01 01:41:45 +00:00
|
|
|
|
get { return this._settingsService.Username; }
|
2019-07-05 18:17:09 +00:00
|
|
|
|
set
|
|
|
|
|
{
|
2020-02-01 01:41:45 +00:00
|
|
|
|
this._settingsService.Username = value;
|
2019-07-05 18:17:09 +00:00
|
|
|
|
OnPropertyChanged("Username");
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-07-06 19:52:28 +00:00
|
|
|
|
|
|
|
|
|
public string Port
|
|
|
|
|
{
|
2020-02-01 01:41:45 +00:00
|
|
|
|
get { return this._settingsService.DefaultPort.ToString(); }
|
2019-07-06 19:52:28 +00:00
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
Int32.TryParse(value, out int portNum);
|
2020-02-01 01:41:45 +00:00
|
|
|
|
this._settingsService.DefaultPort = portNum;
|
2019-07-06 19:52:28 +00:00
|
|
|
|
OnPropertyChanged("Port");
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-02-02 15:26:47 +00:00
|
|
|
|
|
|
|
|
|
public string LibraryPath
|
|
|
|
|
{
|
|
|
|
|
get { return this._settingsService.LibraryLocation; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
this._settingsService.LibraryLocation = value;
|
|
|
|
|
OnPropertyChanged("LibraryPath");
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-07-05 18:17:09 +00:00
|
|
|
|
}
|
|
|
|
|
}
|