using System;
|
using System.Collections.Generic;
|
|
namespace HDL_ON.Entity
|
{
|
public class Fan : Function
|
{
|
public Fan()
|
{
|
}
|
|
|
[Newtonsoft.Json.JsonIgnore]
|
public Trait trait_openLevel;
|
/// <summary>
|
/// 档位
|
/// </summary>
|
[Newtonsoft.Json.JsonIgnore]
|
public int openLevel
|
{
|
get
|
{
|
try
|
{
|
if (trait_openLevel == null)
|
{
|
trait_openLevel = function.Find((obj) => obj.name == "openLevel");
|
if (trait_openLevel == null)
|
{
|
trait_openLevel = new Trait()
|
{
|
name = "openLevel",
|
value_key = new List<string> { "up", "down" },
|
max = 7,
|
min = 0,
|
};
|
}
|
trait_openLevel.value = trait_openLevel.min;
|
}
|
return Convert.ToInt32(trait_openLevel.value);
|
}
|
catch
|
{
|
MainPage.Log("openLevel 数据获取失败.");
|
return 0;
|
}
|
}
|
set
|
{
|
try
|
{
|
trait_openLevel.value = value;
|
}
|
catch
|
{
|
MainPage.Log("openLevel 数据刷新失败.");
|
}
|
}
|
}
|
|
}
|
}
|