using System;
using Aurora.Services;

namespace Aurora.Design.Views.Profile
{
    public class ProfileViewModel : BaseViewModel
    {

        public ProfileViewModel()
        {
        }

        public string Username
        {
            get { return SettingsService.Instance.Username; }
            set
            {
                SettingsService.Instance.Username = value;
                OnPropertyChanged("Username");
            }
        }

        public string Port
        {
            get { return SettingsService.Instance.DefaultPort.ToString(); }
            set
            {
                Int32.TryParse(value, out int portNum);
                SettingsService.Instance.DefaultPort = portNum;
                OnPropertyChanged("Port");
            }
        }
    }
}
