diff --git a/MainWindow.xaml b/MainWindow.xaml index a7d12d9..0b872f8 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -126,7 +126,8 @@ + Source="/LOCK.png" Visibility="{Binding Lock_bool}" MouseLeftButtonDown="Image_MouseLeftButtonDown" + MouseLeftButtonUp="Image_MouseLeftButtonUp"/> diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index f47bd28..9b3c4df 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -198,6 +198,15 @@ namespace DyeingComputer } } - + private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + ((Image)sender).RenderTransform = new ScaleTransform(0.9,0.9); + } + private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) + { + ((Image)sender).RenderTransform = Transform.Identity; + MainWindowViewModel.UserInfoStart = 901; + MainWindowViewModel.UserInfo = Properties.Resources.Unlock; + } } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index bd85cac..2bc7c83 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -1284,6 +1284,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Unlock 的本地化字符串。 + /// + public static string Unlock { + get { + return ResourceManager.GetString("Unlock", resourceCulture); + } + } + /// /// 查找类似 value 的本地化字符串。 /// diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx index 5e8daa4..244fb71 100644 --- a/Properties/Resources.en-US.resx +++ b/Properties/Resources.en-US.resx @@ -549,4 +549,7 @@ RUN + + Unlock + \ No newline at end of file diff --git a/Properties/Resources.resx b/Properties/Resources.resx index d3dc54d..4354b5b 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -549,4 +549,7 @@ RUN + + Unlock + \ No newline at end of file diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx index 8ab622a..7b5b70b 100644 --- a/Properties/Resources.zh-CN.resx +++ b/Properties/Resources.zh-CN.resx @@ -549,4 +549,7 @@ 运行 + + 解锁 + \ No newline at end of file diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx index 4cf7d94..861607a 100644 --- a/Properties/Resources.zh-TW.resx +++ b/Properties/Resources.zh-TW.resx @@ -549,4 +549,7 @@ 運行 + + + \ No newline at end of file diff --git a/UserClass/AsyncTcpServer.cs b/UserClass/AsyncTcpServer.cs index 9b619f0..217f513 100644 --- a/UserClass/AsyncTcpServer.cs +++ b/UserClass/AsyncTcpServer.cs @@ -469,6 +469,8 @@ namespace DyeingComputer.UserClass Dictionary Chart_new = new Dictionary();//缓存函数 Chart_new.Add("ERR", MainWindowViewModel.ERR_JOG); Chart_new.Add("UserButton", MainWindowViewModel._UserButton); + Chart_new.Add("UserInfoStart", MainWindowViewModel.UserInfoStart); + Chart_new.Add("UserInfo", MainWindowViewModel.UserInfo); Chart_new.Add("WORK_RUN", MainWindowViewModel.WORK_RUN); Chart_new.Add("RUN_STEPID", MainWindowViewModel.RUN_STEPID); Chart_new.Add("LOCK", MainWindowViewModel._Lock_bool); @@ -492,6 +494,8 @@ namespace DyeingComputer.UserClass Chart_new.Add("STLC", MainWindowViewModel.Selet_dtm("1019")); client.SendAsync("SC830" + "[" + MainWindowViewModel.S01 + "]" + Chart_new.ToJsonString()); MainWindowViewModel.TX++; + + MainWindowViewModel.UserInfoStart = 900; } catch (Exception ex) { client.SendAsync("SC931" + "[" + MainWindowViewModel.S01 + "]" + ex); } } diff --git a/ViewModel/MainWindowViewModel.cs b/ViewModel/MainWindowViewModel.cs index 678bf66..851c7e1 100644 --- a/ViewModel/MainWindowViewModel.cs +++ b/ViewModel/MainWindowViewModel.cs @@ -80,6 +80,8 @@ namespace DyeingComputer.ViewModel public static string SYSKEY; public static UInt32 RX = 0; public static UInt32 TX = 0; + public static int UserInfoStart = 900; + public static string UserInfo; public ICommand ProgramgroupView_stop { get; } bool _isInteractive; public bool IsInteractive//步骤表交互选择