Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
a1ca8a3665
3 files changed
+46
-29
No files matched your search
+15
-8
@@ -24,8 +24,8 @@
|
||||
<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"
|
||||
ItemsSource="{Binding Path=TechnologicalMachine_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" Background="White"
|
||||
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right"
|
||||
Background="White"
|
||||
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right"
|
||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
||||
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" >
|
||||
<DataGrid.RowStyle >
|
||||
@@ -56,11 +56,19 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</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>
|
||||
<!--列信息绑定-->
|
||||
<DataGridTemplateColumn Width="70" Header="{x:Static lang:Resources.State}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<DataTemplate>
|
||||
<materialDesign:PackIcon Kind="StateMachine" Width="25" Height="30" VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Foreground="{Binding Path=State,Converter={StaticResource StateToColorConvert}}"/>
|
||||
</DataTemplate>
|
||||
@@ -93,7 +101,7 @@
|
||||
d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||
ItemsSource="{Binding Path=TechnologicalProcess_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
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"
|
||||
CanUserDeleteRows="False" SelectionMode="Single" FontSize="15" Focusable="True" >
|
||||
<DataGrid.RowStyle >
|
||||
@@ -112,13 +120,12 @@
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Style TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
<Setter Property="MinWidth" Value="20"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter Property="Background" Value="#FFC0C0C0"/>
|
||||
<Setter Property="BorderBrush" Value="#FFC0C0C0"/>
|
||||
<Setter Property="Background" Value="#FF00D6FF"/>
|
||||
<Setter Property="BorderBrush" Value="#FF00D6FF"/>
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
|
||||
+28
-18
@@ -49,6 +49,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e)//设备列表
|
||||
{
|
||||
Stop.IsEnabled = true;
|
||||
MainWindowViewModel.TechnologicalProcess_bool = true;
|
||||
int rownum = Griddata.SelectedIndex;//获取鼠标选中行并定义变量
|
||||
if (rownum != -1)//判断鼠标定位是否有效
|
||||
{
|
||||
@@ -56,7 +57,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
workOrder = (Griddata.Columns[2].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第列,
|
||||
dyelot = (Griddata.Columns[3].GetCellContent(Griddata.Items[rownum]) as TextBlock).Text;//定位第列,
|
||||
|
||||
machin_LOG.Text = Properties.Resources.Machine+":"+machine+" "+Properties.Resources.WorkOrder+":"+workOrder;
|
||||
machin_LOG.Text = Properties.Resources.Machine + ":" + machine + " " + Properties.Resources.WorkOrder + ":" + workOrder;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +75,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
P5 = (Gridstep.Columns[10].GetCellContent(Gridstep.Items[rownum]) as TextBlock).Text;//定位第10列,
|
||||
}
|
||||
Paused.IsEnabled = true;
|
||||
MainWindowViewModel.TechnologicalProcess_bool = false;
|
||||
}
|
||||
|
||||
private void ListViewItem_DyeingMachine(object sender, MouseButtonEventArgs e)
|
||||
@@ -105,6 +107,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
edit.IsEnabled = false;
|
||||
Paused.IsEnabled = false;
|
||||
Resume.IsEnabled = false;
|
||||
Delete.IsEnabled = false;
|
||||
MainWindowViewModel.TechnologicalProcess_bool = true;
|
||||
}//恢复
|
||||
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";
|
||||
private void edit_ButtonClicked(object sender, AddressUpdateEventArgs e)//编辑返回结果
|
||||
{
|
||||
MainWindowViewModel.TechnologicalProcess_bool = true;
|
||||
Dictionary<string, object> dat_821 = new Dictionary<string, object>();
|
||||
dat_821.Clear();
|
||||
dat_821.Add("INSTRUCTION", "EDIT");
|
||||
@@ -180,8 +185,10 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Insert_ButtonClicked);
|
||||
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>();
|
||||
dat_821.Clear();
|
||||
dat_821.Add("INSTRUCTION", "INSERT");
|
||||
@@ -236,11 +243,14 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
int State_ = Convert.ToInt16(drEmployee.Field<object>("State"));
|
||||
int index = Convert.ToInt16(drEmployee.Field<object>("ID"));
|
||||
if ((State_ == 101) || (State_ == 201) || (State_ == 202) || (State_ == 309))//获得细节信息
|
||||
{
|
||||
{
|
||||
if (machines_info == 0)
|
||||
{
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString { ID=index,
|
||||
DAT= "SC832" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) });
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC832" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index)
|
||||
});
|
||||
}//信息
|
||||
else if (machines_info == 1)
|
||||
{
|
||||
@@ -248,24 +258,24 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
}//输送状态
|
||||
else if (machines_info == 2)
|
||||
{
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString { ID = index,
|
||||
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index) });
|
||||
}//单据
|
||||
}
|
||||
else
|
||||
{
|
||||
MainWindowViewModel.MachineLOG = null;
|
||||
}
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC833" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index)
|
||||
});
|
||||
}//单据
|
||||
|
||||
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) });
|
||||
MainWindowViewModel.stringQueue.Enqueue(new MainWindowViewModel.QueueString
|
||||
{
|
||||
ID = index,
|
||||
DAT = "SC831" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index)
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
MainWindowViewModel.MachineLOG = null;
|
||||
MainWindowViewModel.dt_TP.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception )
|
||||
{
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
}
|
||||
int Time5=0,Time60;
|
||||
void Tick_Event_5S()//Tick_Event周期执行事件5S
|
||||
{
|
||||
{
|
||||
for (int i = 0; i < Machinesdata_Count; i++)
|
||||
{
|
||||
if (Selet_Machines(Machines, "State", i).ToString() == "801")
|
||||
@@ -273,6 +273,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
public static DataTable dt_m = new DataTable("M");
|
||||
public static DataTable dt_TM = new DataTable();
|
||||
public static DataTable dt_TP = new DataTable();
|
||||
public static bool TechnologicalProcess_bool =true;
|
||||
private async void DATA_view()//IO显示
|
||||
{
|
||||
await Task.Run(() =>
|
||||
@@ -286,7 +287,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
{
|
||||
if (dt_TP.Rows.Count > 0)
|
||||
{
|
||||
TechnologicalProcess_View = ToObservableCollection<TechnologicalP>(dt_TP);
|
||||
if(TechnologicalProcess_bool) TechnologicalProcess_View = ToObservableCollection<TechnologicalP>(dt_TP);
|
||||
Sys_machine = MachineLOG;
|
||||
}
|
||||
}
|
||||
@@ -321,7 +322,6 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
}
|
||||
public ObservableCollection<DATA_M> SYSData_M
|
||||
{
|
||||
|
||||
get { return sysData_M; }
|
||||
set
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user