Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
a1ca8a3665
3 files changed
+39
-22
No files matched your search
+13
-6
@@ -24,7 +24,7 @@
|
|||||||
<DataGrid Grid.Row="0" Grid.Column="0" x:Name="Griddata" AlternationCount="2" IsReadOnly="True" SelectionChanged="Griddata_SelectionChanged"
|
<DataGrid Grid.Row="0" Grid.Column="0" x:Name="Griddata" AlternationCount="2" IsReadOnly="True" SelectionChanged="Griddata_SelectionChanged"
|
||||||
d:ItemsSource="{d:SampleData ItemCount=999}" AutoGenerateColumns="False" MinColumnWidth="30"
|
d:ItemsSource="{d:SampleData ItemCount=999}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||||
ItemsSource="{Binding Path=TechnologicalMachine_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
ItemsSource="{Binding Path=TechnologicalMachine_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" Background="White"
|
Background="White"
|
||||||
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right"
|
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right"
|
||||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
||||||
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" >
|
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" >
|
||||||
@@ -56,6 +56,14 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
</DataGrid.CellStyle>
|
</DataGrid.CellStyle>
|
||||||
|
<DataGrid.Resources>
|
||||||
|
<Style x:Key="CellStyle" TargetType="{x:Type DataGridCell}">
|
||||||
|
<Setter Property="Focusable" Value="False"/>
|
||||||
|
<Setter Property="Background" Value="#FFFFFFFF"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#FFFFFFFF"/>
|
||||||
|
<Setter Property="Foreground" Value="#000000"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.Resources>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<!--列信息绑定-->
|
<!--列信息绑定-->
|
||||||
<DataGridTemplateColumn Width="70" Header="{x:Static lang:Resources.State}">
|
<DataGridTemplateColumn Width="70" Header="{x:Static lang:Resources.State}">
|
||||||
@@ -93,7 +101,7 @@
|
|||||||
d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
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" Background="White"
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" Background="White"
|
||||||
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right"
|
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" BorderBrush="{x:Null}"
|
||||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
||||||
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" >
|
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" >
|
||||||
<DataGrid.RowStyle >
|
<DataGrid.RowStyle >
|
||||||
@@ -112,13 +120,12 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</DataGrid.RowStyle>
|
</DataGrid.RowStyle>
|
||||||
<DataGrid.CellStyle>
|
<DataGrid.CellStyle>
|
||||||
<Style TargetType="DataGridCell">
|
<Style TargetType="{x:Type DataGridCell}">
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
<Setter Property="MinWidth" Value="20"/>
|
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="IsSelected" Value="True">
|
<Trigger Property="IsSelected" Value="True">
|
||||||
<Setter Property="Background" Value="#FFC0C0C0"/>
|
<Setter Property="Background" Value="#FF00D6FF"/>
|
||||||
<Setter Property="BorderBrush" Value="#FFC0C0C0"/>
|
<Setter Property="BorderBrush" Value="#FF00D6FF"/>
|
||||||
<Setter Property="Foreground" Value="Black"/>
|
<Setter Property="Foreground" Value="Black"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
|
|||||||
+24
-14
@@ -49,6 +49,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
|
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
|
||||||
{
|
{
|
||||||
Stop.IsEnabled = true;
|
Stop.IsEnabled = true;
|
||||||
|
MainWindowViewModel.TechnologicalProcess_bool = true;
|
||||||
int rownum = Griddata.SelectedIndex;//获取鼠标选中行并定义变量
|
int rownum = Griddata.SelectedIndex;//获取鼠标选中行并定义变量
|
||||||
if (rownum != -1)//判断鼠标定位是否有效
|
if (rownum != -1)//判断鼠标定位是否有效
|
||||||
{
|
{
|
||||||
@@ -74,6 +75,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
P5 = (Gridstep.Columns[10].GetCellContent(Gridstep.Items[rownum]) as TextBlock).Text;//定位第10列,
|
P5 = (Gridstep.Columns[10].GetCellContent(Gridstep.Items[rownum]) as TextBlock).Text;//定位第10列,
|
||||||
}
|
}
|
||||||
Paused.IsEnabled = true;
|
Paused.IsEnabled = true;
|
||||||
|
MainWindowViewModel.TechnologicalProcess_bool = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e)
|
private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e)
|
||||||
@@ -105,6 +107,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
edit.IsEnabled = false;
|
edit.IsEnabled = false;
|
||||||
Paused.IsEnabled = false;
|
Paused.IsEnabled = false;
|
||||||
Resume.IsEnabled = false;
|
Resume.IsEnabled = false;
|
||||||
|
Delete.IsEnabled = false;
|
||||||
|
MainWindowViewModel.TechnologicalProcess_bool = true;
|
||||||
}//恢复
|
}//恢复
|
||||||
private void ListViewItem_Paused(object sender, MouseButtonEventArgs e)
|
private void ListViewItem_Paused(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -150,6 +154,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0";
|
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0";
|
||||||
private void edit_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
|
private void edit_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
|
||||||
{
|
{
|
||||||
|
MainWindowViewModel.TechnologicalProcess_bool = true;
|
||||||
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
||||||
dat_821.Clear();
|
dat_821.Clear();
|
||||||
dat_821.Add("INSTRUCTION", "EDIT");
|
dat_821.Add("INSTRUCTION", "EDIT");
|
||||||
@@ -180,8 +185,10 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Insert_ButtonClicked);
|
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Insert_ButtonClicked);
|
||||||
viewstop.ShowDialog();
|
viewstop.ShowDialog();
|
||||||
}//插入
|
}//插入
|
||||||
private void Insert_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
|
private void Insert_ButtonClicked(object sender, AddressUpdateEventArgs e)//cr返回结果
|
||||||
{
|
{
|
||||||
|
|
||||||
|
MainWindowViewModel.TechnologicalProcess_bool = true;
|
||||||
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
||||||
dat_821.Clear();
|
dat_821.Clear();
|
||||||
dat_821.Add("INSTRUCTION", "INSERT");
|
dat_821.Add("INSTRUCTION", "INSERT");
|
||||||
@@ -239,8 +246,11 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
{
|
{
|
||||||
if (machines_info == 0)
|
if (machines_info == 0)
|
||||||
{
|
{
|
||||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString { ID=index,
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||||
DAT= "SC832" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) });
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC832" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index)
|
||||||
|
});
|
||||||
}//信息
|
}//信息
|
||||||
else if (machines_info == 1)
|
else if (machines_info == 1)
|
||||||
{
|
{
|
||||||
@@ -248,22 +258,22 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
}//输送状态
|
}//输送状态
|
||||||
else if (machines_info == 2)
|
else if (machines_info == 2)
|
||||||
{
|
{
|
||||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString { ID = index,
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||||
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) });
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index)
|
||||||
|
});
|
||||||
}//单据
|
}//单据
|
||||||
|
|
||||||
|
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||||
|
{
|
||||||
|
ID = index,
|
||||||
|
DAT = "SC831" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainWindowViewModel.MachineLOG = null;
|
MainWindowViewModel.MachineLOG = null;
|
||||||
}
|
|
||||||
|
|
||||||
if ((State_ == 101) || (State_ == 201) || (State_ == 202) || (State_ == 309))//获得细节信息
|
|
||||||
{
|
|
||||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString { ID = index,
|
|
||||||
DAT = "SC831" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) });
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MainWindowViewModel.dt_TP.Clear();
|
MainWindowViewModel.dt_TP.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
|||||||
public static DataTable dt_m = new DataTable("M");
|
public static DataTable dt_m = new DataTable("M");
|
||||||
public static DataTable dt_TM = new DataTable();
|
public static DataTable dt_TM = new DataTable();
|
||||||
public static DataTable dt_TP = new DataTable();
|
public static DataTable dt_TP = new DataTable();
|
||||||
|
public static bool TechnologicalProcess_bool =true;
|
||||||
private async void DATA_view()//IO显示
|
private async void DATA_view()//IO显示
|
||||||
{
|
{
|
||||||
await Task.Run(() =>
|
await Task.Run(() =>
|
||||||
@@ -286,7 +287,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
|||||||
{
|
{
|
||||||
if (dt_TP.Rows.Count > 0)
|
if (dt_TP.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
TechnologicalProcess_View = ToObservableCollection<TechnologicalP>(dt_TP);
|
if(TechnologicalProcess_bool) TechnologicalProcess_View = ToObservableCollection<TechnologicalP>(dt_TP);
|
||||||
Sys_machine = MachineLOG;
|
Sys_machine = MachineLOG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -321,7 +322,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
|||||||
}
|
}
|
||||||
public ObservableCollection<DATA_M> SYSData_M
|
public ObservableCollection<DATA_M> SYSData_M
|
||||||
{
|
{
|
||||||
|
|
||||||
get { return sysData_M; }
|
get { return sysData_M; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user