工艺程序管理
This commit is contained in:
commit
d64ef35a74
9 files changed
+294
-36
No files matched your search
Generated
+45
@@ -96,6 +96,15 @@ namespace DyeingComputer.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Advance 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string Advance {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Advance", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Auto 的本地化字符串。
|
/// 查找类似 Auto 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -114,6 +123,15 @@ namespace DyeingComputer.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Beginning 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string Beginning {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Beginning", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 CallDistribution 的本地化字符串。
|
/// 查找类似 CallDistribution 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -186,6 +204,15 @@ namespace DyeingComputer.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Curve 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string Curve {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Curve", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Curve 的本地化字符串。
|
/// 查找类似 Curve 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -384,6 +411,15 @@ namespace DyeingComputer.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Mixing 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string Mixing {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Mixing", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 New 的本地化字符串。
|
/// 查找类似 New 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -762,6 +798,15 @@ namespace DyeingComputer.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Type 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string Type {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Type", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Washing 的本地化字符串。
|
/// 查找类似 Washing 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -366,4 +366,19 @@
|
|||||||
<data name="Tank" xml:space="preserve">
|
<data name="Tank" xml:space="preserve">
|
||||||
<value>Tank</value>
|
<value>Tank</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Beginning" xml:space="preserve">
|
||||||
|
<value>Beginning</value>
|
||||||
|
</data>
|
||||||
|
<data name="Type" xml:space="preserve">
|
||||||
|
<value>Type</value>
|
||||||
|
</data>
|
||||||
|
<data name="Advance" xml:space="preserve">
|
||||||
|
<value>Advance</value>
|
||||||
|
</data>
|
||||||
|
<data name="Curve" xml:space="preserve">
|
||||||
|
<value>Curve</value>
|
||||||
|
</data>
|
||||||
|
<data name="Mixing" xml:space="preserve">
|
||||||
|
<value>Mixing</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -342,15 +342,27 @@
|
|||||||
<data name="YES" xml:space="preserve">
|
<data name="YES" xml:space="preserve">
|
||||||
<value>YES</value>
|
<value>YES</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Advance" xml:space="preserve">
|
||||||
|
<value>Advance</value>
|
||||||
|
</data>
|
||||||
|
<data name="Beginning" xml:space="preserve">
|
||||||
|
<value>Beginning</value>
|
||||||
|
</data>
|
||||||
<data name="Container" xml:space="preserve">
|
<data name="Container" xml:space="preserve">
|
||||||
<value>Container</value>
|
<value>Container</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Curve" xml:space="preserve">
|
||||||
|
<value>Curve</value>
|
||||||
|
</data>
|
||||||
<data name="Headwaters" xml:space="preserve">
|
<data name="Headwaters" xml:space="preserve">
|
||||||
<value>Headwaters</value>
|
<value>Headwaters</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Medicine" xml:space="preserve">
|
<data name="Medicine" xml:space="preserve">
|
||||||
<value>Medicine</value>
|
<value>Medicine</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Mixing" xml:space="preserve">
|
||||||
|
<value>Mixing</value>
|
||||||
|
</data>
|
||||||
<data name="Number" xml:space="preserve">
|
<data name="Number" xml:space="preserve">
|
||||||
<value>Number</value>
|
<value>Number</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -366,4 +378,7 @@
|
|||||||
<data name="Target" xml:space="preserve">
|
<data name="Target" xml:space="preserve">
|
||||||
<value>Target</value>
|
<value>Target</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Type" xml:space="preserve">
|
||||||
|
<value>Type</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -366,4 +366,19 @@
|
|||||||
<data name="Medicine" xml:space="preserve">
|
<data name="Medicine" xml:space="preserve">
|
||||||
<value>药</value>
|
<value>药</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Advance" xml:space="preserve">
|
||||||
|
<value>提前</value>
|
||||||
|
</data>
|
||||||
|
<data name="Beginning" xml:space="preserve">
|
||||||
|
<value>开头</value>
|
||||||
|
</data>
|
||||||
|
<data name="Type" xml:space="preserve">
|
||||||
|
<value>类型</value>
|
||||||
|
</data>
|
||||||
|
<data name="Mixing" xml:space="preserve">
|
||||||
|
<value>搅拌</value>
|
||||||
|
</data>
|
||||||
|
<data name="Curve" xml:space="preserve">
|
||||||
|
<value>曲线</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -366,4 +366,19 @@
|
|||||||
<data name="Tank" xml:space="preserve">
|
<data name="Tank" xml:space="preserve">
|
||||||
<value>缸</value>
|
<value>缸</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Type" xml:space="preserve">
|
||||||
|
<value>類別</value>
|
||||||
|
</data>
|
||||||
|
<data name="Beginning" xml:space="preserve">
|
||||||
|
<value>開始</value>
|
||||||
|
</data>
|
||||||
|
<data name="Advance" xml:space="preserve">
|
||||||
|
<value>提前</value>
|
||||||
|
</data>
|
||||||
|
<data name="Curve" xml:space="preserve">
|
||||||
|
<value>曲線</value>
|
||||||
|
</data>
|
||||||
|
<data name="Mixing" xml:space="preserve">
|
||||||
|
<value>攪拌</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -90,6 +90,7 @@ namespace DyeingComputer.View
|
|||||||
SQLiteHelpers.InsertData("ProgramName", Program_new);// 执行插入
|
SQLiteHelpers.InsertData("ProgramName", Program_new);// 执行插入
|
||||||
SQLiteHelpers.Close(); //关闭连接
|
SQLiteHelpers.Close(); //关闭连接
|
||||||
|
|
||||||
|
Programgroup_Numder = VALUE;
|
||||||
Programgroup_ID = ID;
|
Programgroup_ID = ID;
|
||||||
|
|
||||||
Programgroup_sql();
|
Programgroup_sql();
|
||||||
@@ -97,6 +98,7 @@ namespace DyeingComputer.View
|
|||||||
|
|
||||||
private void ProgramgroupView_del_Click(object sender, RoutedEventArgs e)//删除
|
private void ProgramgroupView_del_Click(object sender, RoutedEventArgs e)//删除
|
||||||
{
|
{
|
||||||
|
if(Programgroup_Numder == null)return;
|
||||||
///弹窗提示确认删除
|
///弹窗提示确认删除
|
||||||
if (System.Windows.Forms.MessageBox.Show(Properties.Resources.Confirm + Properties.Resources.Delete + Programgroup_Numder, "Delete ",
|
if (System.Windows.Forms.MessageBox.Show(Properties.Resources.Confirm + Properties.Resources.Delete + Programgroup_Numder, "Delete ",
|
||||||
System.Windows.Forms.MessageBoxButtons.OKCancel, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK)
|
System.Windows.Forms.MessageBoxButtons.OKCancel, System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ using System.Data.SQLite;
|
|||||||
using System.Diagnostics.Eventing.Reader;
|
using System.Diagnostics.Eventing.Reader;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Net.NetworkInformation;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -23,6 +24,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
using static DyeingComputer.UserClass.SqliteHelper;
|
using static DyeingComputer.UserClass.SqliteHelper;
|
||||||
|
using static DyeingComputer.Windows.ViewStep;
|
||||||
|
|
||||||
namespace DyeingComputer.View
|
namespace DyeingComputer.View
|
||||||
{
|
{
|
||||||
@@ -54,7 +56,7 @@ namespace DyeingComputer.View
|
|||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
|
||||||
string sql_script = "select * from ProgramSteps where ProgramID='" + ProgramID + "' order by Step desc";
|
string sql_script = "select * from ProgramSteps where ProgramID='" + ProgramID + "' order by Step asc";
|
||||||
|
|
||||||
if (sql != null) sql.Clear(); //清空缓存
|
if (sql != null) sql.Clear(); //清空缓存
|
||||||
sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取计划表写入缓存
|
sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取计划表写入缓存
|
||||||
@@ -97,10 +99,40 @@ namespace DyeingComputer.View
|
|||||||
|
|
||||||
private void ProgramgroupView_edit_Click(object sender, RoutedEventArgs e)//编辑
|
private void ProgramgroupView_edit_Click(object sender, RoutedEventArgs e)//编辑
|
||||||
{
|
{
|
||||||
|
if(ID == null) ID = sql.Tables[0].Rows.Count.ToString();
|
||||||
ViewStep viewstop = new ViewStep();
|
ViewStep viewstop = new ViewStep();
|
||||||
|
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Address_ButtonClicked);
|
||||||
viewstop.data = ID;
|
viewstop.data = ID;
|
||||||
viewstop.ShowDialog();
|
viewstop.ShowDialog();
|
||||||
}
|
}
|
||||||
|
private void Address_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
|
||||||
|
{
|
||||||
|
int i = sql.Tables[0].Rows.Count;
|
||||||
|
int n = StrToInt.To16Convert10(ID);
|
||||||
|
if (i == n)
|
||||||
|
{
|
||||||
|
DataRow dr_ = sql.Tables[0].NewRow();//添加表数据
|
||||||
|
dr_["ProgramID"] = ProgramID;
|
||||||
|
dr_["Program"] = ProgramNAME;
|
||||||
|
sql.Tables[0].Rows.Add(dr_);
|
||||||
|
Dat();
|
||||||
|
ID = (n+1).ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
DataRow dr = sql.Tables[0].Rows[n-1];
|
||||||
|
dr.BeginEdit();
|
||||||
|
dr["StepID"] = e.StepID;
|
||||||
|
dr["StepName"] = e.StepNAME;
|
||||||
|
dr["ParameterName"] = e.PNAME;
|
||||||
|
dr["Parameter1"] = e.P1;
|
||||||
|
dr["Parameter2"] = e.P2;
|
||||||
|
dr["Parameter3"] = e.P3;
|
||||||
|
dr["Parameter4"] = e.P4;
|
||||||
|
dr["Parameter5"] = e.P5;
|
||||||
|
dr.EndEdit();
|
||||||
|
|
||||||
|
Grid.ItemsSource = sql.Tables[0].DefaultView;
|
||||||
|
}
|
||||||
|
|
||||||
private void ProgramgroupView_Quit_Click(object sender, RoutedEventArgs e)//退出
|
private void ProgramgroupView_Quit_Click(object sender, RoutedEventArgs e)//退出
|
||||||
{
|
{
|
||||||
@@ -173,25 +205,6 @@ namespace DyeingComputer.View
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public struct Date
|
|
||||||
{
|
|
||||||
public string Step { get; set; }
|
|
||||||
public string StepID { get; set; }
|
|
||||||
public string StepNAME { get; set; }
|
|
||||||
public string PNAME { get; set; }
|
|
||||||
public string P1 { get; set; }
|
|
||||||
public string P2 { get; set; }
|
|
||||||
public string P3 { get; set; }
|
|
||||||
public string P4 { get; set; }
|
|
||||||
public string P5 { get; set; }
|
|
||||||
public string P6 { get; set; }
|
|
||||||
public string P7 { get; set; }
|
|
||||||
public string P8 { get; set; }
|
|
||||||
public string P9 { get; set; }
|
|
||||||
public string P10 { get; set; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,19 +18,19 @@
|
|||||||
|
|
||||||
<TextBlock x:Name="P1N" HorizontalAlignment="Left" Height="30" Margin="10,120,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
<TextBlock x:Name="P1N" HorizontalAlignment="Left" Height="30" Margin="10,120,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
||||||
<TextBox x:Name="P1" HorizontalAlignment="Right" Height="30" Margin="0,120,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
<TextBox x:Name="P1" HorizontalAlignment="Right" Height="30" Margin="0,120,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
||||||
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
Text="0" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
||||||
<TextBlock x:Name="P2N" HorizontalAlignment="Left" Height="30" Margin="10,155,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
<TextBlock x:Name="P2N" HorizontalAlignment="Left" Height="30" Margin="10,155,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
||||||
<TextBox x:Name="P2" HorizontalAlignment="Right" Height="30" Margin="0,155,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
<TextBox x:Name="P2" HorizontalAlignment="Right" Height="30" Margin="0,155,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
||||||
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
Text="0" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
||||||
<TextBlock x:Name="P3N" HorizontalAlignment="Left" Height="30" Margin="10,190,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
<TextBlock x:Name="P3N" HorizontalAlignment="Left" Height="30" Margin="10,190,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
||||||
<TextBox x:Name="P3" HorizontalAlignment="Right" Height="30" Margin="0,190,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
<TextBox x:Name="P3" HorizontalAlignment="Right" Height="30" Margin="0,190,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
||||||
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
Text="0" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
||||||
<TextBlock x:Name="P4N" HorizontalAlignment="Left" Height="30" Margin="10,225,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
<TextBlock x:Name="P4N" HorizontalAlignment="Left" Height="30" Margin="10,225,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
||||||
<TextBox x:Name="P4" HorizontalAlignment="Right" Height="30" Margin="0,225,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
<TextBox x:Name="P4" HorizontalAlignment="Right" Height="30" Margin="0,225,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
||||||
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
Text="0" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
||||||
<TextBlock x:Name="P5N" HorizontalAlignment="Left" Height="30" Margin="10,260,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
<TextBlock x:Name="P5N" HorizontalAlignment="Left" Height="30" Margin="10,260,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="#FFEFEEEE"/>
|
||||||
<TextBox x:Name="P5" HorizontalAlignment="Right" Height="30" Margin="0,260,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
<TextBox x:Name="P5" HorizontalAlignment="Right" Height="30" Margin="0,260,10,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="230" MaxLines="1" ClipToBounds="True"
|
||||||
PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
Text="0" PreviewTextInput="Tb_KeyPress" InputMethod.IsInputMethodEnabled="False" FontSize="20" HorizontalContentAlignment="Right" MaxLength="3"/>
|
||||||
|
|
||||||
<Button Content="{x:Static lang:Resources.YES}" HorizontalAlignment="Left" Height="35" Margin="50,70,0,5" VerticalAlignment="Bottom" Width="80" Click="YES_Click"/>
|
<Button Content="{x:Static lang:Resources.YES}" HorizontalAlignment="Left" Height="35" Margin="50,70,0,5" VerticalAlignment="Bottom" Width="80" Click="YES_Click"/>
|
||||||
<Button Content="{x:Static lang:Resources.NO}" HorizontalAlignment="Right" Height="35" Margin="0,70,50,5" VerticalAlignment="Bottom" Width="80" Click="NO_Click"/>
|
<Button Content="{x:Static lang:Resources.NO}" HorizontalAlignment="Right" Height="35" Margin="0,70,50,5" VerticalAlignment="Bottom" Width="80" Click="NO_Click"/>
|
||||||
|
|||||||
+149
-11
@@ -15,6 +15,8 @@ using System.Windows.Input;
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Net.NetworkInformation;
|
||||||
|
|
||||||
namespace DyeingComputer.Windows
|
namespace DyeingComputer.Windows
|
||||||
{
|
{
|
||||||
@@ -24,6 +26,11 @@ namespace DyeingComputer.Windows
|
|||||||
public partial class ViewStep : Window
|
public partial class ViewStep : Window
|
||||||
{
|
{
|
||||||
public string data { get; set; }
|
public string data { get; set; }
|
||||||
|
//声明一个更新Address的委托
|
||||||
|
public delegate void AddressUpdateHandler(object sender, AddressUpdateEventArgs e);
|
||||||
|
//声明一个更新Address的事件
|
||||||
|
public event AddressUpdateHandler AddressUpdated;
|
||||||
|
|
||||||
public ViewStep()
|
public ViewStep()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -111,12 +118,22 @@ namespace DyeingComputer.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void YES_Click(object sender, RoutedEventArgs e)
|
private void YES_Click(object sender, RoutedEventArgs e)//确认
|
||||||
{
|
{
|
||||||
|
if (boxNAME.Text == null) return;
|
||||||
|
string name = " ";
|
||||||
|
if (P1N.Visibility == Visibility.Visible) name = P1N.Text +":["+P1.Text+"]";
|
||||||
|
if (P2N.Visibility == Visibility.Visible) name += P2N.Text + ":[" + P2.Text + "]";
|
||||||
|
if (P3N.Visibility == Visibility.Visible) name += P3N.Text + ":[" + P3.Text + "]";
|
||||||
|
if (P4N.Visibility == Visibility.Visible) name += P4N.Text + ":[" + P4.Text + "]";
|
||||||
|
if (P5N.Visibility == Visibility.Visible) name += P5N.Text + ":[" + P5.Text + "]";
|
||||||
|
|
||||||
|
var args = new AddressUpdateEventArgs(data, boxNAME.Text, boxID.Text, name.ToString(), P1.Text, P2.Text, P3.Text, P4.Text, P5.Text);
|
||||||
|
AddressUpdated(this, args);
|
||||||
|
this.Close(); //关闭窗口
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NO_Click(object sender, RoutedEventArgs e)
|
private void NO_Click(object sender, RoutedEventArgs e)//关闭
|
||||||
{
|
{
|
||||||
this.Close(); //关闭窗口
|
this.Close(); //关闭窗口
|
||||||
}
|
}
|
||||||
@@ -172,7 +189,7 @@ namespace DyeingComputer.Windows
|
|||||||
P1N.Text = Properties.Resources.Headwaters;
|
P1N.Text = Properties.Resources.Headwaters;
|
||||||
P2N.Text = Properties.Resources.WaterLevel;
|
P2N.Text = Properties.Resources.WaterLevel;
|
||||||
P3N.Text = Properties.Resources.Time;
|
P3N.Text = Properties.Resources.Time;
|
||||||
P3N.Text = Properties.Resources.Number;
|
P4N.Text = Properties.Resources.Number;
|
||||||
P1.Visibility = Visibility.Visible;
|
P1.Visibility = Visibility.Visible;
|
||||||
P1N.Visibility = Visibility.Visible;
|
P1N.Visibility = Visibility.Visible;
|
||||||
P2.Visibility = Visibility.Visible;
|
P2.Visibility = Visibility.Visible;
|
||||||
@@ -284,28 +301,123 @@ namespace DyeingComputer.Windows
|
|||||||
P5N.Visibility = Visibility.Collapsed;
|
P5N.Visibility = Visibility.Collapsed;
|
||||||
break;
|
break;
|
||||||
case 19:
|
case 19:
|
||||||
|
P1N.Text = Properties.Resources.Medicine + Properties.Resources.Tank;
|
||||||
|
P2N.Text = Properties.Resources.Headwaters;
|
||||||
|
P3N.Text = Properties.Resources.WaterLevel;
|
||||||
|
P4N.Text = Properties.Resources.Temperature;
|
||||||
|
P5N.Text = Properties.Resources.Mixing;
|
||||||
|
P1.Visibility = Visibility.Visible;
|
||||||
|
P1N.Visibility = Visibility.Visible;
|
||||||
|
P2.Visibility = Visibility.Visible;
|
||||||
|
P2N.Visibility = Visibility.Visible;
|
||||||
|
P3.Visibility = Visibility.Visible;
|
||||||
|
P3N.Visibility = Visibility.Visible;
|
||||||
|
P4.Visibility = Visibility.Visible;
|
||||||
|
P4N.Visibility = Visibility.Visible;
|
||||||
|
P5.Visibility = Visibility.Visible;
|
||||||
|
P5N.Visibility = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
|
P1N.Text = Properties.Resources.Medicine + Properties.Resources.Tank;
|
||||||
|
P2N.Text = Properties.Resources.Curve;
|
||||||
|
P3N.Text = Properties.Resources.Time;
|
||||||
|
P1.Visibility = Visibility.Visible;
|
||||||
|
P1N.Visibility = Visibility.Visible;
|
||||||
|
P2.Visibility = Visibility.Visible;
|
||||||
|
P2N.Visibility = Visibility.Visible;
|
||||||
|
P3.Visibility = Visibility.Visible;
|
||||||
|
P3N.Visibility = Visibility.Visible;
|
||||||
|
P4.Visibility = Visibility.Collapsed;
|
||||||
|
P4N.Visibility = Visibility.Collapsed;
|
||||||
|
P5.Visibility = Visibility.Collapsed;
|
||||||
|
P5N.Visibility = Visibility.Collapsed;
|
||||||
break;
|
break;
|
||||||
case 21:
|
case 21:
|
||||||
|
P1N.Text = Properties.Resources.Medicine + Properties.Resources.Tank;
|
||||||
|
P2N.Text = Properties.Resources.Type;
|
||||||
|
P3N.Text = Properties.Resources.Step;
|
||||||
|
P4N.Text = Properties.Resources.Advance+Properties.Resources.Time;
|
||||||
|
P1.Visibility = Visibility.Visible;
|
||||||
|
P1N.Visibility = Visibility.Visible;
|
||||||
|
P2.Visibility = Visibility.Visible;
|
||||||
|
P2N.Visibility = Visibility.Visible;
|
||||||
|
P3.Visibility = Visibility.Visible;
|
||||||
|
P3N.Visibility = Visibility.Visible;
|
||||||
|
P4.Visibility = Visibility.Visible;
|
||||||
|
P4N.Visibility = Visibility.Visible;
|
||||||
|
P5.Visibility = Visibility.Collapsed;
|
||||||
|
P5N.Visibility = Visibility.Collapsed;
|
||||||
break;
|
break;
|
||||||
case 22:
|
case 22:
|
||||||
|
P1N.Text = Properties.Resources.Medicine + Properties.Resources.Tank;
|
||||||
|
P2N.Text = Properties.Resources.Type;
|
||||||
|
P3N.Text = Properties.Resources.Flowmeter;
|
||||||
|
P1.Visibility = Visibility.Visible;
|
||||||
|
P1N.Visibility = Visibility.Visible;
|
||||||
|
P2.Visibility = Visibility.Visible;
|
||||||
|
P2N.Visibility = Visibility.Visible;
|
||||||
|
P3.Visibility = Visibility.Visible;
|
||||||
|
P3N.Visibility = Visibility.Visible;
|
||||||
|
P4.Visibility = Visibility.Collapsed;
|
||||||
|
P4N.Visibility = Visibility.Collapsed;
|
||||||
|
P5.Visibility = Visibility.Collapsed;
|
||||||
|
P5N.Visibility = Visibility.Collapsed;
|
||||||
break;
|
break;
|
||||||
case 23:
|
case 23:
|
||||||
|
P1N.Text = Properties.Resources.Target + Properties.Resources.Temperature;
|
||||||
|
P2N.Text = "PH";
|
||||||
|
P1.Visibility = Visibility.Visible;
|
||||||
|
P1N.Visibility = Visibility.Visible;
|
||||||
|
P2.Visibility = Visibility.Visible;
|
||||||
|
P2N.Visibility = Visibility.Visible;
|
||||||
|
P3.Visibility = Visibility.Collapsed;
|
||||||
|
P3N.Visibility = Visibility.Collapsed;
|
||||||
|
P4.Visibility = Visibility.Collapsed;
|
||||||
|
P4N.Visibility = Visibility.Collapsed;
|
||||||
|
P5.Visibility = Visibility.Collapsed;
|
||||||
|
P5N.Visibility = Visibility.Collapsed;
|
||||||
break;
|
break;
|
||||||
case 24:
|
case 24:
|
||||||
|
P1N.Text = Properties.Resources.Target + Properties.Resources.Temperature;
|
||||||
|
P2N.Text = Properties.Resources.Rate;
|
||||||
|
P3N.Text = "PH";
|
||||||
|
P1.Visibility = Visibility.Visible;
|
||||||
|
P1N.Visibility = Visibility.Visible;
|
||||||
|
P2.Visibility = Visibility.Visible;
|
||||||
|
P2N.Visibility = Visibility.Visible;
|
||||||
|
P3.Visibility = Visibility.Visible;
|
||||||
|
P3N.Visibility = Visibility.Visible;
|
||||||
|
P4.Visibility = Visibility.Collapsed;
|
||||||
|
P4N.Visibility = Visibility.Collapsed;
|
||||||
|
P5.Visibility = Visibility.Collapsed;
|
||||||
|
P5N.Visibility = Visibility.Collapsed;
|
||||||
break;
|
break;
|
||||||
case 25:
|
case 25:
|
||||||
|
P1N.Text = Properties.Resources.Time;
|
||||||
|
P1.Visibility = Visibility.Visible;
|
||||||
|
P1N.Visibility = Visibility.Visible;
|
||||||
|
P2.Visibility = Visibility.Collapsed;
|
||||||
|
P2N.Visibility = Visibility.Collapsed;
|
||||||
|
P3.Visibility = Visibility.Collapsed;
|
||||||
|
P3N.Visibility = Visibility.Collapsed;
|
||||||
|
P4.Visibility = Visibility.Collapsed;
|
||||||
|
P4N.Visibility = Visibility.Collapsed;
|
||||||
|
P5.Visibility = Visibility.Collapsed;
|
||||||
|
P5N.Visibility = Visibility.Collapsed;
|
||||||
break;
|
break;
|
||||||
case 26:
|
case 26:
|
||||||
|
P1N.Text = Properties.Resources.Beginning+ Properties.Resources.Temperature;
|
||||||
|
P2N.Text = "PH";
|
||||||
|
P1.Visibility = Visibility.Visible;
|
||||||
|
P1N.Visibility = Visibility.Visible;
|
||||||
|
P2.Visibility = Visibility.Visible;
|
||||||
|
P2N.Visibility = Visibility.Visible;
|
||||||
|
P3.Visibility = Visibility.Collapsed;
|
||||||
|
P3N.Visibility = Visibility.Collapsed;
|
||||||
|
P4.Visibility = Visibility.Collapsed;
|
||||||
|
P4N.Visibility = Visibility.Collapsed;
|
||||||
|
P5.Visibility = Visibility.Collapsed;
|
||||||
|
P5N.Visibility = Visibility.Collapsed;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -322,5 +434,31 @@ namespace DyeingComputer.Windows
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class AddressUpdateEventArgs : System.EventArgs
|
||||||
|
{
|
||||||
|
public AddressUpdateEventArgs(string dStep, string dStepID, string dStepNAME, string dPNAME, string dP1, string dP2, string dP3, string dP4, string dP5)
|
||||||
|
{
|
||||||
|
this.StepID = dStepID;
|
||||||
|
this.Step = dStep;
|
||||||
|
this.StepNAME = dStepNAME;
|
||||||
|
this.PNAME = dPNAME;
|
||||||
|
this.P1 = dP1;
|
||||||
|
this.P2 = dP2;
|
||||||
|
this.P3 = dP3;
|
||||||
|
this.P4 = dP4;
|
||||||
|
this.P5 = dP5;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Step { get; set; }
|
||||||
|
public string StepID { get; set; }
|
||||||
|
public string StepNAME { get; set; }
|
||||||
|
public string PNAME { get; set; }
|
||||||
|
public string P1 { get; set; }
|
||||||
|
public string P2 { get; set; }
|
||||||
|
public string P3 { get; set; }
|
||||||
|
public string P4 { get; set; }
|
||||||
|
public string P5 { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user