diff --git a/MainWindow.xaml b/MainWindow.xaml
index 399d02b..df8cfad 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -124,9 +124,9 @@
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
+ Source="/link.png" Visibility="{Binding Link_bool}"/>
+ Source="/LOCK.png" Visibility="{Binding Lock_bool}"/>
diff --git a/ViewModel/MainWindowViewModel.cs b/ViewModel/MainWindowViewModel.cs
index 44feac8..dc365c6 100644
--- a/ViewModel/MainWindowViewModel.cs
+++ b/ViewModel/MainWindowViewModel.cs
@@ -115,8 +115,8 @@ namespace DyeingComputer.ViewModel
_ = AsyncTcpServer.Main();
IsInteractive = false;
UserButton = false;
- Lock_bool = false;
- Link_bool = false;
+ _Lock_bool = false;
+ _Link_bool = false;
ProgramgroupView_run = new RelayCommand(
execute:ProgramgroupView_run_ );//开始/暂停事件
@@ -310,22 +310,24 @@ namespace DyeingComputer.ViewModel
}
}
bool _Lock_bool;
- public bool Lock_bool//锁图标
+ Visibility _Lock_bool_xml;
+ public Visibility Lock_bool//锁图标
{
- get => _Lock_bool;
+ get => _Lock_bool_xml;
set
{
- _Lock_bool = value;
+ _Lock_bool_xml = value;
OnPropertyChanged("Lock_bool");
}
}
bool _Link_bool;
- public bool Link_bool//连接图标
+ Visibility _Link_bool_xml;
+ public Visibility Link_bool//连接图标
{
- get => _Link_bool;
+ get => _Link_bool_xml;
set
{
- _Link_bool = value;
+ _Link_bool_xml = value;
OnPropertyChanged("Link_bool");
}
}
@@ -421,6 +423,8 @@ 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 ((Selet_dtm("1010") < 1) || (Selet_dtm("1010") > 160))
{ ERRinf.ERRinf_w(errTabler, Resources.Temperature + Resources.Sensor + Resources.Malfunction, "ERR101"); } //温度故障提示
@@ -442,8 +446,12 @@ namespace DyeingComputer.ViewModel
if (Selet_dtd("2016")) { ERRinf.ERRinf_w(errTabler, Resources.Fault + ":" + Resources.Pump + "-3", "ERR104-3"); } //加料泵
else { ERRinf.ERRinf_d(errTabler, "ERR100"); }
}
+ uint TX_t;
void Tick_Event_5S()//Tick_Event周期执行事件5S
{
+ if (TX_t != TX) { _Link_bool = true; } else { _Link_bool = false; }
+ TX_t = TX;
+
if(WORK_RUN !=0) Chart();//写入记录
if ((Selet_dtm("1025") > 0) && (Selet_dtd("3021") || Selet_dtd("3022")))