2021-03-04 11:25:36 +03:00
|
|
|
|
using ProxySU_Core.Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace ProxySU_Core.ViewModels
|
|
|
|
|
{
|
|
|
|
|
public class RecordViewModel : BaseViewModel
|
|
|
|
|
{
|
|
|
|
|
public Record record;
|
2021-03-17 06:58:56 +03:00
|
|
|
|
private bool _isChecked;
|
2021-03-04 11:25:36 +03:00
|
|
|
|
|
|
|
|
|
public RecordViewModel(Record record)
|
|
|
|
|
{
|
|
|
|
|
this.record = record;
|
2021-03-17 06:58:56 +03:00
|
|
|
|
this._isChecked = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsChecked
|
|
|
|
|
{
|
|
|
|
|
get => _isChecked;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_isChecked = value;
|
|
|
|
|
Notify("IsChecked");
|
|
|
|
|
}
|
2021-03-04 11:25:36 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Host Host
|
|
|
|
|
{
|
|
|
|
|
get => record.Host;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
record.Host = value;
|
|
|
|
|
Notify("Host");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public XraySettings Settings
|
|
|
|
|
{
|
|
|
|
|
get => record.Settings;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
record.Settings = value;
|
|
|
|
|
Notify("Settings");
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-03-04 13:25:52 +03:00
|
|
|
|
|
|
|
|
|
public void Notify()
|
|
|
|
|
{
|
|
|
|
|
Notify("Host");
|
|
|
|
|
Notify("Settings");
|
|
|
|
|
}
|
2021-03-04 11:25:36 +03:00
|
|
|
|
}
|
|
|
|
|
}
|