using System.Collections.Generic; using UniRx; public class LinkageForces { public List Forces; } public class LinkageForce { public string Id; /// /// 部门 /// public string Department { get; set; } /// /// 单位名称 /// public string Organization { get; set; } /// /// 地址 /// public string Address { get; set; } /// /// 电话 /// public string Phone { get; set; } /// /// 力量调派 /// public string ForceAllocation { get; set; } /// /// 任务职责 /// public string Duty { get; set; } } public class LinkageForceReactive { private LinkageForce Data = new LinkageForce(); public ReactiveProperty Id { get; set; } = new ReactiveProperty(); /// /// 部门 /// public ReactiveProperty Department { get; set; } = new ReactiveProperty(); /// /// 单位名称 /// public ReactiveProperty Organization { get; set; } = new ReactiveProperty(); /// /// 地址 /// public ReactiveProperty Address { get; set; } = new ReactiveProperty(); /// /// 电话 /// public ReactiveProperty Phone { get; set; } = new ReactiveProperty(); /// /// 力量调派 /// public ReactiveProperty ForceAllocation { get; set; } = new ReactiveProperty(); /// /// 任务职责 /// public ReactiveProperty Duty { get; set; } = new ReactiveProperty(); public LinkageForceReactive() { Id.Subscribe(value => Data.Id = value); Department.Subscribe(value => Data.Department = value); Organization.Subscribe(value => Data.Organization = value); Address.Subscribe(value => Data.Address = value); Phone.Subscribe(value => Data.Phone = value); ForceAllocation.Subscribe(value => Data.ForceAllocation = value); Duty.Subscribe(value => Data.Duty = value); } public void SetData(LinkageForce data) { Data = data; Id.Value = data.Id; Department.Value = data.Department; Organization.Value = data.Organization; Address.Value = data.Address; Phone.Value = data.Phone; ForceAllocation.Value = data.ForceAllocation; Duty.Value = data.Duty; } public LinkageForce GetData() { return Data; } }