Changing folder names

This commit is contained in:
Brandon Watson
2021-04-10 10:20:50 -04:00
parent f1a3771912
commit dd4632cdb6
62 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Aurora.Design.Views.Profile.ProfileView">
<ContentView.Content>
<StackLayout
Orientation="Vertical">
<StackLayout
Orientation="Horizontal">
<Label
VerticalOptions="Center"
Text="Username"/>
<Entry
Text="{Binding Username}"/>
</StackLayout>
<StackLayout
Orientation="Horizontal">
<Label
VerticalOptions="Center"
Text="Default Port"/>
<Entry
Text="{Binding Port}"/>
</StackLayout>
<StackLayout
Orientation="Horizontal">
<Label
VerticalOptions="Center"
Text="Path to Library"/>
<Entry
Text="{Binding LibraryPath}"/>
</StackLayout>
</StackLayout>
</ContentView.Content>
</ContentView>

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using Xamarin.Forms;
namespace Aurora.Design.Views.Profile
{
public partial class ProfileView : ContentView
{
public ProfileView()
{
InitializeComponent();
}
}
}

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");
}
}
}
}