diff --git a/DyeingComputer.csproj b/DyeingComputer.csproj index a241214..621939d 100644 --- a/DyeingComputer.csproj +++ b/DyeingComputer.csproj @@ -413,6 +413,8 @@ + + diff --git a/Lmage/IconParkAutoFocus.png b/Lmage/IconParkAutoFocus.png new file mode 100644 index 0000000..48e22a4 Binary files /dev/null and b/Lmage/IconParkAutoFocus.png differ diff --git a/MainWindow.xaml b/MainWindow.xaml index 26a1be7..a5d3fee 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -162,9 +162,10 @@ TextWrapping="Wrap" VerticalAlignment="Top" Width="150" FontSize="20" Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}" IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/> + - + - - + - + - + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 9b3c4df..2c41b64 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -207,6 +207,17 @@ namespace DyeingComputer ((Image)sender).RenderTransform = Transform.Identity; MainWindowViewModel.UserInfoStart = 901; MainWindowViewModel.UserInfo = Properties.Resources.Unlock; + }//解锁 + + private void Image_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e) + { + ((Image)sender).RenderTransform = new ScaleTransform(0.9, 0.9); } + private void Image_MouseLeftButtonUp_1(object sender, MouseButtonEventArgs e) + { + ((Image)sender).RenderTransform = Transform.Identity; + MainWindowViewModel.UserInfoStart = 901; + MainWindowViewModel.UserInfo = Properties.Resources.Manual; + }//手动 } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 2bc7c83..d3ba36b 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -645,6 +645,15 @@ namespace DyeingComputer.Properties { } } + /// + /// 查找类似 Manual 的本地化字符串。 + /// + public static string Manual { + get { + return ResourceManager.GetString("Manual", resourceCulture); + } + } + /// /// 查找类似 MasterCylinder 的本地化字符串。 /// diff --git a/Properties/Resources.en-US.resx b/Properties/Resources.en-US.resx index 244fb71..ff05a48 100644 --- a/Properties/Resources.en-US.resx +++ b/Properties/Resources.en-US.resx @@ -552,4 +552,7 @@ Unlock + + Manual + \ No newline at end of file diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 4354b5b..e25ec31 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -552,4 +552,7 @@ Unlock + + Manual + \ No newline at end of file diff --git a/Properties/Resources.zh-CN.resx b/Properties/Resources.zh-CN.resx index 7b5b70b..8c5827e 100644 --- a/Properties/Resources.zh-CN.resx +++ b/Properties/Resources.zh-CN.resx @@ -552,4 +552,7 @@ 解锁 + + 手动 + \ No newline at end of file diff --git a/Properties/Resources.zh-TW.resx b/Properties/Resources.zh-TW.resx index 861607a..0b187c4 100644 --- a/Properties/Resources.zh-TW.resx +++ b/Properties/Resources.zh-TW.resx @@ -552,4 +552,7 @@ + + + \ No newline at end of file diff --git a/ViewModel/MainWindowViewModel.cs b/ViewModel/MainWindowViewModel.cs index 7d8c173..10a578f 100644 --- a/ViewModel/MainWindowViewModel.cs +++ b/ViewModel/MainWindowViewModel.cs @@ -125,6 +125,17 @@ namespace DyeingComputer.ViewModel OnPropertyChanged("Link_bool"); } } + public static bool _AUTO_bool; + Visibility AUTO_bool_xml; //显示手自动状态 + public Visibility AUTO_bool // + { + get => AUTO_bool_xml; + set + { + AUTO_bool_xml = value; + OnPropertyChanged("AUTO_bool"); + } + } System.Windows.Media.Brush Status_str_coloer; public System.Windows.Media.Brush Status_Str_coloer { @@ -134,7 +145,7 @@ namespace DyeingComputer.ViewModel Status_str_coloer = value; OnPropertyChanged("Status_Str_coloer"); } - } + } public int wORK_run; //显示状态 public int WORK_run //通知UI控件参数改变 { @@ -239,6 +250,7 @@ namespace DyeingComputer.ViewModel UserButton = false; _Lock_bool = false; _Link_bool = false; + _AUTO_bool = false; ProgramgroupView_run = new RelayCommand( execute:ProgramgroupView_run_ );//开始/暂停事件 ProgramgroupView_stop = new RelayCommand( @@ -428,7 +440,7 @@ namespace DyeingComputer.ViewModel Work_Numder = WorkNumder.ToString(); StatusStr = Status_Str; Program_Name = ProgramName; - if (dt_TP != null) Process_step = dt_TP.Select("Step=" + RUN_STEPID).First().Field("ParameterName"); + if (dt_TP.Rows.Count>0) Process_step = dt_TP.Select("Step=" + RUN_STEPID).First().Field("ParameterName"); if (set_) { set_ = false; SYS_SET(); }//设置更新 if (!SETP_runtime) DIDETime++; @@ -449,8 +461,12 @@ namespace DyeingComputer.ViewModel Updata_dtd("3003", Alert_yellow); Updata_dtd("3004", Alert_bell); - if (_Lock_bool) { Lock_bool = Visibility.Visible; } else { Lock_bool = Visibility.Collapsed; }//锁图标 - if (_Link_bool) { Link_bool = Visibility.Visible; } else { Link_bool = Visibility.Collapsed; }//连线图标 + if (_Lock_bool) { Lock_bool = Visibility.Visible; } + else { Lock_bool = Visibility.Collapsed; }//锁图标 + if (_Link_bool) { Link_bool = Visibility.Visible; } + else { Link_bool = Visibility.Collapsed; }//连线图标 + if (_AUTO_bool) { AUTO_bool = Visibility.Visible; Updata_dtd("3005",true); } + else { AUTO_bool = Visibility.Collapsed; }//手自动图标 if ((Selet_dtm("1010") < 1) || (Selet_dtm("1010") > 160)) { ERRinf.ERRinf_w(errTabler, Resources.Temperature + Resources.Sensor + Resources.Malfunction, "ERR101"); } //温度故障提示