首次提交:添加src文件夹代码
30
Cowain.Bake.Common/Converter/BatteryStatusConvertor.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class BatteryStatusConvertor : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
value = System.Convert.ToInt32(value);
|
||||
EBatteryStatus status = (EBatteryStatus)value;
|
||||
return status.FetchDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Cowain.Bake.Common/Converter/BindingColor.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class BindingColor : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value.ToString() == "报警")
|
||||
{
|
||||
return new SolidColorBrush(Colors.Red);
|
||||
}
|
||||
else if (value.ToString() == "警告")
|
||||
{
|
||||
return new SolidColorBrush(Colors.Gold);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new SolidColorBrush(Colors.Green);
|
||||
}
|
||||
|
||||
}
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
29
Cowain.Bake.Common/Converter/BoolToColorConverter.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class BoolToColorConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is bool boolValue)
|
||||
{
|
||||
return boolValue ? Brushes.Green : Brushes.Red;
|
||||
}
|
||||
return Brushes.Gray;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
24
Cowain.Bake.Common/Converter/BooleanToVisibilityConverter.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class BooleanToVisibilityConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is bool boolValue)
|
||||
{
|
||||
return boolValue ? Visibility.Visible : Visibility.Collapsed;
|
||||
}
|
||||
return Visibility.Collapsed;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Cowain.Bake.Common/Converter/DeviceTypeConverter.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class DeviceTypeConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var list = EnumHelper.GetEnumList<EDeviceType>();
|
||||
return list.FirstOrDefault(s => s.EnumString == value.ToString())?.EnumDesc;
|
||||
}
|
||||
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return (value is true) ? parameter : Binding.DoNothing;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class OperTypeConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
OperTypeEnum paramEnum = (OperTypeEnum)int.Parse(value.ToString());
|
||||
return paramEnum.GetDescription();
|
||||
}
|
||||
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return (value is true) ? parameter : Binding.DoNothing;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
24
Cowain.Bake.Common/Converter/DummyRuleConvertor.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using Cowain.Bake.Common.Enums;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class DummyRuleConvertor:IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null) { return null; }
|
||||
int rule = System.Convert.ToInt32(value);
|
||||
DummyPlaceRule a = (DummyPlaceRule)rule;
|
||||
return a.GetDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
32
Cowain.Bake.Common/Converter/DummyStatusConvertor.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using Cowain.Bake.Common.Enums;
|
||||
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class DummyStatusConvertor:IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
value = System.Convert.ToInt32(value);
|
||||
EPalletDummyState EPalletDummyState = (EPalletDummyState)value;
|
||||
return EPalletDummyState.FetchDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
74
Cowain.Bake.Common/Converter/EnumDescriptionTypeConverter.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class EnumDescriptionConverter : IValueConverter
|
||||
{
|
||||
private string GetEnumDescription(Enum enumObj)
|
||||
{
|
||||
FieldInfo fieldInfo = enumObj.GetType().GetField(enumObj.ToString());
|
||||
var descriptionAttr = fieldInfo
|
||||
.GetCustomAttributes(false)
|
||||
.OfType<DescriptionAttribute>()
|
||||
.Cast<DescriptionAttribute>()
|
||||
.SingleOrDefault();
|
||||
if (descriptionAttr == null)
|
||||
{
|
||||
return enumObj.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return descriptionAttr.Description;
|
||||
}
|
||||
}
|
||||
|
||||
object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
Enum myEnum = (Enum)value;
|
||||
string description = GetEnumDescription(myEnum);
|
||||
return description;
|
||||
}
|
||||
|
||||
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class EnumDescriptionTypeConverter : EnumConverter
|
||||
{
|
||||
public EnumDescriptionTypeConverter(Type type) : base(type)
|
||||
{
|
||||
}
|
||||
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||
{
|
||||
if (destinationType == typeof(string))
|
||||
{
|
||||
if (null != value)
|
||||
{
|
||||
FieldInfo fi = value.GetType().GetField(value.ToString());
|
||||
if (null != fi)
|
||||
{
|
||||
var attributes =
|
||||
(DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||
return ((attributes.Length > 0) && (!string.IsNullOrEmpty(attributes[0].Description)))
|
||||
? attributes[0].Description
|
||||
: value.ToString();
|
||||
}
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
return base.ConvertTo(context, culture, value, destinationType);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
30
Cowain.Bake.Common/Converter/IntToDeviceTypeConvertor.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class IntToDeviceTypeConvertor : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
value = System.Convert.ToInt32(value);
|
||||
EDeviceType status = (EDeviceType)value;
|
||||
return status.FetchDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Cowain.Bake.Common/Converter/ObjectConverter.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态转换器
|
||||
/// </summary>
|
||||
public class ObjectConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
string[] parray = parameter.ToString().ToLower().Split(':'); //将参数字符分段 parray[0]为比较值,parray[1]为true返回值,parray[2]为false返回值
|
||||
if (value == null)
|
||||
return parray[2]; //如果数据源为空,默认返回false返回值
|
||||
if (parray[0].Contains("|")) //判断有多个比较值的情况
|
||||
return parray[0].Split('|').Contains(value.ToString().ToLower()) ? parray[1] : parray[2]; //多值比较
|
||||
return parray[0].Equals(value.ToString().ToLower()) ? parray[1] : parray[2]; //单值比较
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var returnValue = "otherValue";
|
||||
string[] parray = parameter.ToString().ToLower().Split(':');
|
||||
if (value == null)
|
||||
return returnValue;
|
||||
var valueStr = value.ToString().ToLower();
|
||||
if (valueStr != parray[1])
|
||||
return returnValue;
|
||||
else
|
||||
return parray[0].Contains('|') ? parray[0].Split('|')[0] : parray[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Cowain.Bake.Common/Converter/PalletStatusConvertor.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
using Cowain.Bake.Common.Enums;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class PalletStatusConvertor:IValueConverter
|
||||
{
|
||||
private string GetEnumDescription(Enum enumObj)
|
||||
{
|
||||
FieldInfo fieldInfo = enumObj.GetType().GetField(enumObj.ToString());
|
||||
var descriptionAttr = fieldInfo
|
||||
.GetCustomAttributes(false)
|
||||
.OfType<DescriptionAttribute>()
|
||||
.Cast<DescriptionAttribute>()
|
||||
.SingleOrDefault();
|
||||
if (descriptionAttr == null)
|
||||
{
|
||||
return enumObj.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return descriptionAttr.Description;
|
||||
}
|
||||
}
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
value = System.Convert.ToInt32(value);
|
||||
EPalletStatus status = (EPalletStatus)value;
|
||||
return status.FetchDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
EPalletStatus e = EnumHelper.GetValueByDescription<EPalletStatus>((string)value);
|
||||
return (int)e;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Cowain.Bake.Common/Converter/ProductOutputTypeConverter.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class ProductOutputTypeConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return value?.Equals(parameter);
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return (value is true) ? parameter : Binding.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
34
Cowain.Bake.Common/Converter/RadioButtonToIndexConverter.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class RadioButtonToIndexConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
// 将 RadioButton 的值与 ViewModel 中的值进行比较并返回是否匹配
|
||||
if (value == null || parameter == null)
|
||||
return false;
|
||||
|
||||
return value.ToString() == parameter.ToString();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
// 这个转换通常不需要,可以简单地返回 DependencyProperty.UnsetValue
|
||||
if ((bool)value)
|
||||
{
|
||||
return parameter;
|
||||
}
|
||||
return DependencyProperty.UnsetValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Cowain.Bake.Common/Converter/ScaleConverter.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class ScaleConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
|
||||
if (parameter == null)
|
||||
throw new ArgumentNullException("value can not be null");
|
||||
if (value == null)
|
||||
throw new ArgumentNullException("value can not be null");
|
||||
double c = System.Convert.ToDouble(parameter);
|
||||
double index = System.Convert.ToDouble(value);
|
||||
return index / c;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (parameter == null)
|
||||
throw new ArgumentNullException("value can not be null");
|
||||
if (value == null)
|
||||
throw new ArgumentNullException("value can not be null");
|
||||
double c = System.Convert.ToDouble(parameter);
|
||||
double index = System.Convert.ToDouble(value);
|
||||
return System.Convert.ToInt32(index * c);
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Cowain.Bake.Common/Converter/SendFlagConvertor.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class SendFlagConvertor : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
value = System.Convert.ToInt32(value);
|
||||
EMesUpLoadStatus status = (EMesUpLoadStatus)value;
|
||||
return status.FetchDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
30
Cowain.Bake.Common/Converter/StationTypeConverter.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Data;
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using Prism.Ioc;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class StationTypeConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
value = System.Convert.ToInt32(value);
|
||||
EStationType status = (EStationType)value;
|
||||
return status.FetchDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
EStationType e = EnumHelper.GetValueByDescription<EStationType>((string)value);
|
||||
return (int)e;
|
||||
}
|
||||
}
|
||||
}
|
||||
26
Cowain.Bake.Common/Converter/TaskCmdConvertor.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace Cowain.Bake.Common.Converter
|
||||
{
|
||||
public class TaskCmdConvertor : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
value = System.Convert.ToInt32(value);
|
||||
ETaskStep status = (ETaskStep)value;
|
||||
return status.FetchDescription();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
76
Cowain.Bake.Common/Core/BasicFramework.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Cowain.Bake.Common.Core
|
||||
{
|
||||
public class BasicFramework
|
||||
{
|
||||
private static BasicFramework instance;
|
||||
private static readonly object locker = new object();
|
||||
public Dictionary<string, string> RegularDic = new Dictionary<string, string>();
|
||||
public static BasicFramework Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (locker)
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new BasicFramework();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BasicFramework()
|
||||
{
|
||||
SetRegularDic();
|
||||
}
|
||||
|
||||
private void SetRegularDic()
|
||||
{
|
||||
RegularDic.Clear();
|
||||
RegularDic.Add("decimal2", "^([1-9]+[\\d]*(.[0-9]{1,2})?)$");
|
||||
RegularDic.Add("Int32", @"^(0|-?[1-9]\d*)$");// "^[0-9]*$");
|
||||
RegularDic.Add("Int16", "^([1-9](\\d{0,3}))$|^([1-5]\\d{4})$|^(6[0-4]\\d{3})$|^(65[0-4]\\d{2})$|^(655[0-2]\\d)$|^(6553[0-5])$");
|
||||
RegularDic.Add("bool", "^[01]$");
|
||||
RegularDic.Add("Float", @"^(?!\.?$)\d+(\.\d+)?([eE][-+]?\d+)?$");
|
||||
}
|
||||
public static T DeepCopy<T>(T obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
return obj;
|
||||
}
|
||||
if (obj is string || obj.GetType().IsValueType)
|
||||
return obj;
|
||||
|
||||
object retval = Activator.CreateInstance(obj.GetType());
|
||||
FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance);
|
||||
foreach (var field in fields)
|
||||
{
|
||||
try
|
||||
{
|
||||
field.SetValue(retval, DeepCopy(field.GetValue(obj)));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.GetCurrentClassError((typeof(BasicFramework) + "DeepCopy异常:" + ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
return (T)retval;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
273
Cowain.Bake.Common/Core/CSVHelper.cs
Normal file
@@ -0,0 +1,273 @@
|
||||
using CsvHelper;
|
||||
using CsvHelper.Configuration;
|
||||
using Microsoft.Win32;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
namespace Cowain.Bake.Common.Core
|
||||
{
|
||||
public class CSVHelper
|
||||
{
|
||||
public static void WriteDataTableToCsv<T>(IEnumerable<T> list)
|
||||
{
|
||||
string filePath = GetFilePath();
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
using (var writer = new StreamWriter(filePath))
|
||||
using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture))
|
||||
{
|
||||
csv.WriteRecords(list);
|
||||
}
|
||||
}
|
||||
|
||||
//列头是中文,所有字段都写入
|
||||
public static void WriteDataTableToCsv<T>(IEnumerable<T> list, List<string> nameCols)
|
||||
{
|
||||
string filePath = GetFilePath();
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
|
||||
{
|
||||
// 设置列头编码为UTF8以支持中文
|
||||
Encoding = System.Text.Encoding.UTF8,
|
||||
// 设置不写入列头
|
||||
HasHeaderRecord = false
|
||||
};
|
||||
|
||||
using (var writer = new StreamWriter(filePath, false, System.Text.Encoding.UTF8))
|
||||
using (var csv = new CsvWriter(writer, config))
|
||||
{
|
||||
// 写入列头,使用中文列名
|
||||
foreach(var col in nameCols)
|
||||
{
|
||||
csv.WriteField(col);
|
||||
}
|
||||
csv.NextRecord();
|
||||
|
||||
// 写入数据行
|
||||
csv.WriteRecords(list);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 将List的特定列写入CSV文件的方法
|
||||
public static void WriteDataTableToCsv<T>(IEnumerable<T> list, IEnumerable<string> columnsToSave)
|
||||
{
|
||||
string filePath = GetFilePath();
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
|
||||
{
|
||||
// 设置列头编码为UTF8以支持中文
|
||||
Encoding = System.Text.Encoding.UTF8,
|
||||
// 设置不写入列头
|
||||
HasHeaderRecord = false
|
||||
};
|
||||
|
||||
using (var writer = new StreamWriter(filePath, false, System.Text.Encoding.UTF8))
|
||||
using (var csv = new CsvWriter(writer, config))
|
||||
{
|
||||
// 写入列头
|
||||
foreach (var columnName in columnsToSave)
|
||||
{
|
||||
csv.WriteField(columnName);
|
||||
}
|
||||
csv.NextRecord();
|
||||
|
||||
// 写入特定列数据
|
||||
foreach (var person in list)
|
||||
{
|
||||
foreach (var columnName in columnsToSave)
|
||||
{
|
||||
var property = typeof(T).GetProperty(columnName);
|
||||
if (property != null)
|
||||
{
|
||||
csv.WriteField(property.GetValue(person));
|
||||
}
|
||||
}
|
||||
csv.NextRecord();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static string GetFilePath()
|
||||
{
|
||||
string filePath = "";
|
||||
//创建一个保存文件式的对话框
|
||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
//设置保存的文件的类型,注意过滤器的语法
|
||||
saveFileDialog.Filter = "CSV|*.csv";
|
||||
if (saveFileDialog.ShowDialog() == true)
|
||||
{
|
||||
filePath = saveFileDialog.FileName;
|
||||
}
|
||||
|
||||
return filePath;
|
||||
}
|
||||
public static void WriteMap<T, TMap>(IEnumerable<T> list, string filePath) where TMap : ClassMap
|
||||
{
|
||||
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
|
||||
{
|
||||
// 设置列头编码为UTF8以支持中文
|
||||
Delimiter = ",",
|
||||
HasHeaderRecord = true,
|
||||
Encoding = System.Text.Encoding.UTF8
|
||||
};
|
||||
|
||||
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
config.HasHeaderRecord = false; // 获取字段描述作为列头
|
||||
}
|
||||
|
||||
using (var writer = new StreamWriter(filePath, true, System.Text.Encoding.UTF8))
|
||||
using (var csv = new CsvWriter(writer, config))
|
||||
{
|
||||
// 注册自定义映射
|
||||
//csv.Context.RegisterClassMap<BatteryInfoMap>();
|
||||
csv.Context.RegisterClassMap<TMap>();
|
||||
// 写入记录
|
||||
csv.WriteRecords(list);
|
||||
}
|
||||
}
|
||||
public static void WriteMap<T, TMap>(IEnumerable<T> list ) where TMap : ClassMap //where TMap : ClassMap<T> // 约束:必须是 ClassMap<T> 或其子类
|
||||
{
|
||||
string filePath = GetFilePath();
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
WriteMap<T, TMap>(list, filePath);
|
||||
}
|
||||
|
||||
// 将List的特定列写入CSV文件的方法
|
||||
public static void WriteDataTableToCsv<T>(IEnumerable<T> list, IEnumerable<string> columnsToSave, IEnumerable<string> columnsToShow)
|
||||
{
|
||||
string filePath = GetFilePath();
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
|
||||
{
|
||||
// 设置列头编码为UTF8以支持中文
|
||||
Encoding = System.Text.Encoding.UTF8,
|
||||
HasHeaderRecord = false
|
||||
};
|
||||
|
||||
using (var writer = new StreamWriter(filePath, false, System.Text.Encoding.UTF8))
|
||||
using (var csv = new CsvWriter(writer, config))
|
||||
{
|
||||
// 写入列头
|
||||
foreach (var columnName in columnsToShow)
|
||||
{
|
||||
csv.WriteField(columnName);
|
||||
}
|
||||
csv.NextRecord();
|
||||
|
||||
// 写入特定列数据
|
||||
foreach (var person in list)
|
||||
{
|
||||
foreach (var columnName in columnsToSave)
|
||||
{
|
||||
var property = typeof(T).GetProperty(columnName);
|
||||
if (property != null)
|
||||
{
|
||||
csv.WriteField(property.GetValue(person));
|
||||
}
|
||||
}
|
||||
csv.NextRecord();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 将List的特定列写入CSV文件的方法
|
||||
public static void WriteDataTableToCsv<T>(IEnumerable<T> list, IEnumerable<string> columnsToSave, IEnumerable<string> columnsToShow, string filePath)
|
||||
{
|
||||
bool isFileExists = false;
|
||||
var config = new CsvConfiguration(CultureInfo.InvariantCulture)
|
||||
{
|
||||
// 设置列头编码为UTF8以支持中文
|
||||
Encoding = System.Text.Encoding.UTF8,
|
||||
HasHeaderRecord = false
|
||||
};
|
||||
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
// 获取字段描述作为列头
|
||||
isFileExists = true;
|
||||
}
|
||||
|
||||
using (var writer = new StreamWriter(filePath, true, System.Text.Encoding.UTF8))
|
||||
using (var csv = new CsvWriter(writer, config))
|
||||
{
|
||||
// 写入列头
|
||||
if (!isFileExists)
|
||||
{
|
||||
foreach (var columnHeader in columnsToShow)
|
||||
{
|
||||
csv.WriteField(columnHeader);
|
||||
}
|
||||
csv.NextRecord();
|
||||
}
|
||||
|
||||
// 写入特定列数据
|
||||
foreach (var person in list)
|
||||
{
|
||||
foreach (var columnName in columnsToSave)
|
||||
{
|
||||
var property = typeof(T).GetProperty(columnName);
|
||||
if (property != null)
|
||||
{
|
||||
csv.WriteField(property.GetValue(person));
|
||||
}
|
||||
}
|
||||
csv.NextRecord();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 将DataTable写入CSV文件的方法
|
||||
public static void WriteDataTableToCsv(DataTable dataTable)
|
||||
{
|
||||
string filePath = GetFilePath();
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using (var writer = new StreamWriter(filePath))
|
||||
using (var csv = new CsvWriter(writer, CultureInfo.InvariantCulture))
|
||||
{
|
||||
// 写入表头
|
||||
foreach (DataColumn column in dataTable.Columns)
|
||||
{
|
||||
csv.WriteField(column.ColumnName);
|
||||
}
|
||||
csv.NextRecord();
|
||||
|
||||
// 写入数据行
|
||||
foreach (DataRow row in dataTable.Rows)
|
||||
{
|
||||
for (var i = 0; i < dataTable.Columns.Count; i++)
|
||||
{
|
||||
csv.WriteField(row[i]);
|
||||
}
|
||||
csv.NextRecord();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Cowain.Bake.Common/Core/CommonCoreHelper.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using Cowain.Bake.Model;
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
|
||||
namespace Cowain.Bake.Common.Core
|
||||
{
|
||||
|
||||
public class CommonCoreHelper
|
||||
{
|
||||
|
||||
//IsCompleted:true,CompleteAdding()已被调用(表示不再有新项添加)该集合是否已被标记为“添加完成”(即 CompleteAdding() 已被调用)
|
||||
public BlockingCollection<TTaskRecord> BlockTask = new BlockingCollection<TTaskRecord>();
|
||||
public BlockingCollection<TDeviceConfig> BlockStatusColor = new BlockingCollection<TDeviceConfig>();
|
||||
|
||||
// 参数表示初始状态:true表示初始有信号,false表示初始无信号
|
||||
|
||||
public AutoResetEvent MainViewAutoEvent = new AutoResetEvent(true);
|
||||
private static CommonCoreHelper instance;
|
||||
|
||||
public static CommonCoreHelper Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new CommonCoreHelper();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
public List<string> StringToListConverter(string input)
|
||||
{
|
||||
string[] separators = { " ", ":", ",", ";" };
|
||||
if (string.IsNullOrWhiteSpace(input))
|
||||
{
|
||||
return new List<string>();
|
||||
}
|
||||
string[] items = input.Split(separators, StringSplitOptions.RemoveEmptyEntries);
|
||||
List<string> itemList = new List<string>(items);
|
||||
return itemList;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
103
Cowain.Bake.Common/Core/INIHelper.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Cowain.Bake.Common.Core
|
||||
{
|
||||
public class INIHelper
|
||||
{
|
||||
[DllImport("kernel32")]
|
||||
private static extern long WritePrivateProfileString(string section, string key, string val, string filepath);
|
||||
[DllImport("kernel32")]
|
||||
private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retval, int size, string filePath);
|
||||
|
||||
//ini文件名称
|
||||
private static string inifilename = "Config.ini";
|
||||
//获取ini文件路径
|
||||
public static string inifilepath = Application.StartupPath + "\\" + inifilename;
|
||||
|
||||
public static string ReadValue(string key)
|
||||
{
|
||||
StringBuilder s = new StringBuilder(1024);
|
||||
GetPrivateProfileString("Config", key, "", s, 1024, inifilepath);
|
||||
return s.ToString();
|
||||
}
|
||||
public static bool ReadBool(string section, string key, bool value = false)
|
||||
{
|
||||
bool reVal = false;
|
||||
StringBuilder s = new StringBuilder(1024);
|
||||
GetPrivateProfileString(section, key, "", s, 1024, inifilepath);
|
||||
bool b = bool.TryParse(s.ToString(), out reVal);
|
||||
if (b)
|
||||
{
|
||||
return reVal;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public static string ReadString(string section, string key, string value = "")
|
||||
{
|
||||
StringBuilder s = new StringBuilder(1024);
|
||||
GetPrivateProfileString(section, key, "", s, 1024, inifilepath);
|
||||
if (0 == s.ToString().Length)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
return s.ToString();
|
||||
}
|
||||
|
||||
public static int ReadInt(string section, string key, int nDefault = 0)
|
||||
{
|
||||
// 每次从ini中读取多少字节
|
||||
System.Text.StringBuilder temp = new StringBuilder(1024);
|
||||
// section=配置节,key=键名,temp=上面,path=路径
|
||||
GetPrivateProfileString(section, key, "", temp, 1024, inifilepath);
|
||||
string t = temp.ToString();
|
||||
int v = 0;
|
||||
if (int.TryParse(t, out v))
|
||||
{
|
||||
return v;
|
||||
}
|
||||
return nDefault;
|
||||
}
|
||||
|
||||
public static float ReadFloat(string section, string key, float fDefault = 0)
|
||||
{
|
||||
// 每次从ini中读取多少字节
|
||||
System.Text.StringBuilder temp = new System.Text.StringBuilder(255);
|
||||
// section=配置节,key=键名,temp=上面,path=路径
|
||||
GetPrivateProfileString(section, key, "", temp, 255, inifilepath);
|
||||
string t = temp.ToString();
|
||||
float v = 0;
|
||||
if (float.TryParse(t, out v))
|
||||
{
|
||||
return v;
|
||||
}
|
||||
return fDefault;
|
||||
}
|
||||
|
||||
/// <param name="value"></param>
|
||||
public static void Write(string section, string key, string value)
|
||||
{
|
||||
// section=配置节,key=键名,value=键值,path=路径
|
||||
WritePrivateProfileString(section, key, value, inifilepath);
|
||||
}
|
||||
|
||||
public static void WriteValue(string key, string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
WritePrivateProfileString("Config", key, value, inifilepath);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
169
Cowain.Bake.Common/Core/LogHelper.cs
Normal file
@@ -0,0 +1,169 @@
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using NLog;
|
||||
using NLog.Config;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace Cowain.Bake.Common.Core
|
||||
{
|
||||
public class LogHelper
|
||||
{
|
||||
private static LogHelper instance;
|
||||
|
||||
public static LogHelper Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new LogHelper();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
private Logger logger; //初始化日志类
|
||||
|
||||
/// <summary>
|
||||
/// 事件定义
|
||||
/// </summary>
|
||||
public Action<string> OnComplated;
|
||||
public Action<string, bool, E_LogType> OnShowInvoke { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间触发
|
||||
/// </summary>
|
||||
/// <param name="msg">自定义消息</param>
|
||||
/// <param name="isUI">是否触发事件通知</param>
|
||||
private void Notice(string msg, bool isShow, E_LogType logType)
|
||||
{
|
||||
if (OnShowInvoke != null)
|
||||
{
|
||||
OnShowInvoke?.Invoke(msg, isShow, logType);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 静态构造函数
|
||||
/// </summary>
|
||||
private LogHelper()
|
||||
{
|
||||
logger = NLog.LogManager.GetCurrentClassLogger(); //初始化日志类
|
||||
//string rootPath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
|
||||
|
||||
//string fileName = string.Format(@"{0}NLog.config", rootPath);
|
||||
|
||||
////初始化配置日志
|
||||
//NLog.LogManager.Configuration = new XmlLoggingConfiguration(fileName);
|
||||
}
|
||||
|
||||
public void Trace(string msg)
|
||||
{
|
||||
To(msg, E_LogType.Trace, false);
|
||||
}
|
||||
|
||||
public void Debug(string msg, bool isShow = false)
|
||||
{
|
||||
To(msg, E_LogType.Debug, isShow);
|
||||
}
|
||||
|
||||
public void Info(string msg, bool isShow = false)
|
||||
{
|
||||
To(msg, E_LogType.Info, isShow);
|
||||
}
|
||||
|
||||
public void Warn(string msg, bool isShow = false)
|
||||
{
|
||||
To(msg, E_LogType.Warn, isShow);
|
||||
}
|
||||
|
||||
public void Error(string msg, bool isShow = false)
|
||||
{
|
||||
To(msg, E_LogType.Error, isShow);
|
||||
}
|
||||
|
||||
public void Fatal(string msg, bool isShow = false)
|
||||
{
|
||||
To(msg, E_LogType.Fatal, isShow);
|
||||
}
|
||||
#region 当前类也打印出来
|
||||
public void GetCurrentClassDebug(string msg, bool isShow = false,
|
||||
[CallerMemberName] string memberName = "",
|
||||
[CallerFilePath] string sourceFilePath = "",
|
||||
[CallerLineNumber] int sourceLineNumber = 0)
|
||||
{
|
||||
msg = $"File:{sourceFilePath},Fun:{memberName},LineNum:{sourceLineNumber},{msg}";
|
||||
To(msg, E_LogType.Debug, isShow);
|
||||
}
|
||||
|
||||
public void GetCurrentClassInfo(string msg, bool isShow = false,
|
||||
[CallerMemberName] string memberName = "",
|
||||
[CallerFilePath] string sourceFilePath = "",
|
||||
[CallerLineNumber] int sourceLineNumber = 0)
|
||||
{
|
||||
msg = $"File:{sourceFilePath},Fun:{memberName},LineNum:{sourceLineNumber},{msg}";
|
||||
To(msg, E_LogType.Info, isShow);
|
||||
}
|
||||
|
||||
public void GetCurrentClassWarn(string msg, bool isShow = false,
|
||||
[CallerMemberName] string memberName = "",
|
||||
[CallerFilePath] string sourceFilePath = "",
|
||||
[CallerLineNumber] int sourceLineNumber = 0)
|
||||
{
|
||||
msg = $"File:{sourceFilePath},Fun:{memberName},LineNum:{sourceLineNumber},{msg}";
|
||||
To(msg, E_LogType.Warn, isShow);
|
||||
}
|
||||
|
||||
public void GetCurrentClassError(string msg, bool isShow = false,
|
||||
[CallerMemberName] string memberName = "",
|
||||
[CallerFilePath] string sourceFilePath = "",
|
||||
[CallerLineNumber] int sourceLineNumber = 0)
|
||||
{
|
||||
msg = $"File:{sourceFilePath},Fun:{memberName},LineNum:{sourceLineNumber},{msg}";
|
||||
To(msg, E_LogType.Error, isShow);
|
||||
}
|
||||
|
||||
public void GetCurrentClassFatal(string msg,bool isShow = false,
|
||||
[CallerMemberName] string memberName = "",
|
||||
[CallerFilePath] string sourceFilePath = "",
|
||||
[CallerLineNumber] int sourceLineNumber = 0)
|
||||
{
|
||||
msg = $"File:{sourceFilePath},Fun:{memberName},LineNum:{sourceLineNumber},{msg}";
|
||||
To(msg, E_LogType.Fatal, isShow);
|
||||
}
|
||||
#endregion
|
||||
private void To(string msg, E_LogType logType, bool isShow = false)
|
||||
{
|
||||
switch (logType)
|
||||
{
|
||||
case E_LogType.Debug:
|
||||
logger.Debug(msg);
|
||||
break;
|
||||
case E_LogType.Info:
|
||||
logger.Info(msg);
|
||||
break;
|
||||
case E_LogType.Warn:
|
||||
logger.Warn(msg);
|
||||
break;
|
||||
case E_LogType.Error:
|
||||
logger.Error(msg);
|
||||
break;
|
||||
case E_LogType.Fatal:
|
||||
logger.Fatal(msg);
|
||||
break;
|
||||
default:
|
||||
logger.Trace(msg);
|
||||
break;
|
||||
}
|
||||
Notice(msg, isShow, logType);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Cowain.Bake.Common/Core/MessageEventWaitHandle.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common.Core
|
||||
{
|
||||
public class MessageEventWaitHandle<T> : EventWaitHandle
|
||||
{
|
||||
private T message;
|
||||
private readonly object lockEvent = new object();//定义锁
|
||||
public MessageEventWaitHandle(bool initialState, EventResetMode mode)
|
||||
: base(initialState, mode)
|
||||
{
|
||||
}
|
||||
|
||||
public bool Set(T message)
|
||||
{
|
||||
//lock (lockEvent)
|
||||
{
|
||||
this.message = message;
|
||||
return base.Set();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public T GetMessage(int timeOut)
|
||||
{
|
||||
//lock (lockEvent)//因为这里锁住了,set给不了信号
|
||||
{
|
||||
if (!base.WaitOne(timeOut)) //为假超时
|
||||
{
|
||||
base.Reset();
|
||||
return default(T);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.Reset();
|
||||
return this.message;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
222
Cowain.Bake.Common/Core/SettingProvider.cs
Normal file
@@ -0,0 +1,222 @@
|
||||
using Cowain.Bake.Common.Core;
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common.Core
|
||||
{
|
||||
public class SettingProvider
|
||||
{
|
||||
const string MAIN = "Main";
|
||||
private static SettingProvider instance;
|
||||
public string PWD;
|
||||
|
||||
public string ProductionLineName;
|
||||
private static readonly object locker = new object();
|
||||
private int? _waterPallet;
|
||||
//private int? _stoveLayers;
|
||||
private int? _palletRows;
|
||||
private int? _palletCols;
|
||||
|
||||
private Enums.EDispatchMode _dispMode;
|
||||
public Enums.EDispatchMode DispMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return _dispMode;
|
||||
}
|
||||
set
|
||||
{
|
||||
_dispMode = (Enums.EDispatchMode)value;
|
||||
INIHelper.Write(MAIN, "DispatchMode", _dispMode.ToString());
|
||||
}
|
||||
}
|
||||
public int WaterPallet
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _waterPallet)
|
||||
{
|
||||
_waterPallet = INIHelper.ReadInt(MAIN, "WaterPallet", 0);
|
||||
}
|
||||
|
||||
return _waterPallet ?? 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
_waterPallet = value;
|
||||
INIHelper.Write(MAIN, "WaterPallet", _waterPallet.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
//public int StoveLayers
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// if (null == _stoveLayers)
|
||||
// {
|
||||
// _stoveLayers = INIHelper.ReadInt(MAIN, "StoveLayers", 0);
|
||||
// }
|
||||
// return _stoveLayers ?? 0;
|
||||
// }
|
||||
//}
|
||||
|
||||
public int PalletRows
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _palletRows)
|
||||
{
|
||||
_palletRows = INIHelper.ReadInt(MAIN, "PalletRows", 48);
|
||||
}
|
||||
return _palletRows ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int PalletCols
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _palletCols)
|
||||
{
|
||||
_palletCols = INIHelper.ReadInt(MAIN, "PalletCols", 2);
|
||||
}
|
||||
return _palletCols ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int? _skinType;
|
||||
public int SkinType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _skinType)
|
||||
{
|
||||
_skinType = INIHelper.ReadInt(MAIN, "SkinType", 0);
|
||||
}
|
||||
|
||||
return _skinType ?? 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
_skinType = value;
|
||||
INIHelper.Write(MAIN, "SkinType", _skinType.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public bool? _autoUpdate;
|
||||
public bool AutoUpdate
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _autoUpdate)
|
||||
{
|
||||
_autoUpdate = INIHelper.ReadBool(MAIN, "AutoUpdate", false);
|
||||
}
|
||||
|
||||
return _autoUpdate ?? false;
|
||||
}
|
||||
set
|
||||
{
|
||||
_autoUpdate = value;
|
||||
INIHelper.Write(MAIN, "AutoUpdate", _autoUpdate.Value ? "1" : "0");
|
||||
}
|
||||
}
|
||||
|
||||
public string _autoUpdateUrl;
|
||||
public string AutoUpdateUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(_autoUpdateUrl))
|
||||
{
|
||||
_autoUpdateUrl = INIHelper.ReadString(MAIN, "AutoUpdateUrl", "http://127.0.0.1:6688/update/update.xml");
|
||||
}
|
||||
|
||||
return _autoUpdateUrl;
|
||||
}
|
||||
set
|
||||
{
|
||||
_autoUpdateUrl = value;
|
||||
INIHelper.Write(MAIN, "AutoUpdateUrl", _autoUpdateUrl);
|
||||
}
|
||||
}
|
||||
|
||||
private EIsReverseOrder? _stoveDispDirection;
|
||||
public EIsReverseOrder StoveDispDirection
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _stoveDispDirection)
|
||||
{
|
||||
_stoveDispDirection = (EIsReverseOrder)INIHelper.ReadInt(MAIN, "StoveDispDirection", 0);
|
||||
}
|
||||
|
||||
return _stoveDispDirection.Value;
|
||||
}
|
||||
}
|
||||
|
||||
private EIsReverseOrder? _isReverseOrder;
|
||||
public EIsReverseOrder IsReverseOrder
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _isReverseOrder)
|
||||
{
|
||||
_isReverseOrder = (EIsReverseOrder)INIHelper.ReadInt(MAIN, "IsReverseOrder", 0);
|
||||
}
|
||||
|
||||
return _isReverseOrder.Value;
|
||||
}
|
||||
}
|
||||
|
||||
private int? _countCmd;
|
||||
public int CountCmd
|
||||
{
|
||||
get
|
||||
{
|
||||
if (null == _countCmd)
|
||||
{
|
||||
_countCmd = INIHelper.ReadInt(MAIN, "CountCmd", 0);
|
||||
}
|
||||
if (3000 <= _countCmd)
|
||||
{
|
||||
CountCmd = 0;
|
||||
}
|
||||
return _countCmd ?? 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
_countCmd = value;
|
||||
INIHelper.Write(MAIN, "CountCmd", _countCmd.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public static SettingProvider Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (locker)
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new SettingProvider();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
SettingProvider()
|
||||
{
|
||||
PWD = INIHelper.ReadString(MAIN, "PassWord", "cowain2024");
|
||||
DispMode = (Enums.EDispatchMode)INIHelper.ReadInt(MAIN, "DispatchMode", 2);
|
||||
ProductionLineName = INIHelper.ReadString(MAIN, "ProductionLineName", ""); //有乱码
|
||||
}
|
||||
}
|
||||
}
|
||||
310
Cowain.Bake.Common/Cowain.Bake.Common.csproj
Normal file
@@ -0,0 +1,310 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{4E1A0D39-34EF-498D-A3A7-D1489C6A6FE4}</ProjectGuid>
|
||||
<OutputType>library</OutputType>
|
||||
<RootNamespace>Cowain.Bake.Common</RootNamespace>
|
||||
<AssemblyName>Cowain.Bake.Common</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\BouncyCastle.Cryptography.2.2.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Cowain.Bake.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Cowain.Bake.Model\bin\Debug\Cowain.Bake.Model.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CsvHelper, Version=33.0.0.0, Culture=neutral, PublicKeyToken=8c4959082be5c823, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Libs\CsvHelper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Dapper">
|
||||
<HintPath>..\Libs\Dapper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EntityFramework.SqlServer">
|
||||
<HintPath>..\Libs\EntityFramework.SqlServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Enums.NET, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7ea1c1650d506225, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Enums.NET.4.0.1\lib\net45\Enums.NET.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MathNet.Numerics, Version=4.15.0.0, Culture=neutral, PublicKeyToken=cd8b63ad3d691a37, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MathNet.Numerics.Signed.4.15.0\lib\net461\MathNet.Numerics.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Libs\Microsoft.Bcl.HashCode.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=2.3.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.2.3.2\lib\net462\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.31\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data.EntityFramework, Version=8.0.28.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Libs\MySql.Data.EntityFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog">
|
||||
<HintPath>..\Libs\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.Core, Version=2.6.2.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.6.2\lib\net472\NPOI.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OOXML, Version=2.6.2.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.6.2\lib\net472\NPOI.OOXML.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXml4Net, Version=2.6.2.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.6.2\lib\net472\NPOI.OpenXml4Net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NPOI.OpenXmlFormats, Version=2.6.2.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NPOI.2.6.2\lib\net472\NPOI.OpenXmlFormats.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Opc.Ua.Core">
|
||||
<HintPath>..\Libs\Opc.Ua.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Oracle.ManagedDataAccess">
|
||||
<HintPath>..\Libs\Oracle.ManagedDataAccess.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism, Version=8.1.97.5141, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Core.8.1.97\lib\net47\Prism.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Unity.Wpf, Version=8.1.97.5141, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Unity.8.1.97\lib\net47\Prism.Unity.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Prism.Wpf, Version=8.1.97.5141, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Prism.Wpf.8.1.97\lib\net47\Prism.Wpf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SixLabors.Fonts.1.0.0\lib\netstandard2.0\SixLabors.Fonts.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SixLabors.ImageSharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SixLabors.ImageSharp.2.1.4\lib\net472\SixLabors.ImageSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.Security.AccessControl, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.AccessControl.6.0.0\lib\net461\System.Security.AccessControl.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Cryptography.Xml, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Cryptography.Xml.6.0.1\lib\net461\System.Security.Cryptography.Xml.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security.Principal.Windows, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Security.Principal.Windows.5.0.0\lib\net461\System.Security.Principal.Windows.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encoding.CodePages, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encoding.CodePages.5.0.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=7.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.7.0.2\lib\net462\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Forms.DataVisualization" />
|
||||
<Reference Include="System.Windows.Forms.DataVisualization.Design" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Abstractions, Version=5.11.7.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Unity.Abstractions.5.11.7\lib\net47\Unity.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Container, Version=5.11.11.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Unity.Container.5.11.11\lib\net47\Unity.Container.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="Wisdy">
|
||||
<HintPath>..\Libs\Wisdy.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Converter\BatteryStatusConvertor.cs" />
|
||||
<Compile Include="Converter\BindingColor.cs" />
|
||||
<Compile Include="Converter\BooleanToVisibilityConverter.cs" />
|
||||
<Compile Include="Converter\BoolToColorConverter.cs" />
|
||||
<Compile Include="Converter\DeviceTypeConverter.cs" />
|
||||
<Compile Include="Converter\DummyRuleConvertor.cs" />
|
||||
<Compile Include="Converter\DummyStatusConvertor.cs" />
|
||||
<Compile Include="Converter\EnumDescriptionTypeConverter.cs" />
|
||||
<Compile Include="Converter\IntToDeviceTypeConvertor.cs" />
|
||||
<Compile Include="Converter\ObjectConverter.cs" />
|
||||
<Compile Include="Converter\PalletStatusConvertor.cs" />
|
||||
<Compile Include="Converter\ProductOutputTypeConverter.cs" />
|
||||
<Compile Include="Converter\RadioButtonToIndexConverter.cs" />
|
||||
<Compile Include="Converter\ScaleConverter.cs" />
|
||||
<Compile Include="Converter\SendFlagConvertor.cs" />
|
||||
<Compile Include="Converter\StationTypeConverter.cs" />
|
||||
<Compile Include="Converter\TaskCmdConvertor.cs" />
|
||||
<Compile Include="Core\BasicFramework.cs" />
|
||||
<Compile Include="Core\CommonCoreHelper.cs" />
|
||||
<Compile Include="Core\CSVHelper.cs" />
|
||||
<Compile Include="Core\LogHelper.cs" />
|
||||
<Compile Include="Core\INIHelper.cs" />
|
||||
<Compile Include="Core\MessageEventWaitHandle.cs" />
|
||||
<Compile Include="Core\SettingProvider.cs" />
|
||||
<Compile Include="Enums\EnumHelper.cs" />
|
||||
<Compile Include="Enums\SysEnum.cs" />
|
||||
<Compile Include="Global.cs" />
|
||||
<Compile Include="Interface\ICommonFun.cs" />
|
||||
<Compile Include="Interface\IDeviceDebug.cs" />
|
||||
<Compile Include="Interface\IRecvMesHttp.cs" />
|
||||
<Compile Include="Interface\IServerManager.cs" />
|
||||
<Compile Include="Interface\ITrigService.cs" />
|
||||
<Compile Include="MiniDump.cs" />
|
||||
<Compile Include="Models\CommonModel.cs" />
|
||||
<Compile Include="Models\MESModel.cs" />
|
||||
<Compile Include="Models\VarValue.cs" />
|
||||
<Compile Include="PasswordHelper.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="ViewModelBase.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Resource Include="Fonts\iconfont.ttf" />
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Resource Include="Images\exit.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="Styles\BaseResources.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\ButtonStyles.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\DataGrid.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\TextBoxStyle.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\ToggleButtonStyle.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\CowainLogo.jpg" />
|
||||
<Resource Include="Images\CowainLogo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Auto.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Manual.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\shuru.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\zhuye.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\gongyezujian-kaiguan.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\help-fill.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\CN-EN.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\skin.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\gongju1.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\Cowain.jpg" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
6
Cowain.Bake.Common/Cowain.Bake.Common.csproj.user
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
228
Cowain.Bake.Common/Enums/EnumHelper.cs
Normal file
@@ -0,0 +1,228 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Cowain.Bake.Common.Enums
|
||||
{
|
||||
public static class EnumHelper
|
||||
{
|
||||
public static string FetchDescription(this Enum value)
|
||||
{
|
||||
try
|
||||
{
|
||||
FieldInfo fi = value.GetType().GetField(value.ToString());
|
||||
if (null == fi)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||
if (attributes != null && attributes.Length > 0)
|
||||
return attributes[0].Description;
|
||||
else
|
||||
return value.ToString();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
public static string GetEnumDescription(this Enum @enum, int value)
|
||||
{
|
||||
Type enumType = @enum.GetType();
|
||||
if (Enum.IsDefined(enumType, value))
|
||||
{
|
||||
DescriptionAttribute[] descriptAttr = enumType.GetField(Enum.GetName(enumType, value)).GetDescriptAttr();
|
||||
return descriptAttr == null || descriptAttr.Length == 0 ? "" : descriptAttr[0].Description;
|
||||
}
|
||||
return "枚举异常";
|
||||
}
|
||||
|
||||
public static string GetDescription(this Enum enumName)
|
||||
{
|
||||
string str = string.Empty;
|
||||
DescriptionAttribute[] descriptAttr = enumName.GetType().GetField(enumName.ToString()).GetDescriptAttr();
|
||||
return descriptAttr == null || descriptAttr.Length == 0 ? enumName.ToString() : descriptAttr[0].Description;
|
||||
}
|
||||
public static ArrayList ToArrayList(this Enum en)
|
||||
{
|
||||
ArrayList arrayList = new ArrayList();
|
||||
foreach (Enum @enum in Enum.GetValues(en.GetType()))
|
||||
arrayList.Add(new KeyValuePair<Enum, string>(@enum, @enum.GetDescription()));
|
||||
return arrayList;
|
||||
}
|
||||
|
||||
public static DescriptionAttribute[] GetDescriptAttr(this FieldInfo fieldInfo)
|
||||
{
|
||||
if (fieldInfo != null)
|
||||
return (DescriptionAttribute[])fieldInfo.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||
return null;
|
||||
}
|
||||
public static dynamic Todynamic<T>(this Enum en)
|
||||
{
|
||||
Dictionary<int, string> valuePairs = new Dictionary<int, string>();
|
||||
foreach (Enum @enum in Enum.GetValues(en.GetType()))
|
||||
valuePairs.Add((int)Enum.Parse(typeof(T), @enum.ToString()), @enum.GetDescription());
|
||||
return valuePairs;
|
||||
}
|
||||
|
||||
public static dynamic ToStringKey<T>(this Enum en)
|
||||
{
|
||||
Dictionary<string, string> valuePairs = new Dictionary<string, string>();
|
||||
foreach (Enum @enum in Enum.GetValues(en.GetType()))
|
||||
valuePairs.Add(@enum.ToString(), @enum.GetDescription());
|
||||
return valuePairs;
|
||||
}
|
||||
public static dynamic GetListDesc(this Enum en)
|
||||
{
|
||||
List<string> lst = new List<string>();
|
||||
foreach (Enum @enum in Enum.GetValues(en.GetType()))
|
||||
lst.Add(@enum.GetDescription());
|
||||
return lst;
|
||||
}
|
||||
|
||||
public static dynamic ListKeyString<T>(this Enum en)
|
||||
{
|
||||
List<string> lst = new List<string>();
|
||||
foreach (Enum @enum in Enum.GetValues(en.GetType()))
|
||||
lst.Add(@enum.ToString());
|
||||
return lst;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <typeparam name="EnumType">The enum type.</typeparam>
|
||||
/// <param name="description">The description.</param>
|
||||
/// <returns>The enum value.</returns>
|
||||
public static EnumType GetValueByDescription<EnumType>(this string description)
|
||||
{
|
||||
var type = typeof(EnumType);
|
||||
foreach (var enumName in Enum.GetNames(type))
|
||||
{
|
||||
var enumValue = Enum.Parse(type, enumName);
|
||||
if (description == ((Enum)enumValue).GetDescription())
|
||||
return (EnumType)enumValue;
|
||||
}
|
||||
throw new ArgumentException("在指定的枚举类型值中没有此描述的值");
|
||||
}
|
||||
public static EnumType GetValueByKey<EnumType>(this string name)
|
||||
{
|
||||
var type = typeof(EnumType);
|
||||
foreach (var enumName in Enum.GetNames(type))
|
||||
{
|
||||
var enumValue = Enum.Parse(type, enumName);
|
||||
if (name == ((Enum)enumValue).ToString())
|
||||
return (EnumType)enumValue;
|
||||
}
|
||||
throw new ArgumentException("在指定的枚举类型值中没有此描述的值");
|
||||
}
|
||||
public static List<string> GetDescriptions<T>() where T : Enum
|
||||
{
|
||||
return Enum.GetValues(typeof(T))
|
||||
.Cast<T>()
|
||||
.Select(e => GetDescription(e))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public static List<EnumModel> GetEnumList<EnumType>()
|
||||
{
|
||||
var type = typeof(EnumType);
|
||||
List<EnumModel> enumModels = new List<EnumModel>();
|
||||
foreach (var enumName in Enum.GetNames(type))
|
||||
{
|
||||
EnumModel enumModel = new EnumModel();
|
||||
enumModel.EnumString= enumName;
|
||||
var enumValue = Enum.Parse(type, enumName);
|
||||
enumModel.EnumDesc= ((Enum)enumValue).GetDescription();
|
||||
enumModel.EnumIntValue = int.Parse(((Enum)enumValue).ToString("D"));
|
||||
enumModels.Add(enumModel);
|
||||
}
|
||||
return enumModels;
|
||||
}
|
||||
|
||||
public static Parity GetParity(string name)
|
||||
{
|
||||
Parity parity = Parity.None;
|
||||
var arr = System.Enum.GetValues(typeof(Parity));
|
||||
foreach (Parity item in arr)
|
||||
{
|
||||
if (item.ToString() == name)
|
||||
{
|
||||
parity = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return parity;
|
||||
}
|
||||
|
||||
public static StopBits GetStopBits(string name)
|
||||
{
|
||||
StopBits stopBits = StopBits.One;
|
||||
var arr = System.Enum.GetValues(typeof(StopBits));
|
||||
foreach (StopBits item in arr)
|
||||
{
|
||||
if (item.ToString() == name)
|
||||
{
|
||||
stopBits = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return stopBits;
|
||||
}
|
||||
|
||||
public static Handshake GetHandshake(string name)
|
||||
{
|
||||
Handshake handshake = Handshake.None;
|
||||
var arr = System.Enum.GetValues(typeof(Handshake));
|
||||
foreach (Handshake item in arr)
|
||||
{
|
||||
if (item.ToString() == name)
|
||||
{
|
||||
handshake = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return handshake;
|
||||
}
|
||||
|
||||
public static bool IsDefined<T>(int value) where T : struct, Enum
|
||||
{
|
||||
return Enum.IsDefined(typeof(T), value);
|
||||
}
|
||||
|
||||
//public static T GetNext<T>(this T value) where T : struct, Enum
|
||||
//{
|
||||
// var values = Enum.GetValues(typeof(T)).Cast<T>().ToArray();
|
||||
// int currentIndex = Array.IndexOf(values, value);
|
||||
// if (currentIndex < values.Length - 1)
|
||||
// {
|
||||
// return values[currentIndex + 1];
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return values[0];
|
||||
// }
|
||||
//}
|
||||
|
||||
public static void GetEnum<T>(string a, ref T t)
|
||||
{
|
||||
foreach (T b in Enum.GetValues(typeof(T)))
|
||||
{
|
||||
if (GetDescription(b as Enum) == a)
|
||||
t = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
public class EnumModel
|
||||
{
|
||||
public string EnumString { get; set; }
|
||||
public string EnumDesc { get; set; }
|
||||
public int EnumIntValue { get; set; }
|
||||
}
|
||||
}
|
||||
733
Cowain.Bake.Common/Enums/SysEnum.cs
Normal file
@@ -0,0 +1,733 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common.Enums
|
||||
{
|
||||
public enum EDeviceState
|
||||
{
|
||||
[Description("自动运行")] Run = 0,
|
||||
[Description("待机")] Standby = 1,
|
||||
[Description("正常停机")] Stop = 2,
|
||||
[Description("故障停机")] FaultShutdown = 3,
|
||||
[Description("待料")] WaitingMaterials = 4,
|
||||
[Description("满料")] FullMaterial = 5,
|
||||
}
|
||||
|
||||
public enum EAlarmStationId
|
||||
{
|
||||
Mom = 10000,
|
||||
DevTemp = 10001,
|
||||
}
|
||||
|
||||
public enum EIsReverseOrder
|
||||
{
|
||||
[Description("正向")] Positive = 0,
|
||||
[Description("反向")] Reverse = 1,
|
||||
}
|
||||
|
||||
public enum EAgvMoveStatus
|
||||
{
|
||||
Error = -1,
|
||||
Wait = 0,
|
||||
Normal = 1,
|
||||
}
|
||||
public enum ETaskStatus
|
||||
{
|
||||
[Description("无任务")] None = 0,
|
||||
[Description("未执行")] UnExecute = 1,
|
||||
[Description("执行中")] Executing, //是不用的
|
||||
[Description("执行完成")] ExecutionCompleted,
|
||||
}
|
||||
public enum ETaskStep
|
||||
{
|
||||
[Description("无")] None = 0,
|
||||
[Description("未执行")] Unexecuted = 1,
|
||||
[Description("移至取位")] MoveFrom = 10,
|
||||
[Description("取盘")] Pick = 20,
|
||||
[Description("移至放位")] MoveTo = 11,
|
||||
[Description("放盘")] Place = 30,
|
||||
[Description("完成")] Finish = 50,
|
||||
}
|
||||
public enum EPalletDummyState
|
||||
{
|
||||
[Description("不带水满夹具")] Not_have = 0,
|
||||
[Description("带水满夹具")] Have = 1,
|
||||
[Description("不判断")] Null = 2,
|
||||
}
|
||||
public enum ETagType
|
||||
{
|
||||
[Description("通用")] General = 0,
|
||||
[Description("报警")] Alarm = 1,
|
||||
[Description("温度")] Temperature = 2,
|
||||
[Description("PID")] PID = 3,
|
||||
[Description("工艺参数")] ProcessParams = 4,
|
||||
[Description("逻辑处理")] LogicHandle = 5, //上下料回复
|
||||
[Description("电能表数据")] ElectricEnergy = 6,
|
||||
[Description("输出IO")] OutputSignal = 7, //输出的IO信号(BOOL类型)
|
||||
[Description("昨日耗电量")] YesterdayEnergy = 8,
|
||||
[Description("每日耗电量预警")] DayEnergyAlarmValue = 9,
|
||||
}
|
||||
public enum Direction
|
||||
{
|
||||
Up,
|
||||
Down,
|
||||
Left,
|
||||
Right
|
||||
}
|
||||
public enum DummyPlaceRule
|
||||
{
|
||||
[Description("每个夹具放一个(默认)")] EVERY_PALLET_PLACED_ONE = 1,
|
||||
[Description("每个炉层放一个")] DEFAULT_EVERY_STOVE_LAYER_PLACED_ONE,
|
||||
[Description("每个炉子均不放")] EVERY_STOVE_NOT_PLACED_ANY,
|
||||
}
|
||||
public enum EPalletStatus
|
||||
{
|
||||
//[Description("新盘托")] Init = 1,
|
||||
[Description("上料中")] Loading = 5,
|
||||
[Description("满载")] Advisable = 10,
|
||||
[Description("烘烤中")] Bake = 15,
|
||||
[Description("烘烤完成")] BakeOver = 20,
|
||||
[Description("待测结果")] WaitTest = 25,
|
||||
[Description("检测OK")] TestOK = 30,
|
||||
[Description("检测NG")] TestNG = 35,
|
||||
[Description("下料中")] Blank = 40,
|
||||
[Description("空夹具")] BlankOver = 45,
|
||||
[Description("维修")] Maintain = 50,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否最后一盘
|
||||
/// </summary>
|
||||
public enum EPalletLast
|
||||
{
|
||||
[Description("否")]
|
||||
NoLast = 0,
|
||||
|
||||
[Description("是")]
|
||||
YesLast = 1,
|
||||
}
|
||||
|
||||
public enum EStatusCode
|
||||
{
|
||||
[Description("未知")] UnKnow = 0,
|
||||
[Description("运行")] Runing = 1,
|
||||
[Description("待机")] Wait = 2,
|
||||
[Description("报警")] Warn = 3,
|
||||
[Description("宕机")] Deal,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 炉子运行状态
|
||||
/// </summary>
|
||||
public enum EStoveWorkMode
|
||||
{
|
||||
[Description("空闲")] Free = 0,
|
||||
[Description("待机")] Standby = 1,
|
||||
[Description("停止")] Stop = 2,
|
||||
[Description("工作")] Working = 3,
|
||||
[Description("保压")] Pressurizing,
|
||||
}
|
||||
|
||||
public enum EStoveSignal
|
||||
{
|
||||
[Description("初始化完成信号")]
|
||||
Initialed,
|
||||
|
||||
[Description("露点温度")]
|
||||
DewTemperature,
|
||||
|
||||
[Description("开门到位信号")]
|
||||
OpenDoorPlace,
|
||||
|
||||
[Description("关门到位信号")]
|
||||
CloseDoorPlace,
|
||||
|
||||
[Description("左夹具到位信号")]
|
||||
TrayDetection1,
|
||||
|
||||
[Description("右夹具到位信号")]
|
||||
TrayDetection2,
|
||||
|
||||
[Description("烘烤完成状态")]
|
||||
BakingMark,
|
||||
|
||||
[Description("远程/本地模式")]
|
||||
Remote, //true:远程, false:本地
|
||||
|
||||
[Description("温度")]
|
||||
Temperature,
|
||||
|
||||
[Description("PID输出值")]
|
||||
PID,
|
||||
|
||||
[Description("真空值")]
|
||||
Vacuum,
|
||||
|
||||
[Description("工作时长")] //2024-10-12
|
||||
WorkTime,
|
||||
|
||||
[Description("总工作时长")]
|
||||
TotalWorkTime,
|
||||
|
||||
[Description("系统状态寄存器")]
|
||||
CavityStatus,
|
||||
|
||||
[Description("腔体信号计数")]
|
||||
CountCavitySignal,
|
||||
|
||||
[Description("初始化请求")]
|
||||
Initial,
|
||||
|
||||
[Description("开门请求")]
|
||||
OpenDoor,
|
||||
|
||||
[Description("关门请求")]
|
||||
CloseDoor,
|
||||
|
||||
[Description("心跳")]
|
||||
Heartbeat,
|
||||
|
||||
[Description("托盘记忆1")]
|
||||
Tray1,
|
||||
|
||||
[Description("托盘记忆2")]
|
||||
Tray2,
|
||||
|
||||
[Description("下发参数完成(开始烘烤)")]
|
||||
BakingStart,
|
||||
|
||||
[Description("参数_层烘烤使能")]
|
||||
HeatEnableStep,
|
||||
|
||||
[Description("参数_设定温度")]
|
||||
SetTemp,
|
||||
|
||||
[Description("参数_温度公差")]
|
||||
TemperatureTolerance,
|
||||
|
||||
[Description("参数_温度上限")]
|
||||
TemperatureLimit,
|
||||
|
||||
[Description("参数_真空到达值")]
|
||||
VacuumArriveValue,
|
||||
|
||||
[Description("参数_真空上限")]
|
||||
VacuumUpValue,
|
||||
|
||||
[Description("参数_真空下限")]
|
||||
VacuumDownValue,
|
||||
|
||||
[Description("参数_氮气到达值")]
|
||||
NitrogenArriveValue,
|
||||
|
||||
[Description("参数_氮气上限")]
|
||||
NitrogenUpValue,
|
||||
|
||||
[Description("参数_氮气下限")]
|
||||
NitrogenDownValue,
|
||||
|
||||
[Description("参数_常压到达值")]
|
||||
AtmosphericArriveValue,
|
||||
|
||||
[Description("参数_常压上限")]
|
||||
AtmosphericUpValue,
|
||||
|
||||
[Description("参数_常压下限")]
|
||||
AtmosphericDownValue,
|
||||
|
||||
[Description("参数_循环启动工步")]
|
||||
CycleStartStep,
|
||||
|
||||
[Description("参数_循环结束工步")]
|
||||
CycleEndStep,
|
||||
|
||||
[Description("参数_循环次数")]
|
||||
CycleNumber,
|
||||
|
||||
[Description("参数_加热启用")]
|
||||
HeatingEnabled,
|
||||
|
||||
[Description("参数_真空启用")]
|
||||
VacuumEnabled,
|
||||
|
||||
[Description("参数_氮气启用")]
|
||||
NitrogenEnabled,
|
||||
|
||||
[Description("参数_工步时间")]
|
||||
StepWorkTime,
|
||||
|
||||
[Description("温度上限预警值")]
|
||||
TemperatureUpperWarnValue,
|
||||
|
||||
[Description("真空上限预警值")]
|
||||
VacuumUpperWarnValue,
|
||||
}
|
||||
|
||||
public enum EMesLogClass
|
||||
{
|
||||
[Description("心跳")] EqptAlive = 1,
|
||||
[Description("设备状态")] Status,
|
||||
[Description("设备报警")] Alarm,
|
||||
[Description("参数请求")] ParameterRequest,
|
||||
[Description("参数变更")] ParameterChange,
|
||||
[Description("联机请求")] EqptRun,
|
||||
[Description("电芯状态获取")] GetCellState,
|
||||
[Description("电芯进站")] EnterStation,
|
||||
[Description("烘烤过程参数采集")] BakingParameter,
|
||||
[Description("电芯出站")] ExitStation,
|
||||
}
|
||||
|
||||
public enum EWindowsRowType
|
||||
{
|
||||
Upper = 1,
|
||||
Mid = 2,
|
||||
Lower = 3
|
||||
}
|
||||
|
||||
public enum EKeyFlag
|
||||
{
|
||||
OK = 0,
|
||||
NG = 1,
|
||||
ProcessParam = 2
|
||||
}
|
||||
public enum EMenuType
|
||||
{
|
||||
[Description("视图")] Region = 1,
|
||||
[Description("功能开关")] FunctionSwitch,
|
||||
[Description("弹屏")] ShowDialog,
|
||||
[Description("指令")] Cmd,
|
||||
[Description("下拉框")] DropDown,
|
||||
}
|
||||
|
||||
public enum ESkin
|
||||
{
|
||||
[Description("本色(默认)")] VS2010Theme = 0,
|
||||
[Description("半透明风格")] Aero,
|
||||
[Description("Office 2013 蓝色")] Vs2013BlueTheme,
|
||||
[Description("Office 2013 深色")] Vs2013DarkTheme,
|
||||
[Description("Office 2013 浅色")] Vs2013LightTheme,
|
||||
[Description("深色风格")] ExpressionDark,
|
||||
//[Description("商务")] Background01_png, //商务
|
||||
//[Description("科技")] background0_png, //科技
|
||||
//[Description("机械")] back1_png, //机械
|
||||
//[Description("机械手")] backtest5_png, //机械手
|
||||
//[Description("红树林")] backtest1_jpg, //红树林
|
||||
//[Description("海边灯塔")] backtest2_jpg, //海边灯塔
|
||||
//[Description("深林湖边")] backtest4_jpg //深林湖边
|
||||
}
|
||||
|
||||
public enum EBatteryStatus
|
||||
{
|
||||
[Description("初始值")]
|
||||
Initialise = 0,
|
||||
[Description("入站验证失败")]
|
||||
PullInFail = 5,
|
||||
[Description("扫码完成")]
|
||||
ScanOver = 10,
|
||||
[Description("进入托盘")]
|
||||
ToPallet = 20,
|
||||
[Description("待水含量测试")]
|
||||
ToWaterPlatform = 30,
|
||||
[Description("已经出站")]
|
||||
Over = 40,
|
||||
[Description("记录出站")]
|
||||
OutBoundRecord = 50,
|
||||
}
|
||||
|
||||
public enum EMesUpLoadStatus
|
||||
{
|
||||
[Description("待发送")] Wait,
|
||||
[Description("待发送")] Fail,
|
||||
[Description("发送成功")] Success,
|
||||
}
|
||||
|
||||
public enum ECavityStatus
|
||||
{
|
||||
[Description("未知")] None,
|
||||
[Description("请放")] RequestPlace = 10, //请求放盘
|
||||
[Description("请取")] RequestPick = 20, //请求取盘
|
||||
}
|
||||
|
||||
public enum EStartAllow //启动允许
|
||||
{
|
||||
[Description("不允许")] Not = 0,
|
||||
[Description("允许")] Ok,
|
||||
}
|
||||
|
||||
|
||||
public enum EDeviceStatus //设备状态
|
||||
{
|
||||
[Description("未知")] None = 0,
|
||||
[Description("自动运行中")] Auto = 1,
|
||||
[Description("停止中")] Stop,
|
||||
[Description("启动中")] Start,
|
||||
[Description("准备OK")] Ready,
|
||||
[Description("初始化中")] Init,
|
||||
[Description("报警中")] Alarm,
|
||||
[Description("手动模式")] Manual,
|
||||
[Description("维修模式")] Maintain,
|
||||
[Description("模式未选择")] NotSelected,
|
||||
}
|
||||
|
||||
public enum EDummyState
|
||||
{
|
||||
[Description("正常电芯")]
|
||||
NotHave = 0,
|
||||
|
||||
[Description("水含量电芯")]
|
||||
Have = 1,
|
||||
}
|
||||
|
||||
public enum EScanCode
|
||||
{
|
||||
[Description("上料1#扫码枪")] LoadingBatteryScan1 = 1,
|
||||
[Description("上料2#扫码枪")] LoadingBatteryScan2,
|
||||
[Description("上料3#扫码枪")] LoadingBatteryScan3,
|
||||
[Description("上料4#扫码枪")] LoadingBatteryScan4,
|
||||
[Description("上料5#扫码枪")] LoadingBatteryScan5,
|
||||
[Description("上料6#扫码枪")] LoadingBatteryScan6,
|
||||
[Description("上料7#扫码枪")] LoadingBatteryScan7,
|
||||
[Description("上料8#扫码枪")] LoadingBatteryScan8,
|
||||
[Description("上料假电池扫码枪")] DummyScan,
|
||||
[Description("1#托盘扫码枪")] PalletScan1,
|
||||
[Description("2#托盘扫码枪")] PalletScan2,
|
||||
[Description("下料1#扫码枪")] UnLoadingBatteryScan1,
|
||||
[Description("下料2#扫码枪")] UnLoadingBatteryScan2,
|
||||
[Description("下料3#扫码枪")] UnLoadingBatteryScan3,
|
||||
[Description("下料4#扫码枪")] UnLoadingBatteryScan4,
|
||||
[Description("下料5#扫码枪")] UnLoadingBatteryScan5,
|
||||
[Description("下料6#扫码枪")] UnLoadingBatteryScan6,
|
||||
[Description("下料7#扫码枪")] UnLoadingBatteryScan7,
|
||||
[Description("下料8#扫码枪")] UnLoadingBatteryScan8,
|
||||
}
|
||||
public enum ESysSetup
|
||||
{
|
||||
[Description("工序名称")] ProcessName,
|
||||
[Description("设备编号")] DeviceNum,
|
||||
[Description("产线编号")] Line,
|
||||
[Description("白班开始时间")] DayShift,
|
||||
[Description("晚班开始时间")] NightShift,
|
||||
[Description("假电池位置X")] DummyLocationX,
|
||||
[Description("假电池位置Y")] DummyLocationY,
|
||||
[Description("MOM状态模式")] MOMMode,
|
||||
[Description("采集周期(ms)")] ReadPLCCycle,
|
||||
[Description("数据采集周期(秒)")] DataCollectionCycle,
|
||||
[Description("生产模式(0为调试模式,1为正式模式)")] DebugMode, //只用于扫码还是生成条码
|
||||
[Description("是否启用MOM(0为调试模式,1为正式模式)")] MOMEnable,
|
||||
[Description("扫码模式")] ScanCodeMode, //0:正常扫码,1:复投扫码
|
||||
[Description("数据文件路径")] DataFilePath, //数据路径
|
||||
[Description("电芯条码长度")] BatteryCodeLen, //
|
||||
[Description("隔膜含水量判断(小于)")] SeptumwaterTargetJudge,
|
||||
[Description("负极片含水量判断(小于)")] CathodewaterTargetJudge,
|
||||
[Description("正极片含水量判断(小于)")] AnodewaterTargetJudge,
|
||||
[Description("露点温度报警阈值")] DewTempAlarmTargetValue,
|
||||
}
|
||||
public enum EDeviceType
|
||||
{
|
||||
/*
|
||||
name:用于类型,对应数据库的DType
|
||||
Description:用于找查,对应数据库的Name,另外还有一个编号
|
||||
*/
|
||||
[Description("PLC")] PLC = 1,
|
||||
[Description("MOM")] MOM,
|
||||
[Description("扫码枪")] SCANNER,
|
||||
}
|
||||
|
||||
public enum EParamType
|
||||
{
|
||||
[Description("系统参数")] Sys = 1,
|
||||
[Description("启用参数")] Enable,
|
||||
[Description("MOM联机")] MOM,
|
||||
}
|
||||
|
||||
public enum EDeviceName
|
||||
{
|
||||
[Description("Plc1")] StovePlc1 = 1,
|
||||
[Description("Plc2")] StovePlc2,
|
||||
[Description("Plc3")] StovePlc3,
|
||||
[Description("Plc4")] StovePlc4,
|
||||
[Description("Plc5")] StovePlc5,
|
||||
[Description("上料机")] Loading,
|
||||
[Description("Robot")] AGV,
|
||||
[Description("MOM")] Mom,
|
||||
}
|
||||
public enum EDispatchMode
|
||||
{
|
||||
[Description("自动")]
|
||||
Auto = 1,
|
||||
|
||||
[Description("手动")]
|
||||
Manual = 2,
|
||||
}
|
||||
|
||||
public enum EStationType
|
||||
{
|
||||
[Description("烤箱")] Stove = 1,
|
||||
[Description("上料机")] Loading,
|
||||
[Description("下料机")] UnLoading,
|
||||
[Description("人工上料台")] ManualPlat,
|
||||
[Description("AGV")] AGV,
|
||||
[Description("扫码工站")] ScannCode
|
||||
}
|
||||
public enum EAgvPLC
|
||||
{
|
||||
//写PLC
|
||||
[Description("心跳")] FromWcsHeart,
|
||||
[Description("命令号")] Command,
|
||||
[Description("命令计数")] Count,
|
||||
[Description("取-工位号")] FromStation,
|
||||
[Description("取-行号")] FromRow,
|
||||
[Description("取-列号")] FromCol,
|
||||
[Description("放-工位号")] ToStation,
|
||||
[Description("放-行号")] ToRow,
|
||||
[Description("放-列号")] ToCol,
|
||||
//读PLC
|
||||
[Description("反馈心跳")] ToWcsHeart,
|
||||
[Description("反馈上位机命令")] RetCommand,
|
||||
[Description("反馈上位机命令计数")] RetCount,
|
||||
[Description("反馈上位机结果")] ToWcsResult,
|
||||
|
||||
}
|
||||
public enum EAgvStatus
|
||||
{
|
||||
[Description("未初始化")] None,
|
||||
[Description("待机")] Standby,
|
||||
[Description("运行")] Working,
|
||||
[Description("停止中")] Stop,
|
||||
[Description("异常")] Fail,
|
||||
}
|
||||
|
||||
|
||||
public enum EProductionMode //MES有这二种MES
|
||||
{
|
||||
[Description("调试模式")] Debug,
|
||||
[Description("正常模式")] Normal,
|
||||
}
|
||||
|
||||
public enum EOperTypePLC
|
||||
{
|
||||
Readable = 1,
|
||||
Writable = 2,
|
||||
ReadWrite = 3
|
||||
}
|
||||
|
||||
public enum EResultFlag //这个是MOM的
|
||||
{
|
||||
OK,
|
||||
NG
|
||||
}
|
||||
public enum EResult
|
||||
{
|
||||
OK = 1,
|
||||
NG = 2
|
||||
}
|
||||
|
||||
//public enum EAgvResult
|
||||
//{
|
||||
// NG = -1,
|
||||
// OK = 1,
|
||||
//}
|
||||
///// <summary>
|
||||
///// 日志枚举类型
|
||||
///// </summary>
|
||||
public enum E_LogType
|
||||
{
|
||||
[Description("调试信息")] Debug = 0,
|
||||
[Description("提示")] Info = 1,
|
||||
[Description("警告")] Warn = 2,
|
||||
[Description("错误")] Error = 3,
|
||||
[Description("致命错误")] Fatal = 4,
|
||||
[Description("操作日志")] Operate = 5,
|
||||
[Description("跟踪")] Trace,
|
||||
[Description("全部")] All,
|
||||
}
|
||||
|
||||
public enum EAlarmStatus
|
||||
{
|
||||
[Description("恢复")] Renew,
|
||||
[Description("报警")] Alert,
|
||||
[Description("警告")] Warn
|
||||
}
|
||||
|
||||
|
||||
public enum EMOMMode
|
||||
{
|
||||
[Description("联机模式")] OnLine, //MOM会给设备下达工艺参数信息,设备出入站要判断MOM回复信息是否尾OK值,如果反馈NG需要将电芯放入到NG口
|
||||
[Description("离线模式")] OffLine, //设备需要单机记录所有的生产信息以便MOM回复后上传信息
|
||||
[Description("调机模式")] DebugMachine //设备运行修改MOM提供的工艺参数,正常调用出入站接口,所有这个模式下产出的电芯都需要放入到NG口待人为判定是否可以进入下一站。调机结束后需要再次调用本接口,恢复为联机模式,MOM重新下达工艺参数信息
|
||||
}
|
||||
|
||||
public enum EMOMEnable
|
||||
{
|
||||
[Description("不启用")] Disable,
|
||||
[Description("启用")] Enable,
|
||||
}
|
||||
|
||||
public enum EDataType
|
||||
{
|
||||
[Description("System.Boolean")] BOOL,
|
||||
[Description("System.UInt16")] UINT16,
|
||||
[Description("System.Int16")] INT16,
|
||||
[Description("System.UInt32")] UINT32,
|
||||
[Description("System.Int32")] INT32,
|
||||
[Description("System.String")] STR,
|
||||
[Description("System.Single")] FLOAT, //REAL-FLOAT 一样
|
||||
[Description("System.Double")] DOUBLE,
|
||||
[Description("System.Single")] REAL, //REAL-FLOAT 一样
|
||||
}
|
||||
|
||||
public enum ERole
|
||||
{
|
||||
[Description("管理员")]
|
||||
Admin = 1,
|
||||
|
||||
[Description("操作员")]
|
||||
Operater,
|
||||
|
||||
[Description("维修员")]
|
||||
Mantainer
|
||||
}
|
||||
|
||||
public enum EValidStatus
|
||||
{
|
||||
[Description("无效")]
|
||||
Invalid,
|
||||
[Description("有效")]
|
||||
Valid
|
||||
}
|
||||
|
||||
|
||||
public enum OperTypeEnum
|
||||
{
|
||||
[Description("读")]
|
||||
ParamRead,
|
||||
[Description("写")]
|
||||
ParamWrite,
|
||||
[Description("读写")]
|
||||
ParamReadWrite
|
||||
}
|
||||
|
||||
public enum EStovePLC
|
||||
{
|
||||
[Description("初始化完成信号")]
|
||||
Initialed,
|
||||
|
||||
[Description("开门到位信号")]
|
||||
OpenDoorPlace,
|
||||
|
||||
[Description("关门到位信号")]
|
||||
CloseDoorPlace,
|
||||
|
||||
[Description("左夹具到位信号")]
|
||||
TrayDetection1,
|
||||
|
||||
[Description("右夹具到位信号")]
|
||||
TrayDetection2,
|
||||
|
||||
[Description("烘烤完成状态")]
|
||||
BakingMark,
|
||||
|
||||
[Description("远程/本地模式")]
|
||||
Remote, //true:远程, false:本地
|
||||
|
||||
[Description("温度")]
|
||||
Temperature,
|
||||
|
||||
[Description("真空值")]
|
||||
Vacuum,
|
||||
|
||||
[Description("工作时长")] //2024-10-12
|
||||
WorkTime,
|
||||
|
||||
[Description("系统状态寄存器")]
|
||||
CavityStatus,
|
||||
|
||||
[Description("初始化请求")]
|
||||
Initial,
|
||||
|
||||
[Description("开门请求")]
|
||||
OpenDoor,
|
||||
|
||||
[Description("关门请求")]
|
||||
CloseDoor,
|
||||
|
||||
[Description("心跳")]
|
||||
Heartbeat,
|
||||
|
||||
[Description("托盘记忆1")]
|
||||
Tray1,
|
||||
|
||||
[Description("托盘记忆2")]
|
||||
Tray2,
|
||||
|
||||
[Description("下发参数完成(开始烘烤)")]
|
||||
BakingStart,
|
||||
|
||||
[Description("参数_设定温度")]
|
||||
SetTemp,
|
||||
|
||||
[Description("参数_温度公差")]
|
||||
TemperatureTolerance,
|
||||
|
||||
[Description("参数_温度上限")]
|
||||
TemperatureLimit,
|
||||
|
||||
[Description("参数_真空到达值")]
|
||||
VacuumArriveValue,
|
||||
|
||||
[Description("参数_真空上限")]
|
||||
VacuumUpValue,
|
||||
|
||||
[Description("参数_真空下限")]
|
||||
VacuumDownValue,
|
||||
|
||||
[Description("参数_氮气到达值")]
|
||||
NitrogenArriveValue,
|
||||
|
||||
[Description("参数_氮气上限")]
|
||||
NitrogenUpValue,
|
||||
|
||||
[Description("参数_氮气下限")]
|
||||
NitrogenDownValue,
|
||||
|
||||
[Description("参数_常压到达值")]
|
||||
AtmosphericArriveValue,
|
||||
|
||||
[Description("参数_常压上限")]
|
||||
AtmosphericUpValue,
|
||||
|
||||
[Description("参数_常压下限")]
|
||||
AtmosphericDownValue,
|
||||
|
||||
[Description("参数_循环启动工步")]
|
||||
CycleStartStep,
|
||||
|
||||
[Description("参数_循环结束工步")]
|
||||
CycleEndStep,
|
||||
|
||||
[Description("参数_循环次数")]
|
||||
CycleNumber,
|
||||
|
||||
[Description("参数_加热启用")]
|
||||
HeatingEnabled,
|
||||
|
||||
[Description("参数_真空启用")]
|
||||
VacuumEnabled,
|
||||
|
||||
[Description("参数_氮气启用")]
|
||||
NitrogenEnabled,
|
||||
|
||||
[Description("参数_工步时间")]
|
||||
StepWorkTime,
|
||||
|
||||
[Description("温度上限预警值")]
|
||||
TemperatureUpperWarnValue,
|
||||
|
||||
[Description("真空上限预警值")]
|
||||
VacuumUpperWarnValue,
|
||||
}
|
||||
}
|
||||
BIN
Cowain.Bake.Common/Fonts/iconfont.ttf
Normal file
78
Cowain.Bake.Common/Global.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
using Cowain.Bake.Common.Core;
|
||||
using Cowain.Bake.Model;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cowain.Bake.Common
|
||||
{
|
||||
public static class Global
|
||||
{
|
||||
public static string VS = " (V1.0.0.10)";
|
||||
public const int MAX_READS = 1; //最大读取PLC次数
|
||||
//public const int LAYER_IN_PALLET = 1;
|
||||
public const int MAX_TCP_READ_OUTTIME = 500;
|
||||
public const int SCANCODE_COUNT = 3; //扫码次数
|
||||
public const int HEARTBEAT_INTERVAL_TIME = 10000;
|
||||
public const int MAX_QUEUE_SIGNAL = 15;
|
||||
public static bool AppExit = false;
|
||||
public static int SECONDS_TO_MILLISCONDS = 1000;
|
||||
public static int WINDOWS_CONTROLS_HEAD_HIGHT = 30;
|
||||
public static int STOVE_LAYERS = 14;
|
||||
public static int PALLET_ROWS = SettingProvider.Instance.PalletRows; //7;
|
||||
public static int PALLET_COLS = SettingProvider.Instance.PalletCols;
|
||||
public static int PALLET_TOTAL_BATTERYS = PALLET_ROWS * PALLET_COLS;
|
||||
public static int PALLET_MAX_BATTERYS = 301;
|
||||
public static int STOVE_MAX_LAYERS = 21;
|
||||
public const int ONCE_SCAN_BATTERY = 8; //一次扫码几个电芯
|
||||
public const int MAX_LOG_QTY = 100;
|
||||
public const int DEW_STOVE_NUMBER = 3;
|
||||
|
||||
/// <summary>
|
||||
/// 是否测试模式(1为正式生产,0为调试模式)
|
||||
/// </summary>
|
||||
public static bool DebugMode = true;
|
||||
}
|
||||
|
||||
|
||||
public static class MyPath
|
||||
{
|
||||
public const string MAIN_APP = "D:\\Bake";
|
||||
public const string PLC = "Cowain.Bake.Communication.PLC.";
|
||||
public const string SCAN = "Cowain.Bake.Communication.Scan.";
|
||||
public const string TESTER = "Cowain.Bake.Communication.Tester.";
|
||||
public const string SCALE = "Cowain.Bake.Communication.ElectronicScale.";
|
||||
public const string PRINTER = "Cowain.Bake.Communication.Printer.";
|
||||
public const string SIGNAL_TRIGGER = "Cowain.Bake.Main.Station.";
|
||||
public const string HEAD_CMD = "Cowain.Bake.Main.Common.HeaderCMD";
|
||||
public const string MES_INTERFACE = @"D:\MOMlog\{0}\{1}\{2}\{3}\{4}.csv";
|
||||
public const string SYS_LOG = @"D:\SysLog\{0}\{1}\{2}\{3}.csv";//D:\MESDATE\MES \年份\月份\日期\流水号.csv,
|
||||
public const string MOMDATE = @"D:\MOMDATE\MES\{0}\{1}\{2}\{3}.csv";//设备本地日志文件
|
||||
}
|
||||
|
||||
public static class MyAgvPath
|
||||
{
|
||||
//imageSource = "file:///E:/svn/DryingStove/branch/得壹烘烤线6098-006/src/Cowain.Bake.Main/Images/png/RgvError.png"; //绝对路径
|
||||
public const string Normal = "pack://application:,,,/Cowain.Bake.Main;component/Images/png/RgvMove.png";
|
||||
public const string Error = "pack://application:,,,/Cowain.Bake.Main;component/Images/png/RgvError.png";
|
||||
public const string Wait = "pack://application:,,,/Cowain.Bake.Main;component/Images/png/RgvWait.png";
|
||||
}
|
||||
public static class ReflexFun
|
||||
{
|
||||
public const string OPC_READ_GROUPS = "ReadGroups";
|
||||
public const string OPC_READ_SINGLES = "ReadSingles";
|
||||
public const string TRIG_INSTANCE = "TrigInstance";
|
||||
public const string TRIG_REPLY = "TrigReply";
|
||||
public const string TRIG_FUNC = "TrigFunc";
|
||||
public const string OPC_WRITE_NODE = "WriteNode";
|
||||
public const string OPC_WRITE_NODES = "WriteNodes";
|
||||
public const string OBJECT_TO_T = "ObjectToT";
|
||||
}
|
||||
|
||||
public static class ProcessParas
|
||||
{
|
||||
public static List<TProcessParameter> processParameters { get; set; }
|
||||
public static string StopReason { get; set; }
|
||||
public static string Equipment { get; set; }
|
||||
public static string Equipment2 { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
BIN
Cowain.Bake.Common/Images/Auto.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
Cowain.Bake.Common/Images/CN-EN.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Cowain.Bake.Common/Images/Cowain.jpg
Normal file
|
After Width: | Height: | Size: 252 KiB |
BIN
Cowain.Bake.Common/Images/CowainLogo.jpg
Normal file
|
After Width: | Height: | Size: 114 KiB |
BIN
Cowain.Bake.Common/Images/CowainLogo.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
Cowain.Bake.Common/Images/Manual.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
Cowain.Bake.Common/Images/exit.png
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
Cowain.Bake.Common/Images/gongju1.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
Cowain.Bake.Common/Images/gongyezujian-kaiguan.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
Cowain.Bake.Common/Images/help-fill.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
Cowain.Bake.Common/Images/shuru.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
Cowain.Bake.Common/Images/skin.png
Normal file
|
After Width: | Height: | Size: 705 B |
BIN
Cowain.Bake.Common/Images/zhuye.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
24
Cowain.Bake.Common/Interface/ICommonFun.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Cowain.Bake.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Unity;
|
||||
using static Cowain.Bake.Common.Models.MESModel;
|
||||
|
||||
namespace Cowain.Bake.Common.Interface
|
||||
{
|
||||
public interface ICommonFun
|
||||
{
|
||||
void ModifyOrderNum();
|
||||
bool ManualTaskCmd(TTaskRecord task, short cmd);
|
||||
|
||||
void InitWindows();
|
||||
|
||||
void SetBatteryCodeLen();
|
||||
string ManualMesOutUnBinding(TPalletInfo palletInfo, TBatteryInfo battery);
|
||||
|
||||
MESReturnCmdModel SendData(string info); //发送
|
||||
}
|
||||
}
|
||||
13
Cowain.Bake.Common/Interface/IDeviceDebug.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common.Interface
|
||||
{
|
||||
public interface IDeviceDebug
|
||||
{
|
||||
object ExecDebug(string trigJson, string json); //Variable node string trigInfo, string replyJosn
|
||||
}
|
||||
}
|
||||
14
Cowain.Bake.Common/Interface/IRecvMesHttp.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common.Interface
|
||||
{
|
||||
public interface IRecvMesHttp
|
||||
{
|
||||
string RecvInfo(HttpListenerRequest request);
|
||||
}
|
||||
}
|
||||
18
Cowain.Bake.Common/Interface/IServerManager.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Unity;
|
||||
|
||||
namespace Cowain.Bake.Common.Interface
|
||||
{
|
||||
public interface IServerManager
|
||||
{
|
||||
string Name { get; set; }
|
||||
IUnityContainer _unityContainer { set; get; }
|
||||
|
||||
void Start();
|
||||
void Stop();
|
||||
}
|
||||
}
|
||||
16
Cowain.Bake.Common/Interface/ITrigService.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Cowain.Bake.Model.Models;
|
||||
using Opc.Ua;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common.Interface
|
||||
{
|
||||
public interface ITrigService
|
||||
{
|
||||
void RecvTrigInfo(DataValue data, Variable node); //Variable node string trigInfo, string replyJosn
|
||||
|
||||
}
|
||||
}
|
||||
118
Cowain.Bake.Common/MiniDump.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common
|
||||
{
|
||||
public static class MiniDump
|
||||
{
|
||||
[Flags]
|
||||
public enum Option : uint
|
||||
{
|
||||
// From dbghelp.h:
|
||||
Normal = 0x00000000,
|
||||
WithDataSegs = 0x00000001,
|
||||
WithFullMemory = 0x00000002,
|
||||
WithHandleData = 0x00000004,
|
||||
FilterMemory = 0x00000008,
|
||||
ScanMemory = 0x00000010,
|
||||
WithUnloadedModules = 0x00000020,
|
||||
WithIndirectlyReferencedMemory = 0x00000040,
|
||||
FilterModulePaths = 0x00000080,
|
||||
WithProcessThreadData = 0x00000100,
|
||||
WithPrivateReadWriteMemory = 0x00000200,
|
||||
WithoutOptionalData = 0x00000400,
|
||||
WithFullMemoryInfo = 0x00000800,
|
||||
WithThreadInfo = 0x00001000,
|
||||
WithCodeSegs = 0x00002000,
|
||||
WithoutAuxiliaryState = 0x00004000,
|
||||
WithFullAuxiliaryState = 0x00008000,
|
||||
WithPrivateWriteCopyMemory = 0x00010000,
|
||||
IgnoreInaccessibleMemory = 0x00020000,
|
||||
ValidTypeFlags = 0x0003ffff,
|
||||
}
|
||||
|
||||
enum ExceptionInfo
|
||||
{
|
||||
None,
|
||||
Present
|
||||
}
|
||||
|
||||
//typedef struct _MINIDUMP_EXCEPTION_INFORMATION {
|
||||
// DWORD ThreadId;
|
||||
// PEXCEPTION_POINTERS ExceptionPointers;
|
||||
// BOOL ClientPointers;
|
||||
//} MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 4)] // Pack=4 is important! So it works also for x64!
|
||||
struct MiniDumpExceptionInformation
|
||||
{
|
||||
public uint ThreadId;
|
||||
public IntPtr ExceptionPointers;
|
||||
[MarshalAs(UnmanagedType.Bool)]
|
||||
public bool ClientPointers;
|
||||
}
|
||||
|
||||
//BOOL
|
||||
//WINAPI
|
||||
//MiniDumpWriteDump(
|
||||
// __in HANDLE hProcess,
|
||||
// __in DWORD ProcessId,
|
||||
// __in HANDLE hFile,
|
||||
// __in MINIDUMP_TYPE DumpType,
|
||||
// __in_opt PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam,
|
||||
// __in_opt PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
|
||||
// __in_opt PMINIDUMP_CALLBACK_INFORMATION CallbackParam
|
||||
// );
|
||||
// Overload requiring MiniDumpExceptionInformation
|
||||
[DllImport("dbghelp.dll", EntryPoint = "MiniDumpWriteDump", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
|
||||
|
||||
static extern bool MiniDumpWriteDump(IntPtr hProcess, uint processId, SafeHandle hFile, uint dumpType, ref MiniDumpExceptionInformation expParam, IntPtr userStreamParam, IntPtr callbackParam);
|
||||
|
||||
// Overload supporting MiniDumpExceptionInformation == NULL
|
||||
[DllImport("dbghelp.dll", EntryPoint = "MiniDumpWriteDump", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
|
||||
static extern bool MiniDumpWriteDump(IntPtr hProcess, uint processId, SafeHandle hFile, uint dumpType, IntPtr expParam, IntPtr userStreamParam, IntPtr callbackParam);
|
||||
|
||||
[DllImport("kernel32.dll", EntryPoint = "GetCurrentThreadId", ExactSpelling = true)]
|
||||
static extern uint GetCurrentThreadId();
|
||||
|
||||
static bool Write(SafeHandle fileHandle, Option options, ExceptionInfo exceptionInfo)
|
||||
{
|
||||
Process currentProcess = Process.GetCurrentProcess();
|
||||
IntPtr currentProcessHandle = currentProcess.Handle;
|
||||
uint currentProcessId = (uint)currentProcess.Id;
|
||||
MiniDumpExceptionInformation exp;
|
||||
exp.ThreadId = GetCurrentThreadId();
|
||||
exp.ClientPointers = false;
|
||||
exp.ExceptionPointers = IntPtr.Zero;
|
||||
if (exceptionInfo == ExceptionInfo.Present)
|
||||
{
|
||||
exp.ExceptionPointers = Marshal.GetExceptionPointers();
|
||||
}
|
||||
return exp.ExceptionPointers == IntPtr.Zero ? MiniDumpWriteDump(currentProcessHandle, currentProcessId, fileHandle, (uint)options, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) : MiniDumpWriteDump(currentProcessHandle, currentProcessId, fileHandle, (uint)options, ref exp, IntPtr.Zero, IntPtr.Zero);
|
||||
}
|
||||
|
||||
static bool Write(SafeHandle fileHandle, Option dumpType)
|
||||
{
|
||||
return Write(fileHandle, dumpType, ExceptionInfo.None);
|
||||
}
|
||||
|
||||
public static Boolean TryDump(String dmpPath, Option dmpType = Option.Normal)
|
||||
{
|
||||
var path = Path.Combine(Environment.CurrentDirectory, dmpPath);
|
||||
var dir = Path.GetDirectoryName(path);
|
||||
if (dir != null && !Directory.Exists(dir))
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
}
|
||||
using (var fs = new FileStream(path, FileMode.Create))
|
||||
{
|
||||
return Write(fs.SafeFileHandle, dmpType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Cowain.Bake.Common/Models/CommonModel.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common.Models
|
||||
{
|
||||
public class ProceParamList
|
||||
{
|
||||
public string ParameterCode { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string TargetValue { get; set; }
|
||||
}
|
||||
public class AddrValue
|
||||
{
|
||||
public string Addr { get; set; }
|
||||
public object Value { get; set; }
|
||||
}
|
||||
public class SignalEvent
|
||||
{
|
||||
public string InfoName { get; set; } //枚举名
|
||||
public string InfoDesc { get; set; } //描述
|
||||
public int DetailNumber { get; set; } //编号
|
||||
public DateTime RecvTime { get; set; }//时间
|
||||
}
|
||||
|
||||
public class SizeAndLocationModel
|
||||
{
|
||||
public double Left { get; set; }
|
||||
public double Top { get; set; }
|
||||
public double Width { get; set; }
|
||||
public double Height { get; set; }
|
||||
}
|
||||
}
|
||||
296
Cowain.Bake.Common/Models/MESModel.cs
Normal file
@@ -0,0 +1,296 @@
|
||||
using Cowain.Bake.Common.Enums;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Unity;
|
||||
|
||||
namespace Cowain.Bake.Common.Models
|
||||
{
|
||||
public class MESModel
|
||||
{
|
||||
|
||||
//static IUnityContainer _unityContainer;
|
||||
public MESModel(IUnityContainer unityContainer)
|
||||
{
|
||||
//_unityContainer = unityContainer;
|
||||
}
|
||||
public class MesBase
|
||||
{
|
||||
public string Cmd { get; set; }
|
||||
}
|
||||
public class MESReturnCmdModel : MesBase
|
||||
{
|
||||
public MESReturnModelWithKeyFlag Info { get; set; }
|
||||
}
|
||||
public class MESReturnModel
|
||||
{
|
||||
public string Key { get; set; }
|
||||
public string ResultFlag { get; set; }
|
||||
public string MOMMessage { get; set; }
|
||||
}
|
||||
public class MESReturnModelWithKeyFlag : MESReturnModel
|
||||
{
|
||||
public string KeyFlag { get; set; }
|
||||
}
|
||||
|
||||
#region 出站
|
||||
public class MESReturnOutputModel : MesBase
|
||||
{
|
||||
public MESReturnCellModel Info { get; set; }
|
||||
}
|
||||
public class MESReturnCellModel : MESReturnModel
|
||||
{
|
||||
public List<CellsMode> Cells { get; set; } = new List<CellsMode>();
|
||||
}
|
||||
public class CellsMode
|
||||
{
|
||||
public string CellNo { get; set; } = "";
|
||||
public string CellInfo { get; set; } = "";
|
||||
}
|
||||
#endregion
|
||||
//每个接口都有Key和设备编号,所以都从这里继承
|
||||
|
||||
public class EqptParameter : MesBase
|
||||
{
|
||||
public EqptParameter()
|
||||
{
|
||||
Cmd = "EqptParameter";
|
||||
}
|
||||
public EqptModel Info { get; set; } = new EqptModel();
|
||||
}
|
||||
|
||||
public class EqptModel
|
||||
{
|
||||
public string Key { get; set; }=Guid.NewGuid().ToString();
|
||||
public string EquipmentCode { get; set; } = "HCHK0010"; //要从数据库中获取
|
||||
}
|
||||
public class EqptAlive : MesBase
|
||||
{
|
||||
public EqptAlive()
|
||||
{
|
||||
Cmd = "EqptAlive";
|
||||
}
|
||||
public EqptAliveModel Info { get; set; } = new EqptAliveModel();
|
||||
}
|
||||
public class EqptAliveModel: EqptModel
|
||||
{
|
||||
public string PPM { get; set; } = ""; //设备PPM(单台设备需要提供的PPM)
|
||||
public List<ModePPMs> PPMs { get; set; } = new List<ModePPMs>(); //2子设备PPM(多台设备共用一个心跳时,需要用这个字段)
|
||||
}
|
||||
|
||||
public class ModePPMs
|
||||
{
|
||||
public string SubEqCode { get; set; } = ""; //子设备编码
|
||||
public string PPM { get; set; } = ""; //设备PPM(单台设备需要提供的PPM
|
||||
}
|
||||
|
||||
|
||||
public class EqptStatus : MesBase
|
||||
{
|
||||
public EqptStatus()
|
||||
{
|
||||
Cmd = "EqptStatus";
|
||||
}
|
||||
public EqptStatusModel Info { get; set; } = new EqptStatusModel();
|
||||
}
|
||||
|
||||
public class EqptStatusModel: EqptModel
|
||||
{
|
||||
public string LocationID { get; set; } = "";
|
||||
public string StatusCode { get; set; } = "";
|
||||
public List<AlerInfoModel> AlertInfo { get; set; } = new List<AlerInfoModel>();
|
||||
}
|
||||
public class AlerInfoModel
|
||||
{
|
||||
public string AlertCode { get; set; } = "";
|
||||
public string AlertMessage { get; set; } = "";
|
||||
}
|
||||
|
||||
public class EqptAlert : MesBase
|
||||
{
|
||||
public EqptAlert()
|
||||
{
|
||||
Cmd = "EqptAlert";
|
||||
}
|
||||
public EqptAlertModel Info { get; set; } = new EqptAlertModel();
|
||||
}
|
||||
|
||||
public class EqptAlertModel: EqptModel
|
||||
{
|
||||
public List<AlertInfoModel> AlertInfo { get; set; } = new List<AlertInfoModel>();
|
||||
}
|
||||
public class AlertInfoModel
|
||||
{
|
||||
public string AlertCode { get; set; } = "";
|
||||
public string AlertReset { get; set; } = "";
|
||||
public string AlertMessage { get; set; } = "";
|
||||
}
|
||||
public class EqptParameterReturnCmd : MesBase
|
||||
{
|
||||
public Data Info { get; set; } = new Data();
|
||||
}
|
||||
|
||||
public class Data : MESReturnModel
|
||||
{
|
||||
public List<EqptParameterModel> ParameterInfo { get; set; } = new List<EqptParameterModel>();
|
||||
|
||||
}
|
||||
public class EqptParameterModel
|
||||
{
|
||||
public string ParameterCode { get; set; } = "";
|
||||
public string ParameterType { get; set; } = "";
|
||||
public string TargetValue { get; set; } = "";
|
||||
public string UOMCode { get; set; } = "";
|
||||
public string UpperLimit { get; set; } = "";
|
||||
public string LowerLimit { get; set; } = "";
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
|
||||
public class ParameterChangeCmd : MesBase
|
||||
{
|
||||
public ParameterChangeCmd()
|
||||
{
|
||||
Cmd = "ParameterChange";
|
||||
}
|
||||
public ParameterChange Info { get; set; } = new ParameterChange();
|
||||
|
||||
}
|
||||
public class ParameterChange: EqptModel
|
||||
{
|
||||
public string EmployeeNo { get; set; } = "";
|
||||
public List<EqptParameterModel> ParameterInfo { get; set; } = new List<EqptParameterModel>();
|
||||
}
|
||||
|
||||
|
||||
public class EqptRunCmd : MesBase
|
||||
{
|
||||
public EqptRunCmd()
|
||||
{
|
||||
Cmd = "EqptRun";
|
||||
}
|
||||
public EqptRun Info { get; set; } = new EqptRun();
|
||||
}
|
||||
|
||||
public class EqptRun: EqptModel
|
||||
{
|
||||
public string EmployeeNo { get; set; } = "";
|
||||
public string Password { get; set; } = "";
|
||||
public string EquipmentModel { get; set; } = "";
|
||||
}
|
||||
//7. 16.电芯状态获取
|
||||
public class CellStateCmd : MesBase
|
||||
{
|
||||
public CellStateCmd()
|
||||
{
|
||||
Cmd = "CellState";
|
||||
}
|
||||
public CellState Info { get; set; } = new CellState();
|
||||
}
|
||||
public class CellState: EqptModel
|
||||
{
|
||||
public string CellNo { get; set; } = "";
|
||||
}
|
||||
public class BakingInputCmd : MesBase
|
||||
{
|
||||
public BakingInputCmd()
|
||||
{
|
||||
Cmd = "BakingInput";
|
||||
}
|
||||
public BakingInput Info { get; set; } = new BakingInput();
|
||||
}
|
||||
|
||||
public class BakingInput : EqptModel
|
||||
{
|
||||
public string TrayNo { get; set; } = "";
|
||||
public string RecipeName { get; set; } = "";
|
||||
public string LocationID { get; set; } = "";
|
||||
public List<CellModel> Cells { get; set; } = new List<CellModel>(); //是电芯组
|
||||
}
|
||||
public class CellModel
|
||||
{
|
||||
public string CellNo { get; set; } = ""; //电芯号 电芯号才是具体的电芯条码
|
||||
}
|
||||
public class BakingParameterCmd : MesBase
|
||||
{
|
||||
public BakingParameterCmd()
|
||||
{
|
||||
Cmd = "BakingParameter";
|
||||
}
|
||||
|
||||
public BakingParameter Info { get; set; } = new BakingParameter();
|
||||
}
|
||||
|
||||
public class BakingParameter:EqptModel
|
||||
{
|
||||
public string LocationID { get; set; } = "";
|
||||
public string LocalTime { get; set; } = "";
|
||||
public List<ProcessData> ParameterInfo { get; set; } = new List<ProcessData>();
|
||||
}
|
||||
|
||||
public class ProcessData : EqptParameterModel
|
||||
{
|
||||
public string Value { get; set; } = "";
|
||||
}
|
||||
public class CellOutputCmd : MesBase
|
||||
{
|
||||
public CellOutputCmd()
|
||||
{
|
||||
Cmd = "CellOutput";
|
||||
}
|
||||
public InfoModel Info { get; set; } = new InfoModel();
|
||||
}
|
||||
|
||||
public class InfoModel : EqptModel
|
||||
{
|
||||
public CellsModel Cells { get; set; } = new CellsModel();
|
||||
}
|
||||
|
||||
public class CellsModel
|
||||
{
|
||||
public string CellNo { get; set; } = "";
|
||||
public string PassFlag { get; set; } = "";
|
||||
public string NGCode { get; set; } = "";
|
||||
public string NGMessage { get; set; } = "";
|
||||
|
||||
public List<ParametersModel> Parameters { get; set; } = new List<ParametersModel>();
|
||||
public List<MaterialInfoModel> MaterialInfo { get; set; } = new List<MaterialInfoModel>();
|
||||
}
|
||||
public class MaterialInfoModel
|
||||
{
|
||||
public string MaterialCode { get; set; } = "";
|
||||
public string MaterialLoc { get; set; } = "";
|
||||
public string Quantity { get; set; } = "";
|
||||
}
|
||||
public class ParametersModel
|
||||
{
|
||||
public string ParameterCode { get; set; } = "";
|
||||
public string ParameterDesc { get; set; } = "";
|
||||
public string Value { get; set; } = "";
|
||||
public string UpperLimit { get; set; } = "";
|
||||
public string LowerLimit { get; set; } = "";
|
||||
public string TargetValue { get; set; } = "";
|
||||
public string ParameterResult { get; set; } = "";
|
||||
}
|
||||
public class BakingOutputCmd : MesBase
|
||||
{
|
||||
public BakingOutputCmd()
|
||||
{
|
||||
Cmd = "BakingOutput";
|
||||
}
|
||||
public BakingOutput Info { get; set; } = new BakingOutput();
|
||||
}
|
||||
public class BakingOutput : EqptModel
|
||||
{
|
||||
public string TrayNo { get; set; } = "";
|
||||
public string LocationID { get; set; } = "";
|
||||
public string OutFlag { get; set; } = "";// 是否出站(Y或空表示出站,N单纯的上传水含量数据)
|
||||
//public string Passflag { get; set; }
|
||||
//public string NGCode { get; set; }
|
||||
public List<CellModel> Cells { get; set; } = new List<CellModel>();
|
||||
public List<ParametersModel> Parameters { get; set; } = new List<ParametersModel>();
|
||||
}
|
||||
}
|
||||
}
|
||||
102
Cowain.Bake.Common/Models/VarValue.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Cowain.Bake.Common.Models
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit, Size = 4)]
|
||||
public class VarValue
|
||||
{
|
||||
// Fields
|
||||
[FieldOffset(0)]
|
||||
public bool Boolean;
|
||||
[FieldOffset(0)]
|
||||
public byte Byte;
|
||||
[FieldOffset(0)]
|
||||
public short Int16;
|
||||
[FieldOffset(0)]
|
||||
public ushort UInt16;
|
||||
[FieldOffset(0)]
|
||||
public int Int32;
|
||||
[FieldOffset(0)]
|
||||
public uint UInt32;
|
||||
[FieldOffset(0)]
|
||||
public float Single;
|
||||
|
||||
public string GetValue(string tp)
|
||||
{
|
||||
if (string.IsNullOrEmpty(tp))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
else if (tp == "BOOL")
|
||||
{
|
||||
return this.Boolean == true ? "TRUE" : "FALSE";
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.Int32.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
Type type = obj.GetType();
|
||||
if (type == typeof(VarValue))
|
||||
return this.Int32 == ((VarValue)obj).Int32;
|
||||
else
|
||||
{
|
||||
if (type == typeof(int))
|
||||
return this.Int32 == (int)obj;
|
||||
if (type == typeof(uint))
|
||||
return this.UInt32 == (uint)obj;
|
||||
if (type == typeof(short))
|
||||
return this.Int16 == (short)obj;
|
||||
if (type == typeof(ushort))
|
||||
return this.UInt16 == (ushort)obj;
|
||||
if (type == typeof(byte))
|
||||
return this.Byte == (byte)obj;
|
||||
if (type == typeof(bool))
|
||||
return this.Boolean == (bool)obj;
|
||||
if (type == typeof(float))
|
||||
return this.Single == (float)obj;
|
||||
if (type == typeof(string))
|
||||
return this.ToString() == obj.ToString();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Int32.GetHashCode();
|
||||
}
|
||||
public static bool Equals(VarValue a, VarValue b)
|
||||
{
|
||||
|
||||
if (a == null || b == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.Int32 != b.Int32)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return this.Int32.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Cowain.Bake.Common/PasswordHelper.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace Cowain.Bake.Common
|
||||
{
|
||||
public class PasswordHelper
|
||||
{
|
||||
public static readonly DependencyProperty PasswordProperty = DependencyProperty.RegisterAttached("Password", typeof(string), typeof(PasswordHelper),
|
||||
new PropertyMetadata(new PropertyChangedCallback(OnPropertyChanged)));
|
||||
|
||||
public static string GetPassword(DependencyObject d)
|
||||
{
|
||||
return (string)d.GetValue(PasswordProperty);
|
||||
}
|
||||
public static void SetPassword(DependencyObject d, string value)
|
||||
{
|
||||
d.SetValue(PasswordProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty AttachProperty = DependencyProperty.RegisterAttached("Attach", typeof(string), typeof(PasswordHelper),
|
||||
new PropertyMetadata(new PropertyChangedCallback(OnAttachChanged)));
|
||||
|
||||
public static string GetAttach(DependencyObject d)
|
||||
{
|
||||
return (string)d.GetValue(AttachProperty);
|
||||
}
|
||||
public static void SetAttach(DependencyObject d, string value)
|
||||
{
|
||||
d.SetValue(AttachProperty, value);
|
||||
}
|
||||
|
||||
static bool _isUpdating = false;
|
||||
private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
PasswordBox pb = (d as PasswordBox);
|
||||
pb.PasswordChanged -= Pb_PasswordChanged;
|
||||
if (!_isUpdating)
|
||||
(d as PasswordBox).Password = e.NewValue.ToString();
|
||||
pb.PasswordChanged += Pb_PasswordChanged;
|
||||
}
|
||||
|
||||
private static void OnAttachChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
PasswordBox pb = (d as PasswordBox);
|
||||
pb.PasswordChanged += Pb_PasswordChanged;
|
||||
}
|
||||
|
||||
private static void Pb_PasswordChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PasswordBox pb = (sender as PasswordBox);
|
||||
_isUpdating = true;
|
||||
SetPassword(pb, pb.Password);
|
||||
_isUpdating = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Cowain.Bake.Common/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Cowain.Bake.Common")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Cowain.Bake.Common")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//若要开始生成可本地化的应用程序,请设置
|
||||
//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
|
||||
//例如,如果您在源文件中使用的是美国英语,
|
||||
//使用的是美国英语,请将 <UICulture> 设置为 en-US。 然后取消
|
||||
//对以下 NeutralResourceLanguage 特性的注释。 更新
|
||||
//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly:ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //主题特定资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
//或应用程序资源字典中找到时使用)
|
||||
ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
|
||||
//(未在页面中找到资源时使用,
|
||||
//、应用程序或任何主题专用资源字典中找到时使用)
|
||||
)]
|
||||
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
63
Cowain.Bake.Common/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Cowain.Bake.Common.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Cowain.Bake.Common.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
Cowain.Bake.Common/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
26
Cowain.Bake.Common/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Cowain.Bake.Common.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Cowain.Bake.Common/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
4
Cowain.Bake.Common/Styles/BaseResources.xaml
Normal file
@@ -0,0 +1,4 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<FontFamily x:Key="Iconfont">pack://application:,,,/Cowain.Bake.Common;component/Fonts/#iconfont</FontFamily>
|
||||
</ResourceDictionary>
|
||||
88
Cowain.Bake.Common/Styles/ButtonStyles.xaml
Normal file
@@ -0,0 +1,88 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style TargetType="Button" x:Key="NormalButtonStyle">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Width" Value="50"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Background" Value="#FF0ABEFF"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="4">
|
||||
<Border Background="Transparent" Name="back" CornerRadius="4">
|
||||
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#11000000" TargetName="back"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button" x:Key="IconButtonStyle">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Width" Value="40"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Background" Value="#FF0ABEFF"/>
|
||||
<Setter Property="FontFamily" Value="{DynamicResource Iconfont}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="4">
|
||||
<Border Background="Transparent" Name="back" CornerRadius="4">
|
||||
<ContentPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#11000000" TargetName="back"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button" x:Key="IconWithContentButtonStyle">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Background" Value="#FF0ABEFF"/>
|
||||
<Setter Property="FontFamily" Value="{DynamicResource Iconfont}"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}" CornerRadius="4">
|
||||
<Border Background="Transparent" Name="back" CornerRadius="4">
|
||||
<Grid HorizontalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{TemplateBinding Tag}" FontFamily="{DynamicResource Iconfont}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="5,0"/>
|
||||
<ContentPresenter Grid.Column="1" Margin="0,0,10,0"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#11000000" TargetName="back"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
317
Cowain.Bake.Common/Styles/DataGrid.xaml
Normal file
@@ -0,0 +1,317 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<!--调整列头宽度样式-->
|
||||
<Style x:Key="DefaultColumnHeaderGripperStyle" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Width" Value="8" />
|
||||
<Setter Property="Background" Value="{StaticResource HeaderBorderBrush}" />
|
||||
<Setter Property="Cursor" Value="SizeWE" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border Padding="{TemplateBinding Padding}" Background="Transparent" Margin="0 0 0 2">
|
||||
<Rectangle HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Width="1" Fill="{TemplateBinding Background}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--列头header样式-->
|
||||
<Style x:Key="DefaultDataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="MinWidth" Value="5" />
|
||||
<Setter Property="MinHeight" Value="25" />
|
||||
<Setter Property="Height" Value="50" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextForeground}" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="10,4,4,7" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="FontWeight" Value="SemiBold"></Setter>
|
||||
<Setter Property="FontSize" Value="{StaticResource HeaderFontSize}" />
|
||||
<Setter Property="BorderThickness" Value="0,0,0,3" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource HeaderBorderBrush}" />
|
||||
<Setter Property="Background" Value="{StaticResource HeaderBackground}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="BackgroundBorder" BorderThickness="0,0,0,3" CornerRadius="15,15,0,0"
|
||||
Grid.ColumnSpan="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" />
|
||||
<ContentPresenter x:Name="HeaderContent"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
RecognizesAccessKey="True"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
<TextBlock x:Name="SortArrow" Style="{StaticResource FIcon}" Text="" Grid.Column="1" Width="20"
|
||||
Visibility="Collapsed" FontSize="16" Margin="1,1,3,1" />
|
||||
|
||||
<Thumb x:Name="PART_LeftHeaderGripper" HorizontalAlignment="Left" HorizontalContentAlignment="Left"
|
||||
Style="{StaticResource DefaultColumnHeaderGripperStyle}" />
|
||||
|
||||
<Thumb x:Name="PART_RightHeaderGripper" HorizontalAlignment="Right" HorizontalContentAlignment="Right" Background="Transparent"
|
||||
Style="{StaticResource DefaultColumnHeaderGripperStyle}" Grid.Column="1" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<!--显示排序标示-->
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsMouseOver" Value="True" />
|
||||
<Condition Property="SortDirection" Value="{x:Null}" />
|
||||
<Condition Property="CanUserSort" Value="true" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
|
||||
</MultiTrigger>
|
||||
<!--可排序列鼠标样式-->
|
||||
<Trigger Property="CanUserSort" Value="True">
|
||||
<Setter Property="Cursor" Value="Hand"></Setter>
|
||||
</Trigger>
|
||||
<!--升序-->
|
||||
<Trigger Property="SortDirection" Value="Ascending">
|
||||
<Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<!--降序-->
|
||||
<Trigger Property="SortDirection" Value="Descending">
|
||||
<Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="SortArrow" Property="Text" Value=""/>
|
||||
</Trigger>
|
||||
<!--第一列左边不显示分割线-->
|
||||
<Trigger Property="DisplayIndex" Value="2">
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_LeftHeaderGripper" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--行样式-->
|
||||
<Style x:Key="DefaultDataGridRow" TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextForeground}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Height" Value="36" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
|
||||
<Style.Triggers>
|
||||
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
||||
<Setter Property="Background" Value="{StaticResource ItemsAlternationContentBackground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource ItemSelectedBackground}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource ItemSelectedForeground}" />
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="True" />
|
||||
<Condition Property="Selector.IsSelectionActive" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" Value="{StaticResource ItemSelectedBackground}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource ItemSelectedForeground}" />
|
||||
</MultiTrigger>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource Self}}" Value="True" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<Setter Property="Background" Value="{StaticResource ItemMouseOverBackground}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource ItemMouseOverForeground}" />
|
||||
</MultiDataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!--行头调整高度样式 -->
|
||||
<Style x:Key="DefaultRowHeaderGripperStyle" TargetType="{x:Type Thumb}">
|
||||
<Setter Property="Height" Value="36" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Cursor" Value="SizeNS" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border Padding="{TemplateBinding Padding}" Background="Transparent"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--行头部样式-->
|
||||
<Style x:Key="DefaultDataGridRowHeader" TargetType="{x:Type DataGridRowHeader}">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0,0,1,0" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridRowHeader}">
|
||||
<Grid>
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Margin="{TemplateBinding Margin}"
|
||||
SnapsToDevicePixels="True">
|
||||
<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
|
||||
</Border>
|
||||
<Thumb x:Name="PART_TopHeaderGripper" VerticalContentAlignment="Top"
|
||||
VerticalAlignment="Top" Background="Transparent" Style="{StaticResource DefaultRowHeaderGripperStyle}" />
|
||||
<Thumb x:Name="PART_BottomHeaderGripper" VerticalContentAlignment="Bottom"
|
||||
VerticalAlignment="Bottom" Style="{StaticResource DefaultRowHeaderGripperStyle}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--单元格样式-->
|
||||
<Style x:Key="DefaultDataGridCell"
|
||||
TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Height" Value="36" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="0"
|
||||
Background="{TemplateBinding Background}"
|
||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
||||
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">
|
||||
|
||||
</ContentPresenter>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Foreground" Value="{StaticResource ItemSelectedForeground}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--表格DataGrid样式-->
|
||||
<Style x:Key="DefaultDataGrid" TargetType="{x:Type DataGrid}">
|
||||
<Setter Property="MinRowHeight" Value="25" />
|
||||
<Setter Property="Canvas.Top" Value="220"/>
|
||||
<Setter Property="Canvas.Left" Value="343"/>
|
||||
<Setter Property="FrameworkElement.MaxWidth" Value="1175"/>
|
||||
<Setter Property="FrameworkElement.Height" Value="582"/>
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="FontSize" Value="16" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource ControlBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource GridLinesBrush}" />
|
||||
<Setter Property="VerticalGridLinesBrush" Value="{StaticResource GridLinesBrush}" />
|
||||
<Setter Property="ColumnHeaderStyle" Value="{StaticResource DefaultDataGridColumnHeader}" />
|
||||
<Setter Property="RowHeaderStyle" Value="{StaticResource DefaultDataGridRowHeader}" />
|
||||
<Setter Property="CellStyle" Value="{StaticResource DefaultDataGridCell}" />
|
||||
<Setter Property="RowStyle" Value="{StaticResource DefaultDataGridRow}" />
|
||||
<Setter Property="HeadersVisibility" Value="All" />
|
||||
<Setter Property="EnableRowVirtualization" Value="True" />
|
||||
<Setter Property="EnableColumnVirtualization" Value="False" />
|
||||
<Setter Property="AutoGenerateColumns" Value="False" />
|
||||
<Setter Property="IsReadOnly" Value="True" />
|
||||
<Setter Property="SelectionMode" Value="Single" />
|
||||
<Setter Property="SelectionUnit" Value="FullRow" />
|
||||
<Setter Property="GridLinesVisibility" Value="All" />
|
||||
<Setter Property="AlternationCount" Value="2"></Setter>
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
|
||||
<Setter Property="VirtualizingStackPanel.IsVirtualizing" Value="True"></Setter>
|
||||
<Setter Property="VirtualizingStackPanel.VirtualizationMode" Value="Recycling" />
|
||||
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
|
||||
<!--列头移动列时候分割线样式-->
|
||||
<Setter Property="DropLocationIndicatorStyle">
|
||||
<Setter.Value>
|
||||
<Style TargetType="Separator">
|
||||
<Setter Property="Background" Value="{StaticResource HeaderBorderBrush}" />
|
||||
<Setter Property="Width" Value="2.5" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Separator">
|
||||
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<!--DataGrid控件模板-->
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type DataGrid}">
|
||||
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0" x:Name="border"
|
||||
Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True">
|
||||
<ScrollViewer x:Name="DG_ScrollViewer" Focusable="false">
|
||||
<ScrollViewer.Template>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition x:Name="col_rowheader" Width="1" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--表格头部-->
|
||||
<DataGridColumnHeadersPresenter x:Name="PART_ColumnHeadersPresenter" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Column}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" />
|
||||
<!--主数据区-->
|
||||
<Grid Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" Grid.ColumnSpan="2" />
|
||||
</Grid>
|
||||
<!--垂直滑动条-->
|
||||
<ScrollBar x:Name="PART_VerticalScrollBar" Grid.Column="2" Maximum="{TemplateBinding ScrollableHeight}"
|
||||
Orientation="Vertical" Grid.Row="0" Grid.RowSpan="3" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
||||
Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}" />
|
||||
<!--横向滑动条-->
|
||||
<ScrollBar x:Name="PART_HorizontalScrollBar" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2"
|
||||
Maximum="{TemplateBinding ScrollableWidth}" Orientation="Horizontal"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
|
||||
Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</ScrollViewer.Template>
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" Value="{StaticResource DisableOpacity}" TargetName="border" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsGrouping" Value="true">
|
||||
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Content.Text}" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
118
Cowain.Bake.Common/Styles/TextBoxStyle.xaml
Normal file
@@ -0,0 +1,118 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/>
|
||||
<SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA"/>
|
||||
<SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5"/>
|
||||
<Style x:Key="SearchTextBoxStyle" TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="AllowDrop" Value="true"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
SnapsToDevicePixels="True"
|
||||
CornerRadius="5" Height="30">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="30"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="" FontFamily="{DynamicResource Iconfont}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="#999" FontSize="14"/>
|
||||
<TextBlock Text="输入关键词查找" VerticalAlignment="Center" Margin="3,0" FontSize="12"
|
||||
Foreground="#999" Grid.Column="1" Visibility="Collapsed" Name="mask"/>
|
||||
<ScrollViewer x:Name="PART_ContentHost" Grid.Column="1" Focusable="false"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.Focus.Border}"/>
|
||||
</Trigger>
|
||||
<DataTrigger Binding="{Binding Text,RelativeSource={RelativeSource Self}}" Value="">
|
||||
<Setter Property="Visibility" Value="Visible" TargetName="mask"/>
|
||||
</DataTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
|
||||
</MultiTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TextBox" x:Key="NormalTextBoxStyle">
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="AllowDrop" Value="true"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Background="{TemplateBinding Background}"
|
||||
SnapsToDevicePixels="True"
|
||||
CornerRadius="5" Height="30">
|
||||
<ScrollViewer x:Name="PART_ContentHost" Grid.Column="1" Focusable="false"
|
||||
VerticalAlignment="Center" Margin="5,0"
|
||||
HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.MouseOver.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsKeyboardFocused" Value="true">
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.Focus.Border}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsReadOnly" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#F7F9FA"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
|
||||
</MultiTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
31
Cowain.Bake.Common/Styles/ToggleButtonStyle.xaml
Normal file
@@ -0,0 +1,31 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Width" Value="45"></Setter>
|
||||
<Setter Property="Height" Value="20"></Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ToggleButton">
|
||||
<!--定义视觉树-->
|
||||
<Border x:Name="border" BorderThickness="1.5" CornerRadius="9" BorderBrush="#aaa" Background="#2790ff">
|
||||
<Grid x:Name="togglebutton" HorizontalAlignment="Right" >
|
||||
<Border Width="17" Height="17" CornerRadius="9" Background="White"/>
|
||||
</Grid>
|
||||
<!--阴影设置-->
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="Gray" BlurRadius="5" ShadowDepth="0" Opacity="0.5" />
|
||||
</Border.Effect>
|
||||
</Border>
|
||||
<!--定义触发器-->
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="false">
|
||||
<Setter TargetName="border" Property="Background" Value="#ccc"/>
|
||||
<Setter TargetName="togglebutton" Property="HorizontalAlignment" Value="Left"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
96
Cowain.Bake.Common/ViewModelBase.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using Prism.Commands;
|
||||
using Prism.Mvvm;
|
||||
using Prism.Regions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using Unity;
|
||||
|
||||
namespace Cowain.Bake.Common
|
||||
{
|
||||
public abstract class ViewModelBase : BindableBase
|
||||
{
|
||||
// * 未保存
|
||||
public string PageTitle { get; set; } = "标签标题";
|
||||
public bool IsCanClose { get; set; } = true;
|
||||
|
||||
private string NavUri { get; set; }
|
||||
|
||||
private DateTime date = DateTime.Now.Date;
|
||||
public DateTime Date
|
||||
{
|
||||
get { return date; }
|
||||
set { SetProperty(ref date, value); }
|
||||
}
|
||||
|
||||
private DateTime _startTime = DateTime.Now;
|
||||
public DateTime StartTime
|
||||
{
|
||||
get { return _startTime; }
|
||||
set { SetProperty(ref _startTime, DateTime.Parse(Date.ToString("yyyy-MM-dd") + " " + value.ToString("HH:mm:ss"))); }
|
||||
}
|
||||
|
||||
private DateTime _endTime = DateTime.Now;
|
||||
public DateTime EndTime
|
||||
{
|
||||
get { return _endTime; }
|
||||
set { SetProperty(ref _endTime, DateTime.Parse(Date.ToString("yyyy-MM-dd") + " " + value.ToString("HH:mm:ss"))); }
|
||||
}
|
||||
|
||||
private DateTime _startDateTime = DateTime.Now;
|
||||
public DateTime StartDateTime
|
||||
{
|
||||
get { return _startDateTime; }
|
||||
set { SetProperty(ref _startDateTime, value); }
|
||||
}
|
||||
|
||||
private DateTime _endDateTime = DateTime.Now;
|
||||
public DateTime EndDateTime
|
||||
{
|
||||
get { return _endDateTime; }
|
||||
set { SetProperty(ref _endDateTime, value); }
|
||||
}
|
||||
//条码
|
||||
private string code = string.Empty;
|
||||
public string Code
|
||||
{
|
||||
get { return code; }
|
||||
set { SetProperty(ref code, value); }
|
||||
}
|
||||
public DelegateCommand CloseCommand
|
||||
{
|
||||
get => new DelegateCommand(() =>
|
||||
{
|
||||
// 关闭操作
|
||||
// 根据URI获取对应的已注册对象名称
|
||||
var obj = _unityContainer.Registrations.FirstOrDefault(v => v.Name == NavUri);
|
||||
string name = obj.MappedToType.Name;
|
||||
// 根据对象名称再从Region的Views里面找到对象
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
var region = _regionManager.Regions["MainContentRegion"];
|
||||
var view = region.Views.FirstOrDefault(v => v.GetType().Name == name);
|
||||
// 把这个对象从Region的Views里移除
|
||||
if (view != null)
|
||||
region.Remove(view);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public DelegateCommand RefreshCommand { get => new DelegateCommand(Refresh); }
|
||||
|
||||
protected IUnityContainer _unityContainer;
|
||||
protected IRegionManager _regionManager;
|
||||
public ViewModelBase(IUnityContainer unityContainer, IRegionManager regionManager)
|
||||
{
|
||||
_unityContainer = unityContainer;
|
||||
_regionManager = regionManager;
|
||||
Refresh();
|
||||
}
|
||||
|
||||
public virtual void Refresh() { }
|
||||
}
|
||||
}
|
||||
35
Cowain.Bake.Common/app.config
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
|
||||
@@ -0,0 +1,228 @@
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Common.dll.config
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Common.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Common.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\BouncyCastle.Cryptography.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Model.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\CsvHelper.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Dapper.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\EntityFramework.SqlServer.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Enums.NET.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\ICSharpCode.SharpZipLib.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\MathNet.Numerics.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Microsoft.Bcl.AsyncInterfaces.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Microsoft.Bcl.HashCode.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Microsoft.IO.RecyclableMemoryStream.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Microsoft.Xaml.Behaviors.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\MySql.Data.EntityFramework.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Newtonsoft.Json.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NLog.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.Core.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OOXML.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXml4Net.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXmlFormats.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Opc.Ua.Core.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Oracle.ManagedDataAccess.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.Unity.Wpf.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.Wpf.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\SixLabors.Fonts.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\SixLabors.ImageSharp.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Buffers.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Memory.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Numerics.Vectors.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Security.AccessControl.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Security.Cryptography.Xml.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Security.Principal.Windows.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Text.Encoding.CodePages.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Text.Encodings.Web.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Text.Json.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Threading.Tasks.Extensions.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.ValueTuple.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Unity.Abstractions.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Unity.Container.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Wisdy.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\EntityFramework.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\MySql.Data.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Opc.Ua.Security.Certificates.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.ServiceModel.Primitives.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Google.Protobuf.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\ZstdNet.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\K4os.Compression.LZ4.Streams.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\BouncyCastle.Crypto.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Ubiety.Dns.Core.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Formats.Asn1.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\K4os.Compression.LZ4.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\K4os.Hash.xxHash.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\BouncyCastle.Cryptography.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Model.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Model.dll.config
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Enums.NET.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Enums.NET.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\ICSharpCode.SharpZipLib.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\ICSharpCode.SharpZipLib.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\MathNet.Numerics.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Microsoft.Bcl.AsyncInterfaces.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Microsoft.IO.RecyclableMemoryStream.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Microsoft.Xaml.Behaviors.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Microsoft.Xaml.Behaviors.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Newtonsoft.Json.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.Core.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.Core.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OOXML.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OOXML.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXml4Net.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXml4Net.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXmlFormats.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXmlFormats.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.Unity.Wpf.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.Unity.Wpf.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.Wpf.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Prism.Wpf.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\SixLabors.Fonts.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\SixLabors.ImageSharp.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Buffers.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Memory.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Numerics.Vectors.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Security.AccessControl.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Security.Cryptography.Xml.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Security.Principal.Windows.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Text.Encoding.CodePages.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Text.Encodings.Web.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Text.Json.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.Threading.Tasks.Extensions.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\System.ValueTuple.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Unity.Abstractions.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\Unity.Container.pdb
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\bin\Debug\EntityFramework.xml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.csproj.AssemblyReference.cache
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Styles\BaseResources.baml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Styles\ButtonStyles.baml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Styles\DataGrid.baml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Styles\TextBoxStyle.baml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Styles\ToggleButtonStyle.baml
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common_MarkupCompile.cache
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.g.resources
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.Properties.Resources.resources
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.csproj.GenerateResource.cache
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.csproj.CoreCompileInputs.cache
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.csproj.CopyComplete
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.dll
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Common.dll.config
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Common.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Common.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\BouncyCastle.Cryptography.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Model.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\CsvHelper.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Dapper.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\EntityFramework.SqlServer.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Enums.NET.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\ICSharpCode.SharpZipLib.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\MathNet.Numerics.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Microsoft.Bcl.AsyncInterfaces.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Microsoft.Bcl.HashCode.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Microsoft.IO.RecyclableMemoryStream.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Microsoft.Xaml.Behaviors.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\MySql.Data.EntityFramework.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Newtonsoft.Json.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NLog.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.Core.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OOXML.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXml4Net.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXmlFormats.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Opc.Ua.Core.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Oracle.ManagedDataAccess.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.Unity.Wpf.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.Wpf.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\SixLabors.Fonts.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\SixLabors.ImageSharp.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Buffers.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Memory.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Numerics.Vectors.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Security.AccessControl.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Security.Cryptography.Xml.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Security.Principal.Windows.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Text.Encoding.CodePages.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Text.Encodings.Web.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Text.Json.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Threading.Tasks.Extensions.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.ValueTuple.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Unity.Abstractions.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Unity.Container.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Wisdy.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\EntityFramework.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\MySql.Data.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Opc.Ua.Security.Certificates.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.ServiceModel.Primitives.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Google.Protobuf.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\ZstdNet.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\K4os.Compression.LZ4.Streams.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\BouncyCastle.Crypto.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Ubiety.Dns.Core.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Formats.Asn1.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\K4os.Compression.LZ4.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\K4os.Hash.xxHash.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\BouncyCastle.Cryptography.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Model.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Cowain.Bake.Model.dll.config
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Enums.NET.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Enums.NET.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\ICSharpCode.SharpZipLib.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\ICSharpCode.SharpZipLib.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\MathNet.Numerics.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Microsoft.Bcl.AsyncInterfaces.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Microsoft.IO.RecyclableMemoryStream.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Microsoft.Xaml.Behaviors.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Microsoft.Xaml.Behaviors.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Newtonsoft.Json.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.Core.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.Core.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OOXML.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OOXML.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXml4Net.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXml4Net.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXmlFormats.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\NPOI.OpenXmlFormats.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.Unity.Wpf.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.Unity.Wpf.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.Wpf.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Prism.Wpf.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\SixLabors.Fonts.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\SixLabors.ImageSharp.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Buffers.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Memory.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Numerics.Vectors.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Security.AccessControl.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Security.Cryptography.Xml.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Security.Principal.Windows.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Text.Encoding.CodePages.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Text.Encodings.Web.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Text.Json.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.Threading.Tasks.Extensions.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\System.ValueTuple.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Unity.Abstractions.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\Unity.Container.pdb
|
||||
D:\SourceCode\src\Cowain.Bake.Common\bin\Debug\EntityFramework.xml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.csprojAssemblyReference.cache
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Styles\BaseResources.baml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Styles\ButtonStyles.baml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Styles\DataGrid.baml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Styles\TextBoxStyle.baml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Styles\ToggleButtonStyle.baml
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common_MarkupCompile.cache
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.g.resources
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.Properties.Resources.resources
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.csproj.GenerateResource.cache
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.csproj.CoreCompileInputs.cache
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.csproj.CopyComplete
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.dll
|
||||
D:\SourceCode\src\Cowain.Bake.Common\obj\Debug\Cowain.Bake.Common.pdb
|
||||
@@ -0,0 +1,20 @@
|
||||
Cowain.Bake.Common
|
||||
|
||||
|
||||
library
|
||||
C#
|
||||
.cs
|
||||
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src\Cowain.Bake.Common\obj\Debug\
|
||||
Cowain.Bake.Common
|
||||
none
|
||||
false
|
||||
DEBUG;TRACE
|
||||
|
||||
51203916121
|
||||
|
||||
421771767727
|
||||
631695082958
|
||||
Styles\BaseResources.xaml;Styles\ButtonStyles.xaml;Styles\DataGrid.xaml;Styles\TextBoxStyle.xaml;Styles\ToggleButtonStyle.xaml;
|
||||
|
||||
False
|
||||
|
||||
32
Cowain.Bake.Common/packages.config
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BouncyCastle.Cryptography" version="2.2.1" targetFramework="net472" />
|
||||
<package id="Enums.NET" version="4.0.1" targetFramework="net472" />
|
||||
<package id="MathNet.Numerics.Signed" version="4.15.0" targetFramework="net472" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
|
||||
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net472" />
|
||||
<package id="Microsoft.IO.RecyclableMemoryStream" version="2.3.2" targetFramework="net472" />
|
||||
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.31" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
|
||||
<package id="NPOI" version="2.6.2" targetFramework="net472" />
|
||||
<package id="Prism.Core" version="8.1.97" targetFramework="net472" />
|
||||
<package id="Prism.Unity" version="8.1.97" targetFramework="net472" />
|
||||
<package id="Prism.Wpf" version="8.1.97" targetFramework="net472" />
|
||||
<package id="SharpZipLib" version="1.3.3" targetFramework="net472" />
|
||||
<package id="SixLabors.Fonts" version="1.0.0" targetFramework="net472" />
|
||||
<package id="SixLabors.ImageSharp" version="2.1.4" targetFramework="net472" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
|
||||
<package id="System.Security.AccessControl" version="6.0.0" targetFramework="net472" />
|
||||
<package id="System.Security.Cryptography.Xml" version="6.0.1" targetFramework="net472" />
|
||||
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Text.Encoding.CodePages" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Text.Encodings.Web" version="7.0.0" targetFramework="net472" />
|
||||
<package id="System.Text.Json" version="7.0.2" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
||||
<package id="Unity.Abstractions" version="5.11.7" targetFramework="net472" />
|
||||
<package id="Unity.Container" version="5.11.11" targetFramework="net472" />
|
||||
</packages>
|
||||