diff --git a/ConvertMoels/CategoriesSQLConvert.cs b/ConvertMoels/CategoriesSQLConvert.cs
new file mode 100644
index 0000000..c944a22
--- /dev/null
+++ b/ConvertMoels/CategoriesSQLConvert.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace formula_manage.ConvertMoels
+{
+ ///
+ /// 设备类型数值转换器
+ ///
+ ///
+ internal class CategoriesSQLConvert : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ string Categories = System.Convert.ToString(value);
+ if (Categories == "0")//类型
+ {
+ return "溢流";
+ }
+ else
+ {
+ if (Categories == "1")
+ {
+ return "气流";
+ }
+ else
+ {
+ if (Categories == "2")
+ {
+ return "轧染";
+ }
+ else
+ {
+ if (Categories == "3")
+ {
+ return "卷染";
+ }
+ else
+ {
+ if (Categories == "4")
+ {
+ return "喷染";
+ }
+ else
+ {
+ if (Categories == "5")
+ {
+ return "筒纱";
+ }
+ else
+ {
+ if (Categories == "7")
+ {
+ return "成衣";
+ }
+ else
+ {
+ return "未知类型";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ///
+ ///
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+ }
+}
diff --git a/ConvertMoels/IndustrySQLConvert.cs b/ConvertMoels/IndustrySQLConvert.cs
new file mode 100644
index 0000000..80b0694
--- /dev/null
+++ b/ConvertMoels/IndustrySQLConvert.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace formula_manage.ConvertMoels
+{
+ ///
+ /// 设备数值转换器
+ ///
+ ///
+ internal class IndustrySQLConvert : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ string Industry = System.Convert.ToString(value);
+ if (Industry == "0")//类型
+ {
+ return "浸染";
+ }
+ else
+ {
+ if (Industry == "1")
+ {
+ return "连染";
+ }
+ else
+ {
+ if (Industry == "2")
+ {
+ return "印染";
+ }
+ else
+ {
+ return "未知类型";
+ }
+ }
+ }
+ }
+ ///
+ ///
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+ }
+}
diff --git a/Windows/Machine.xaml b/Windows/Machine.xaml
index c38d556..c46ad6c 100644
--- a/Windows/Machine.xaml
+++ b/Windows/Machine.xaml
@@ -3,14 +3,21 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:formula_manage.Windows"
- mc:Ignorable="d"
- Title="MAC_SET" Height="720" Width="1100"
+ xmlns:local="clr-namespace:formula_manage.Windows"
+ xmlns:ConvertMoels="clr-namespace:formula_manage.ConvertMoels"
+ xmlns:viewmodel="clr-namespace:formula_manage.ViewModel"
+ mc:Ignorable="d" Loaded="MAC_Loaded"
+ Title="MAC_SET" Height="720" Width="1100" MaxHeight="720" MaxWidth="1100" MinHeight="720" MinWidth="1100"
BorderBrush="White" Background="#FFE0E0E0">
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -64,12 +85,12 @@
+ VerticalAlignment="Bottom" Width="85" FontSize="20"/>
+ VerticalAlignment="Bottom" Width="45" FontSize="20"/>
@@ -78,7 +99,7 @@
+ VerticalAlignment="Bottom" Width="45" FontSize="20"/>
@@ -91,24 +112,24 @@
+ VerticalAlignment="Bottom" Width="45" FontSize="20"/>
+ InputMethod.IsInputMethodEnabled="False" PreviewTextInput="Tb_KeyFloating"/>
+ InputMethod.IsInputMethodEnabled="False" PreviewTextInput="Tb_KeyFloating"/>
+ VerticalAlignment="Bottom" Width="45" FontSize="20"/>
+ VerticalAlignment="Bottom" Width="40" FontSize="20"/>