using UniRx; using UnityEngine; public class Information { /// ///单位名称 /// public string Name{get;set;} /// ///单位地址 /// public string Address{get;set;} /// ///单位坐标 /// public string Coords{get;set;} /// ///楼层数 /// public string Floors{get;set;} /// ///占地面积 /// public string FloorArea{get;set;} /// ///建筑面积 /// public string BuildingArea{get;set;} /// ///建筑高度 /// public string Height{get;set;} /// ///建筑结构 /// public string Structure{get;set;} /// ///使用性质 /// public string Property{get;set;} /// ///耐火等级 /// public string Grade{get;set;} /// ///企业法人 /// public string JuridicalPerson{get;set;} /// ///法人电话 /// public string JuridicalPersonPhone{get;set;} /// ///消防负责人 /// public string FireHead{get;set;} /// ///负责人电话 /// public string FireHeadPhone{get;set;} } public class InformationReactive:ISetData { /// ///Data /// private Information Data{get;set;}= new Information(); /// ///单位名称 /// public ReactiveProperty Name{get;set;}= new ReactiveProperty(); /// ///单位地址 /// public ReactiveProperty Address{get;set;}= new ReactiveProperty(); /// ///单位坐标 /// public ReactiveProperty Coords{get;set;}= new ReactiveProperty(); /// ///楼层数 /// public ReactiveProperty Floors{get;set;}= new ReactiveProperty(); /// ///占地面积 /// public ReactiveProperty FloorArea{get;set;}= new ReactiveProperty(); /// ///建筑面积 /// public ReactiveProperty BuildingArea{get;set;}= new ReactiveProperty(); /// ///建筑高度 /// public ReactiveProperty Height{get;set;}= new ReactiveProperty(); /// ///建筑结构 /// public ReactiveProperty Structure{get;set;}= new ReactiveProperty(); /// ///使用性质 /// public ReactiveProperty Property{get;set;}= new ReactiveProperty(); /// ///耐火等级 /// public ReactiveProperty Grade{get;set;}= new ReactiveProperty(); /// ///企业法人 /// public ReactiveProperty JuridicalPerson{get;set;}= new ReactiveProperty(); /// ///法人电话 /// public ReactiveProperty JuridicalPersonPhone{get;set;}= new ReactiveProperty(); /// ///消防负责人 /// public ReactiveProperty FireHead{get;set;}= new ReactiveProperty(); /// ///负责人电话 /// public ReactiveProperty FireHeadPhone{get;set;}= new ReactiveProperty(); public InformationReactive() { Name.Subscribe(value => Data.Name= value); Address.Subscribe(value => Data.Address= value); Coords.Subscribe(value => Data.Coords= value); Floors.Subscribe(value => Data.Floors= value); FloorArea.Subscribe(value => Data.FloorArea= value); BuildingArea.Subscribe(value => Data.BuildingArea= value); Height.Subscribe(value => Data.Height= value); Structure.Subscribe(value => Data.Structure= value); Property.Subscribe(value => Data.Property= value); Grade.Subscribe(value => Data.Grade= value); JuridicalPerson.Subscribe(value => Data.JuridicalPerson= value); JuridicalPersonPhone.Subscribe(value => Data.JuridicalPersonPhone= value); FireHead.Subscribe(value => Data.FireHead= value); FireHeadPhone.Subscribe(value => Data.FireHeadPhone= value); } public void SetData(Information data) { Data = data; Name.Value = data.Name; Address.Value = data.Address; Coords.Value = data.Coords; Floors.Value = data.Floors; FloorArea.Value = data.FloorArea; BuildingArea.Value = data.BuildingArea; Height.Value = data.Height; Structure.Value = data.Structure; Property.Value = data.Property; Grade.Value = data.Grade; JuridicalPerson.Value = data.JuridicalPerson; JuridicalPersonPhone.Value = data.JuridicalPersonPhone; FireHead.Value = data.FireHead; FireHeadPhone.Value = data.FireHeadPhone; } public Information GetData() { return Data; } }