上海虹口龙之梦项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

167 lines
5.1 KiB

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