2024-12-18 07:19:58 +00:00
|
|
|
|
using ReactiveUI;
|
2024-12-19 07:27:17 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
2024-12-18 07:19:58 +00:00
|
|
|
|
|
|
|
|
|
namespace Presence.Desktop.ViewModels;
|
|
|
|
|
|
|
|
|
|
public class PresenceViewModel : ViewModelBase, IRoutableViewModel
|
|
|
|
|
{
|
|
|
|
|
public string? UrlPathSegment { get; }
|
|
|
|
|
public IScreen HostScreen { get; }
|
2024-12-19 07:27:17 +00:00
|
|
|
|
|
|
|
|
|
public ObservableCollection<Person> People { get; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public PresenceViewModel()
|
|
|
|
|
{
|
|
|
|
|
var people = new List<Person>
|
|
|
|
|
{
|
|
|
|
|
new Person("Neil", "Armstrong"),
|
|
|
|
|
new Person("Buzz", "Lightyear"),
|
|
|
|
|
new Person("James", "Kirk")
|
|
|
|
|
};
|
|
|
|
|
People = new ObservableCollection<Person>(people);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Person
|
|
|
|
|
{
|
|
|
|
|
public string FirstName { get; set; }
|
|
|
|
|
public string LastName { get; set; }
|
|
|
|
|
|
|
|
|
|
public Person(string firstName, string lastName)
|
|
|
|
|
{
|
|
|
|
|
FirstName = firstName;
|
|
|
|
|
LastName = lastName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|