2021-05-20 13:32:17 +03:00
|
|
|
|
using MvvmCross.ViewModels;
|
|
|
|
|
using ProxySuper.Core.Models;
|
|
|
|
|
using ProxySuper.Core.Models.Hosts;
|
|
|
|
|
using ProxySuper.Core.Models.Projects;
|
|
|
|
|
using ProxySuper.Core.Services;
|
|
|
|
|
|
|
|
|
|
namespace ProxySuper.Core.ViewModels
|
|
|
|
|
{
|
|
|
|
|
public class XrayInstallerViewModel : MvxViewModel<Record>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public Host Host { get; set; }
|
|
|
|
|
|
|
|
|
|
public XraySettings Settings { get; set; }
|
|
|
|
|
|
|
|
|
|
public override void Prepare(Record parameter)
|
|
|
|
|
{
|
|
|
|
|
var record = Utils.DeepClone(parameter);
|
|
|
|
|
Host = record.Host;
|
|
|
|
|
Settings = record.XraySettings;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private bool _connected;
|
|
|
|
|
public bool Connected
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return _connected;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_connected = value;
|
2021-05-21 13:03:40 +03:00
|
|
|
|
RaisePropertyChanged("Connected");
|
2021-05-20 13:32:17 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string CommandText { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|