20240301_JSEQ_upperpc/JiangsuEarthquakeJM/JiangsuEarthquake/Models/SwitchStateModel.cs
春风过客 d7f51483a7 新增功能:
1 将地震仪数据读取功能单独成一个页面;
2024-05-13 18:51:05 +08:00

203 lines
4.8 KiB
C#

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;
/// <summary>
/// 数据上报时间
/// </summary>
public DateTime Data_Time
{
get { return data_Time; }
set { data_Time = value; }
}
private bool conbox_ADCP;
/// <summary>
/// 接驳盒海流计开关
/// </summary>
public bool Conbox_ADCP
{
get { return conbox_ADCP; }
set { conbox_ADCP = value; this.DoNotify(); }
}
private bool jBH_SEI2;
/// <summary>
/// 接驳盒地震仪2开关
/// </summary>
public bool JBH_SEI2
{
get { return jBH_SEI2; }
set { jBH_SEI2 = value; this.DoNotify(); }
}
private bool jBH_SEI1;
/// <summary>
/// 接驳盒地震仪1开关
/// </summary>
public bool JBH_SEI1
{
get { return jBH_SEI1; }
set { jBH_SEI1 = value; this.DoNotify(); }
}
private bool jBH_Switch;
/// <summary>
/// 接驳盒交换机开关
/// </summary>
public bool JBH_Switch
{
get { return jBH_Switch; }
set { jBH_Switch = value; this.DoNotify(); }
}
private bool jBH_DSL;
/// <summary>
/// 接驳盒电力载波开关
/// </summary>
public bool JBH_DSL
{
get { return jBH_DSL; }
set { jBH_DSL = value; this.DoNotify(); }
}
private bool fB_Switch;
/// <summary>
/// 浮标光电交换机开关
/// </summary>
public bool FB_Switch
{
get { return fB_Switch; }
set { fB_Switch = value; this.DoNotify(); }
}
private bool fB_DSL;
/// <summary>
/// 浮标电力载波开关
/// </summary>
public bool FB_DSL
{
get { return fB_DSL; }
set { fB_DSL = value; this.DoNotify(); }
}
private bool fB_Antenna;
/// <summary>
/// 浮标卫通开关
/// </summary>
public bool FB_Antenna
{
get { return fB_Antenna; }
set { fB_Antenna = value; this.DoNotify(); }
}
private bool fB_BD;
/// <summary>
/// 浮标北斗开关
/// </summary>
public bool FB_BD
{
get { return fB_BD; }
set { fB_BD = value; this.DoNotify(); }
}
private bool conboxPower1;
/// <summary>
/// 接驳盒电源主要
/// </summary>
public bool ConboxPower1
{
get { return conboxPower1; }
set { conboxPower1 = value; this.DoNotify(); }
}
private bool conboxPower2;
/// <summary>
/// 接驳盒电源备用
/// </summary>
public bool ConboxPower2
{
get { return conboxPower2; }
set { conboxPower2 = value; this.DoNotify(); }
}
}
}