运行暂停按钮功能
This commit is contained in:
commit
87bec34e0a
9 files changed
+147
-27
No files matched your search
Generated
+9
@@ -897,6 +897,15 @@ namespace DyeingComputer.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Run/Pause 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string R_P {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("R_P", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 RapidAcidAddition 的本地化字符串。
|
/// 查找类似 RapidAcidAddition 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -492,4 +492,7 @@
|
|||||||
<data name="Protocols" xml:space="preserve">
|
<data name="Protocols" xml:space="preserve">
|
||||||
<value>Protocols</value>
|
<value>Protocols</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="R_P" xml:space="preserve">
|
||||||
|
<value>Run/Pause</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -492,4 +492,7 @@
|
|||||||
<data name="Protocols" xml:space="preserve">
|
<data name="Protocols" xml:space="preserve">
|
||||||
<value>Protocols</value>
|
<value>Protocols</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="R_P" xml:space="preserve">
|
||||||
|
<value>Run/Pause</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -492,4 +492,7 @@
|
|||||||
<data name="Protocols" xml:space="preserve">
|
<data name="Protocols" xml:space="preserve">
|
||||||
<value>协议</value>
|
<value>协议</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="R_P" xml:space="preserve">
|
||||||
|
<value>运行/暂停</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -492,4 +492,7 @@
|
|||||||
<data name="Protocols" xml:space="preserve">
|
<data name="Protocols" xml:space="preserve">
|
||||||
<value />
|
<value />
|
||||||
</data>
|
</data>
|
||||||
|
<data name="R_P" xml:space="preserve">
|
||||||
|
<value />
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -292,7 +292,7 @@ namespace DyeingComputer.UserClass
|
|||||||
|
|
||||||
var _TechnologicalProcessView = Application.Current.Windows.Cast<UserControl>().FirstOrDefault(window => window is TechnologicalProcessView) as TechnologicalProcessView;//跨页面
|
var _TechnologicalProcessView = Application.Current.Windows.Cast<UserControl>().FirstOrDefault(window => window is TechnologicalProcessView) as TechnologicalProcessView;//跨页面
|
||||||
// _TechnologicalProcessView.Grid.ItemsSource = TechnologicalProcessView.sql.Tables[0].DefaultView;
|
// _TechnologicalProcessView.Grid.ItemsSource = TechnologicalProcessView.sql.Tables[0].DefaultView;
|
||||||
_TechnologicalProcessView.Grid.SelectedIndex = -1;
|
_TechnologicalProcessView.GridSTEP.SelectedIndex = -1;
|
||||||
/**存入信息**/
|
/**存入信息**/
|
||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
|||||||
@@ -10,17 +10,24 @@
|
|||||||
mc:Ignorable="d" Loaded="UserControl_Loaded"
|
mc:Ignorable="d" Loaded="UserControl_Loaded"
|
||||||
KeyDown="UserControl_KeyDown"
|
KeyDown="UserControl_KeyDown"
|
||||||
d:DesignHeight="630" d:DesignWidth="1280">
|
d:DesignHeight="630" d:DesignWidth="1280">
|
||||||
<Grid Focusable="True">
|
<Grid>
|
||||||
<DataGrid x:Name="Grid" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_SelectionChanged"
|
<DataGrid x:Name="GridSTEP" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_SelectionChanged"
|
||||||
Margin="630,40,0,0" d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
Margin="630,40,0,0" d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||||
ItemsSource="{Binding Path=TechnologicalProcess_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
ItemsSource="{Binding Path=TechnologicalProcess_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="{x:Null}"
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="{x:Null}"
|
||||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False"
|
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False"
|
||||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
||||||
CanUserAddRows="True" CanUserDeleteRows="False" HeadersVisibility ="Column"
|
CanUserAddRows="True" CanUserDeleteRows="False" HeadersVisibility ="Column"
|
||||||
Background="White" SelectionMode="Single" FontSize="15" MinHeight="632" TabIndex="1" Focusable="True">
|
Background="White" SelectionMode="Single" FontSize="15" MinHeight="632" TabIndex="1" Focusable="True" >
|
||||||
|
<DataGrid.Resources>
|
||||||
|
<Style TargetType="ScrollViewer">
|
||||||
|
<Setter Property="PanningMode" Value="VerticalOnly"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.Resources>
|
||||||
<DataGrid.RowStyle >
|
<DataGrid.RowStyle >
|
||||||
<Style TargetType="{x:Type DataGridRow}">
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
|
<Setter Property="IsHitTestVisible" Value="{Binding DataContext.IsInteractive,
|
||||||
|
RelativeSource={RelativeSource AncestorType=DataGrid}}"/>
|
||||||
<Setter Property="Height" Value="30" />
|
<Setter Property="Height" Value="30" />
|
||||||
<Setter Property="FontSize" Value="25" />
|
<Setter Property="FontSize" Value="25" />
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@@ -77,7 +84,10 @@
|
|||||||
<DataGridTextColumn Binding="{Binding DYELOT}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding DYELOT}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<TextBlock x:Name="log" HorizontalAlignment="Left" TextWrapping="Wrap" Width="600" FontSize="25" Background="White" Text="{Binding Sys_log}" Margin="0,40,0,0"/>
|
<ScrollViewer HorizontalAlignment="Left" Width="600" Margin="0,40,0,0" VerticalScrollBarVisibility="Auto"
|
||||||
|
PanningMode="VerticalOnly">
|
||||||
|
<TextBlock x:Name="log" TextWrapping="Wrap" FontSize="25" Background="White" Text="{Binding Sys_log}" />
|
||||||
|
</ScrollViewer>
|
||||||
<TextBlock x:Name="name" HorizontalAlignment="Left" Margin="600,0,0,0" TextWrapping="Wrap" FontSize="24" Background="#FFD0D0D0" Text="{Binding Program_Name}" Height="30" Block.TextAlignment="Center">
|
<TextBlock x:Name="name" HorizontalAlignment="Left" Margin="600,0,0,0" TextWrapping="Wrap" FontSize="24" Background="#FFD0D0D0" Text="{Binding Program_Name}" Height="30" Block.TextAlignment="Center">
|
||||||
<TextBlock.LayoutTransform>
|
<TextBlock.LayoutTransform>
|
||||||
<!--文字同样旋转90度-->
|
<!--文字同样旋转90度-->
|
||||||
@@ -89,10 +99,17 @@
|
|||||||
<Button Content="{x:Static lang:Resources.Receipt}" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White" Click="Receipt_Click"/>
|
<Button Content="{x:Static lang:Resources.Receipt}" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White" Click="Receipt_Click"/>
|
||||||
<Button Content="{x:Static lang:Resources.ParameterSet}" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White" Click="ParameterSet_Click"/>
|
<Button Content="{x:Static lang:Resources.ParameterSet}" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White" Click="ParameterSet_Click"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<WrapPanel Orientation="Horizontal" Background="#FFCCCCCC" VerticalAlignment="Top" Margin="630,0,0,0">
|
<WrapPanel Orientation="Horizontal" Background="#FFCCCCCC" VerticalAlignment="Top" Margin="630,0,0,0">
|
||||||
<Button Content="{x:Static lang:Resources.edit}" x:Name="ProgramgroupView_edit" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White" Click="ProgramgroupView_edit_Click"/>
|
<Button Content="{x:Static lang:Resources.edit}" x:Name="ProgramgroupView_edit" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
||||||
<Button Content="{x:Static lang:Resources.Delete}" x:Name="ProgramgroupView_del" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White" Click="ProgramgroupView_del_Click"/>
|
Click="ProgramgroupView_edit_Click" IsEnabled="{Binding UserButton}"/>
|
||||||
<Button Content="{x:Static lang:Resources.Insert}" x:Name="ProgramgroupView_Insert" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White" Click="ProgramgroupView_Insert_Click"/>
|
<Button Content="{x:Static lang:Resources.Delete}" x:Name="ProgramgroupView_del" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
||||||
|
Click="ProgramgroupView_del_Click" IsEnabled="{Binding UserButton}"/>
|
||||||
|
<Button Content="{x:Static lang:Resources.Insert}" x:Name="ProgramgroupView_Insert" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
||||||
|
Click="ProgramgroupView_Insert_Click" IsEnabled="{Binding UserButton}"/>
|
||||||
|
<Button Content="{x:Static lang:Resources.R_P}" x:Name="ProgramgroupView_run" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
||||||
|
Click="ProgramgroupView_run_Click" Command="{Binding ProgramgroupView_run}"/>
|
||||||
|
<Button Content="{x:Static lang:Resources.StopProcess}" x:Name="ProgramgroupView_stop" FontSize="20" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="200" Background="White"
|
||||||
|
Click="ProgramgroupView_stop_Click" IsEnabled="{Binding UserButton}"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -33,11 +33,28 @@ namespace DyeingComputer.View
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class TechnologicalProcessView : UserControl
|
public partial class TechnologicalProcessView : UserControl
|
||||||
{
|
{
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
protected virtual void OnPropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
if (PropertyChanged != null)
|
||||||
|
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
public void RaisePropertyChanged(string propertyName)
|
||||||
|
{
|
||||||
|
if (PropertyChanged != null)
|
||||||
|
{
|
||||||
|
if (propertyName != null)
|
||||||
|
{
|
||||||
|
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public TechnologicalProcessView()
|
public TechnologicalProcessView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
//Grid.DataContext = new MainWindowViewModel();
|
//Grid.DataContext = new MainWindowViewModel();
|
||||||
FocusManager.SetFocusedElement(Grid, Grid);
|
// FocusManager.SetFocusedElement(Grid, Grid);
|
||||||
// if (workName != null)
|
// if (workName != null)
|
||||||
// {
|
// {
|
||||||
// TechnologicalProcess_Import();
|
// TechnologicalProcess_Import();
|
||||||
@@ -45,7 +62,11 @@ namespace DyeingComputer.View
|
|||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
TechnologicalProcess_sql();
|
TechnologicalProcess_sql();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// ProgramgroupView_edit.IsEnabled = false;
|
||||||
|
// ProgramgroupView_del.IsEnabled = false;
|
||||||
|
// ProgramgroupView_Insert.IsEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static object workName;
|
public static object workName;
|
||||||
@@ -108,11 +129,11 @@ namespace DyeingComputer.View
|
|||||||
// Grid.DataContext = new MainWindowViewModel();
|
// Grid.DataContext = new MainWindowViewModel();
|
||||||
if (workName != null)
|
if (workName != null)
|
||||||
{
|
{
|
||||||
Grid.SelectedIndex = 0;
|
GridSTEP.SelectedIndex = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MainWindowViewModel.WORK_RUN != 0) Grid.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
if (MainWindowViewModel.WORK_RUN != 0) GridSTEP.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
||||||
}
|
}
|
||||||
CountDown();
|
CountDown();
|
||||||
}
|
}
|
||||||
@@ -166,7 +187,7 @@ namespace DyeingComputer.View
|
|||||||
dr.EndEdit();
|
dr.EndEdit();
|
||||||
|
|
||||||
dt_TP = sql.Tables[0];
|
dt_TP = sql.Tables[0];
|
||||||
Grid.SelectedIndex = -1;
|
GridSTEP.SelectedIndex = -1;
|
||||||
|
|
||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
@@ -208,7 +229,7 @@ namespace DyeingComputer.View
|
|||||||
dt_TP.Rows.RemoveAt(d - 1);
|
dt_TP.Rows.RemoveAt(d - 1);
|
||||||
|
|
||||||
Dat();
|
Dat();
|
||||||
Grid.SelectedIndex = -1;
|
GridSTEP.SelectedIndex = -1;
|
||||||
|
|
||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
@@ -275,7 +296,16 @@ namespace DyeingComputer.View
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ProgramgroupView_run_Click(object sender, RoutedEventArgs e)//运行/暂停
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ProgramgroupView_stop_Click(object sender, RoutedEventArgs e)//结束工艺
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void ParameterSet_Click(object sender, RoutedEventArgs e)
|
private void ParameterSet_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -284,20 +314,24 @@ namespace DyeingComputer.View
|
|||||||
|
|
||||||
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (MainWindowViewModel.WORK_RUN == 2) Grid.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
if (MainWindowViewModel.WORK_RUN == 2) GridSTEP.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
||||||
int rownum = Grid.SelectedIndex;//获取鼠标选中行并定义变量
|
int rownum = GridSTEP.SelectedIndex;//获取鼠标选中行并定义变量
|
||||||
if (rownum != -1)//判断鼠标定位是否有效
|
if (rownum != -1)//判断鼠标定位是否有效
|
||||||
{
|
{
|
||||||
ID = (Grid.Columns[2].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第0列,
|
ID = (GridSTEP.Columns[2].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第0列,
|
||||||
Numder = (Grid.Columns[3].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第1列,
|
Numder = (GridSTEP.Columns[3].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第1列,
|
||||||
P1 = (Grid.Columns[6].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第6列,
|
P1 = (GridSTEP.Columns[6].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第6列,
|
||||||
P2 = (Grid.Columns[7].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第7列,
|
P2 = (GridSTEP.Columns[7].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第7列,
|
||||||
P3 = (Grid.Columns[8].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第8列,
|
P3 = (GridSTEP.Columns[8].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第8列,
|
||||||
P4 = (Grid.Columns[9].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第9列,
|
P4 = (GridSTEP.Columns[9].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第9列,
|
||||||
P5 = (Grid.Columns[10].GetCellContent(Grid.Items[rownum]) as TextBlock).Text;//定位第10列,
|
P5 = (GridSTEP.Columns[10].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第10列,
|
||||||
|
|
||||||
|
ProgramgroupView_edit.IsEnabled = true;
|
||||||
|
ProgramgroupView_del.IsEnabled = true;
|
||||||
|
ProgramgroupView_Insert.IsEnabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CountDown()
|
public void CountDown()
|
||||||
{
|
{
|
||||||
DispatcherTimer timer1s = new DispatcherTimer//初始化循环,每1秒调用一次Tick
|
DispatcherTimer timer1s = new DispatcherTimer//初始化循环,每1秒调用一次Tick
|
||||||
@@ -309,7 +343,7 @@ namespace DyeingComputer.View
|
|||||||
}
|
}
|
||||||
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
||||||
{
|
{
|
||||||
if (MainWindowViewModel.WORK_RUN == 2) Grid.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
if (MainWindowViewModel.WORK_RUN == 2) GridSTEP.SelectedIndex = MainWindowViewModel.RUN_STEPID - 1;//设定图表显示
|
||||||
if (sql != null)
|
if (sql != null)
|
||||||
{
|
{
|
||||||
dt_TP= sql.Tables[0];
|
dt_TP= sql.Tables[0];
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ using System.Diagnostics.Eventing.Reader;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using TouchSocket.Sockets;
|
using TouchSocket.Sockets;
|
||||||
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
|
||||||
|
|
||||||
namespace DyeingComputer.ViewModel
|
namespace DyeingComputer.ViewModel
|
||||||
@@ -79,6 +82,12 @@ namespace DyeingComputer.ViewModel
|
|||||||
UPort(); //启动串口
|
UPort(); //启动串口
|
||||||
CountDown(); //启动循环任务
|
CountDown(); //启动循环任务
|
||||||
_ = AsyncTcpServer.Main();
|
_ = AsyncTcpServer.Main();
|
||||||
|
IsInteractive = false;
|
||||||
|
UserButton = false;
|
||||||
|
|
||||||
|
|
||||||
|
ProgramgroupView_run = new RelayCommand(
|
||||||
|
execute:ProgramgroupView_run_ );//开始/暂停事件
|
||||||
}
|
}
|
||||||
DataTable dt_con = new DataTable();
|
DataTable dt_con = new DataTable();
|
||||||
DataTable dt_sys = new DataTable();
|
DataTable dt_sys = new DataTable();
|
||||||
@@ -188,7 +197,46 @@ namespace DyeingComputer.ViewModel
|
|||||||
SM02 = Convert.ToInt16(Selet_sys("SM02"));//FG
|
SM02 = Convert.ToInt16(Selet_sys("SM02"));//FG
|
||||||
SM03 = Convert.ToInt16(Selet_sys("SM03"));//FG
|
SM03 = Convert.ToInt16(Selet_sys("SM03"));//FG
|
||||||
}
|
}
|
||||||
|
private void ProgramgroupView_run_()////运行/暂停
|
||||||
|
{
|
||||||
|
if (WORK_RUN == 2)
|
||||||
|
{
|
||||||
|
UserButton = true;
|
||||||
|
IsInteractive = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (WORK_RUN == 1)
|
||||||
|
{
|
||||||
|
UserButton = false;
|
||||||
|
IsInteractive = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UserButton = true;
|
||||||
|
IsInteractive = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public ICommand ProgramgroupView_run { get; }
|
||||||
|
bool _isInteractive;
|
||||||
|
public bool IsInteractive//步骤表交互选择
|
||||||
|
{
|
||||||
|
get => _isInteractive;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_isInteractive = value;
|
||||||
|
OnPropertyChanged("IsInteractive");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool _UserButton;
|
||||||
|
public bool UserButton//步骤按钮交互选择
|
||||||
|
{
|
||||||
|
get => _UserButton;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_UserButton = value;
|
||||||
|
OnPropertyChanged("UserButton");
|
||||||
|
}
|
||||||
|
}
|
||||||
public string work_Temp; //显示温度
|
public string work_Temp; //显示温度
|
||||||
public string Work_Temp //通知UI控件参数改变
|
public string Work_Temp //通知UI控件参数改变
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user