202303241701Change

This commit is contained in:
17860779768
2023-03-24 17:02:04 +08:00
parent 03e8e92c40
commit d12b1b5f2d
19 changed files with 592 additions and 55 deletions

View File

@ -7,9 +7,18 @@ using static XKRS.Common.Model.Helper.EnumHelper;
namespace XKRS.Common.Model.Helper
{
public class AttributeHelper:Attribute
public class DeviceAttribute:Attribute
{
/// <summary>
/// 设备类型
/// </summary>
public string TypeCode { get; set; }
/// <summary>
///特性修饰类别
/// </summary>
public DeviceAttributeType AttrType { get; set; }
}
public class ProcessAttribute : Attribute

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -17,6 +18,9 @@ namespace XKRS.Common.Model.Helper
public enum DeviceAttributeType
{
[Description("运行控件")]
RunCtrl=512,
}
}
}

View File

@ -67,9 +67,28 @@ namespace XKRS.Common.Model.Helper
}
public static string GetProgramDescription()
{
if (string.IsNullOrWhiteSpace(SettingInfo.Description))
{
SettingInfo.Description = "";
}
return SettingInfo.Description;
}
public static string GetProgramIcon()
{
string iconPath = SettingInfo.IconPath;
if (string.IsNullOrWhiteSpace(iconPath) || !File.Exists(iconPath))
{
iconPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logo.ico");
}
if (!File.Exists(iconPath))
{
iconPath = "";
}
return iconPath;
}
@ -85,8 +104,11 @@ namespace XKRS.Common.Model.Helper
public string DefaultProcess { get; set; }
public string DefaultProduction { get; set; }
public string IconPath { get; set; }
public string Description { get; set; }
public string CurrLayout { get; set; } = "";
}
}