using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace JiangsuEarthquake.Models { public class SwitchStateModel : ParameterModel { public object this[int index] { get { return null; } set { bool Set_Value = Convert.ToBoolean(value); switch (index) { case 21: this.conboxPower2 = Set_Value; break; case 22: this.conboxPower1 = Set_Value; break; case 23: this.Conbox_ADCP = Set_Value; break; case 24: this.JBH_SEI2 = Set_Value; break; case 25: this.JBH_SEI1 = Set_Value; break; case 26: this.JBH_Switch = Set_Value; break; case 27: this.JBH_DSL = Set_Value; break; case 28: this.FB_Switch = Set_Value; break; case 29: this.FB_DSL = Set_Value; break; case 30: this.FB_Antenna = Set_Value; break; case 31: this.FB_BD = Set_Value; break; default: break; } } } private DateTime data_Time; /// /// 数据上报时间 /// public DateTime Data_Time { get { return data_Time; } set { data_Time = value; } } private bool conbox_ADCP; /// /// 接驳盒海流计开关 /// public bool Conbox_ADCP { get { return conbox_ADCP; } set { conbox_ADCP = value; this.DoNotify(); } } private bool jBH_SEI2; /// /// 接驳盒地震仪2开关 /// public bool JBH_SEI2 { get { return jBH_SEI2; } set { jBH_SEI2 = value; this.DoNotify(); } } private bool jBH_SEI1; /// /// 接驳盒地震仪1开关 /// public bool JBH_SEI1 { get { return jBH_SEI1; } set { jBH_SEI1 = value; this.DoNotify(); } } private bool jBH_Switch; /// /// 接驳盒交换机开关 /// public bool JBH_Switch { get { return jBH_Switch; } set { jBH_Switch = value; this.DoNotify(); } } private bool jBH_DSL; /// /// 接驳盒电力载波开关 /// public bool JBH_DSL { get { return jBH_DSL; } set { jBH_DSL = value; this.DoNotify(); } } private bool fB_Switch; /// /// 浮标光电交换机开关 /// public bool FB_Switch { get { return fB_Switch; } set { fB_Switch = value; this.DoNotify(); } } private bool fB_DSL; /// /// 浮标电力载波开关 /// public bool FB_DSL { get { return fB_DSL; } set { fB_DSL = value; this.DoNotify(); } } private bool fB_Antenna; /// /// 浮标卫通开关 /// public bool FB_Antenna { get { return fB_Antenna; } set { fB_Antenna = value; this.DoNotify(); } } private bool fB_BD; /// /// 浮标北斗开关 /// public bool FB_BD { get { return fB_BD; } set { fB_BD = value; this.DoNotify(); } } private bool conboxPower1; /// /// 接驳盒电源主要 /// public bool ConboxPower1 { get { return conboxPower1; } set { conboxPower1 = value; this.DoNotify(); } } private bool conboxPower2; /// /// 接驳盒电源备用 /// public bool ConboxPower2 { get { return conboxPower2; } set { conboxPower2 = value; this.DoNotify(); } } } }