sc 4 months ago
parent
commit
aad713c841
  1. 56
      MainWindow.xaml
  2. 22
      ViewModel/MainWindowViewModel.cs

56
MainWindow.xaml

@ -58,19 +58,43 @@
<Grid>
<Rectangle Margin="0,0,0,0" Fill="#FFCCCCCC" VerticalAlignment="Bottom" Height="40"/>
<RadioButton Content="{x:Static lang:Resources.WorkOrder}" x:Name="Work_Order" Tag="&#xF2d2;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.TechnologicalProcess}" x:Name="Technological_Process" Tag="&#xF036;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="200,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.CurveDiagram}" x:Name="Curve_Diagram" Tag="&#xF1fe;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="400,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.EquipmentSimulation}" x:Name="Equipment_Simulation" Tag="&#xF1b3;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="600,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.HistoryRecords}" x:Name="History_Records" Tag="&#xF15C;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="800,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.Next}" x:Name="Next" Tag="&#xF061;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Right" Height="40" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_toolbar" GroupName="toolbar"/>
<RadioButton Content="{x:Static lang:Resources.WorkOrder}" x:Name="Work_Order" Tag="&#xF2d2;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="0,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.TechnologicalProcess}" x:Name="Technological_Process" Tag="&#xF036;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="200,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.CurveDiagram}" x:Name="Curve_Diagram" Tag="&#xF1fe;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="400,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.EquipmentSimulation}" x:Name="Equipment_Simulation" Tag="&#xF1b3;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="600,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.HistoryRecords}" x:Name="History_Records" Tag="&#xF15C;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="800,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page"/>
<RadioButton Content="{x:Static lang:Resources.Next}" x:Name="Next" Tag="&#xF061;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Right" Height="40" Margin="0,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_toolbar" GroupName="toolbar"/>
<RadioButton Content="{x:Static lang:Resources.InOut}" x:Name="In_Out" Tag="&#xF065;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.SysSet}" x:Name="Sys_Set" Tag="&#xF2a2;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="200,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.ParameterSet}" x:Name="Parameter_Set" Tag="&#xF013;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="400,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.Programgroup}" x:Name="Program_group" Tag="&#xF00a;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="600,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.EngineerSet}" x:Name="Engineer_Set" Tag="&#xF0f0;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="800,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.Previous}" x:Name="Previous" Tag="&#xF060;" Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Right" Height="40" Margin="0,0,0,0" VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_toolbar" GroupName="toolbar" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.InOut}" x:Name="In_Out" Tag="&#xF065;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="0,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.SysSet}" x:Name="Sys_Set" Tag="&#xF2a2;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="200,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.ParameterSet}" x:Name="Parameter_Set" Tag="&#xF013;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="400,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.Programgroup}" x:Name="Program_group" Tag="&#xF00a;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="600,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.EngineerSet}" x:Name="Engineer_Set" Tag="&#xF0f0;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Left" Height="40" Margin="800,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_Page" Visibility="Hidden"/>
<RadioButton Content="{x:Static lang:Resources.Previous}" x:Name="Previous" Tag="&#xF060;"
Style="{DynamicResource RadioButtonStyle}" HorizontalAlignment="Right" Height="40" Margin="0,0,0,0"
VerticalAlignment="Bottom" Width="200" Background="#FFCCCCCC" Checked="RadioButton_toolbar" GroupName="toolbar" Visibility="Hidden"/>
<ContentControl x:Name="container" Margin="0,50,0,40"/>
@ -83,7 +107,6 @@
TextWrapping="Wrap" VerticalAlignment="Top" Width="100" FontSize="12"
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
IsReadOnly="True" IsUndoEnabled="False" MaxLines="1" IsEnabled="False"/>
<TextBox Text="{Binding Work_Temp}" HorizontalAlignment="Left" Height="30" Margin="0,20,0,0"
TextWrapping="Wrap" VerticalAlignment="Top" Width="100" FontSize="20"
Background="{x:Null}" BorderBrush="{x:Null}" SelectionBrush="{x:Null}"
@ -100,9 +123,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"/>
<Image HorizontalAlignment="Right" Height="40" VerticalAlignment="Top" Width="40" Margin="0,5,220,5" Source="/link.png"/>
<Image HorizontalAlignment="Right" Height="40" VerticalAlignment="Top" Width="40" Margin="0,5,270,5" Source="/LOCK.png"/>
<Image HorizontalAlignment="Right" Height="40" VerticalAlignment="Top" Width="40" Margin="0,5,220,5"
Source="/link.png"/>
<Image HorizontalAlignment="Right" Height="40" VerticalAlignment="Top" Width="40" Margin="0,5,270,5"
Source="/LOCK.png"/>
</Grid>
</Grid>
</Window>

22
ViewModel/MainWindowViewModel.cs

@ -115,6 +115,8 @@ namespace DyeingComputer.ViewModel
_ = AsyncTcpServer.Main();
IsInteractive = false;
UserButton = false;
Lock_bool = false;
Link_bool = false;
ProgramgroupView_run = new RelayCommand(
execute:ProgramgroupView_run_ );//开始/暂停事件
@ -307,6 +309,26 @@ namespace DyeingComputer.ViewModel
OnPropertyChanged("UserButton");
}
}
bool _Lock_bool;
public bool Lock_bool//锁图标
{
get => _Lock_bool;
set
{
_Lock_bool = value;
OnPropertyChanged("Lock_bool");
}
}
bool _Link_bool;
public bool Link_bool//连接图标
{
get => _Link_bool;
set
{
_Link_bool = value;
OnPropertyChanged("Link_bool");
}
}
public string work_Temp; //显示温度
public string Work_Temp //通知UI控件参数改变
{

Loading…
Cancel
Save