using _20230724_MBJC_upperpc.Common; using _20230724_MBJC_upperpc.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _20230724_MBJC_upperpc.ViewModels { public class BeaconViewModel : NotifyBase { private BeaconModel beacon; public BeaconModel Beacon { get { return beacon; } set { beacon = value; this.DoNotify(); } } private int model_Visibility = 1; public int Model_Visibility { get { return model_Visibility; } set { model_Visibility = value; this.DoNotify(); } } /// /// 生成告警信息 /// public void DoFresh() { float Beacon_JD; float Beacon_WD; float Beacon_JL; float Beacon_HG; float Beacon_HG_DIS; float Beacon_FY; float Beacon_FY_DIS; float Beacon_PH; float Beacon_PH_DIS; if (Beacon.ID == int.Parse(tools.GetAppSetting("Beacon1"))) { Beacon_JD = Convert.ToSingle(tools.GetAppSetting("Beacon1_JD")); Beacon_WD = Convert.ToSingle(tools.GetAppSetting("Beacon1_WD")); Beacon_JL = Convert.ToSingle(tools.GetAppSetting("Beacon1_JL")); Beacon_HG = Convert.ToSingle(tools.GetAppSetting("Beacon1_HG")); Beacon_HG_DIS = Convert.ToSingle(tools.GetAppSetting("Beacon1_HG_DIS")); Beacon_FY = Convert.ToSingle(tools.GetAppSetting("Beacon1_FY")); } else if (true) { } //从配置文件中取得对应的阈值文件 } } }