Person添加成员(ip)
项目目录修改
This commit is contained in:
1 parent
15313a5f75
commit
c2d15699ab
30 files changed
+3003
No files matched your search
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Controls;
|
||||
|
||||
/// <summary>
|
||||
/// 运行状态变换器
|
||||
/// 输入:状态码
|
||||
/// 输出:状态文字
|
||||
/// </summary>
|
||||
namespace SunlightAggregationManager.ConvertMoels
|
||||
{
|
||||
internal class StatenConvert : IValueConverter
|
||||
{
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else
|
||||
{
|
||||
string Staten = "";
|
||||
var i = value.ToString();
|
||||
|
||||
if (i == "10") Staten = ResourceLanguage.ERR;//异常
|
||||
if (i == "15") Staten = ResourceLanguage.Offine;//离线
|
||||
if (i == "20") Staten = ResourceLanguage.Online;//在线
|
||||
if (i == "99") Staten = ResourceLanguage.Disable;//禁用
|
||||
|
||||
return Staten;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SunlightAggregationManager.ConvertMoels
|
||||
{
|
||||
internal class StatenERRConvert : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return "black";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value.ToString() == "99")
|
||||
{
|
||||
return "red";//零返回红色
|
||||
}
|
||||
else if (value.ToString() == "10")
|
||||
{
|
||||
return "yellow";//零返回黄色
|
||||
}
|
||||
else if (value.ToString() == "20")
|
||||
{
|
||||
return "green";//零返回绿
|
||||
}
|
||||
else
|
||||
{
|
||||
return "black";//非零返回黑色
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user