mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
34 lines
881 B
C#
34 lines
881 B
C#
using Avalonia.Controls;
|
|
using System.Windows.Input;
|
|
using Remotely.Desktop.Shared.Abstractions;
|
|
using Microsoft.Extensions.Logging;
|
|
using Remotely.Desktop.Shared.Reactive;
|
|
|
|
namespace Remotely.Desktop.UI.ViewModels;
|
|
|
|
public interface IHostNamePromptViewModel : IBrandedViewModelBase
|
|
{
|
|
string Host { get; set; }
|
|
ICommand OKCommand { get; }
|
|
}
|
|
|
|
public class HostNamePromptViewModel : BrandedViewModelBase, IHostNamePromptViewModel
|
|
{
|
|
public HostNamePromptViewModel(
|
|
IBrandingProvider brandingProvider,
|
|
IUiDispatcher dispatcher,
|
|
ILogger<HostNamePromptViewModel> logger)
|
|
: base(brandingProvider, dispatcher, logger)
|
|
{
|
|
OKCommand = new RelayCommand<Window>(x => x?.Close());
|
|
}
|
|
|
|
public string Host
|
|
{
|
|
get => Get<string>() ?? "https://";
|
|
set => Set(value);
|
|
}
|
|
|
|
public ICommand OKCommand { get; }
|
|
}
|