Migrate aurora-sharp-desktop

This commit is contained in:
Brandon Watson
2021-03-05 23:10:12 -05:00
parent d6496355a9
commit b8c0dadf91
186 changed files with 8521 additions and 0 deletions

View File

@ -0,0 +1,46 @@
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");
}
}
}
}