Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
07791cf6e6
3 files changed
+60
-20
No files matched your search
@@ -106,6 +106,12 @@ namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
|||||||
drEmployee.AcceptChanges();
|
drEmployee.AcceptChanges();
|
||||||
drEmployee.ClearErrors();
|
drEmployee.ClearErrors();
|
||||||
}
|
}
|
||||||
|
else if (SYSAPI == "SC831")
|
||||||
|
{
|
||||||
|
DAT = DAT.Substring(DAT.IndexOf("]") + 1);
|
||||||
|
|
||||||
|
MonitorView.TechnologicalProcess = JsonConvert.DeserializeObject<DataTable>(DAT);//反序列化
|
||||||
|
}
|
||||||
else if (SYSAPI == "SC832")
|
else if (SYSAPI == "SC832")
|
||||||
{
|
{
|
||||||
MonitorView.Sys_log = DAT.Substring(DAT.IndexOf("]") + 1);
|
MonitorView.Sys_log = DAT.Substring(DAT.IndexOf("]") + 1);
|
||||||
|
|||||||
+33
-19
@@ -8,14 +8,20 @@
|
|||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="1000" d:DesignWidth="1900">
|
d:DesignHeight="1000" d:DesignWidth="1900">
|
||||||
<Grid>
|
<Grid Cursor="">
|
||||||
<DataGrid x:Name="Griddata" AlternationCount="2" IsReadOnly="True" SelectionChanged="Griddata_SelectionChanged"
|
<Grid.ColumnDefinitions/>
|
||||||
Margin="0,0,0,0" d:ItemsSource="{d:SampleData ItemCount=999}" AutoGenerateColumns="False" MinColumnWidth="30"
|
<Grid.RowDefinitions>
|
||||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All"
|
<RowDefinition Height="300"/>
|
||||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False"
|
<RowDefinition Height="5"/>
|
||||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
<RowDefinition/>
|
||||||
CanUserAddRows="True" CanUserDeleteRows="False" HeadersVisibility ="Column"
|
<RowDefinition Height="60"/>
|
||||||
Background="White" SelectionMode="Single" FontSize="15" TabIndex="1" Focusable="True" VerticalAlignment="Top" Height="300" BorderBrush="Black">
|
</Grid.RowDefinitions>
|
||||||
|
<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"
|
||||||
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" 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 >
|
<DataGrid.RowStyle >
|
||||||
<Style TargetType="{x:Type DataGridRow}">
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
<Setter Property="Height" Value="30" />
|
<Setter Property="Height" Value="30" />
|
||||||
@@ -55,13 +61,19 @@
|
|||||||
<DataGridTextColumn Header="{x:Static lang:Resources.message}" Binding="{Binding Message}" Width="*" IsReadOnly="True"/>
|
<DataGridTextColumn Header="{x:Static lang:Resources.message}" Binding="{Binding Message}" Width="*" IsReadOnly="True"/>
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
<DataGrid x:Name="Gridstep" AlternationCount="2" IsReadOnly="True" SelectionChanged="Gridstep_SelectionChanged"
|
<GridSplitter Grid.Row="1" Height="5" HorizontalAlignment="Stretch" Background="#FF00204E"/>
|
||||||
Margin="700,300,0,50" d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
<Grid Grid.Row="2">
|
||||||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="Black"
|
<Grid.ColumnDefinitions>
|
||||||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False"
|
<ColumnDefinition/>
|
||||||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False"
|
<ColumnDefinition Width="5"/>
|
||||||
CanUserAddRows="True" CanUserDeleteRows="False" HeadersVisibility ="Column"
|
<ColumnDefinition/>
|
||||||
Background="White" SelectionMode="Single" FontSize="15" MinHeight="632" TabIndex="1" Focusable="True">
|
</Grid.ColumnDefinitions>
|
||||||
|
<DataGrid Grid.Column="2" x:Name="Gridstep" AlternationCount="2" IsReadOnly="True" SelectionChanged="Gridstep_SelectionChanged"
|
||||||
|
d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||||
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" 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 >
|
<DataGrid.RowStyle >
|
||||||
<Style TargetType="{x:Type DataGridRow}">
|
<Style TargetType="{x:Type DataGridRow}">
|
||||||
<Setter Property="Height" Value="30" />
|
<Setter Property="Height" Value="30" />
|
||||||
@@ -110,9 +122,11 @@
|
|||||||
<DataGridTextColumn Binding="{Binding Parameter10}" Width="0" MinWidth="0" MaxWidth="0"/>
|
<DataGridTextColumn Binding="{Binding Parameter10}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||||
<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" Margin="0,300,0,50" TextWrapping="Wrap" Width="700" FontSize="25" Background="White"/>
|
<TextBlock Grid.Column="0" x:Name="log" TextWrapping="Wrap" FontSize="25" Background="White"/>
|
||||||
<StackPanel x:Name="mt" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="0,0,0,0" Width="700" HorizontalAlignment="Left">
|
<GridSplitter Grid.Row="0" Grid.Column="1" Width="5" HorizontalAlignment="Center" Background="#FF00204E"/>
|
||||||
|
</Grid>
|
||||||
|
<StackPanel Grid.Row="3" x:Name="mt" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="0,0,0,0" Width="700" HorizontalAlignment="Left">
|
||||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||||
<ListViewItem Width="150" MouseLeftButtonUp="ListViewItem_DyeingMachine">
|
<ListViewItem Width="150" MouseLeftButtonUp="ListViewItem_DyeingMachine">
|
||||||
<StackPanel Orientation="Horizontal" >
|
<StackPanel Orientation="Horizontal" >
|
||||||
@@ -138,7 +152,7 @@
|
|||||||
</ListViewItem>
|
</ListViewItem>
|
||||||
</ListView>
|
</ListView>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel x:Name="scr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="700,0,0,0">
|
<StackPanel Grid.Row="3" x:Name="scr" VerticalAlignment="Bottom" Height="60" Background="#FF00204E" Orientation="Horizontal" Margin="700,0,0,0">
|
||||||
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
<ListView ScrollViewer.HorizontalScrollBarVisibility="Disabled" Foreground="#FF1368BD">
|
||||||
<ListViewItem Width="150" MouseLeftButtonUp="ListViewItem_Resume" IsEnabled="False" x:Name="Resume">
|
<ListViewItem Width="150" MouseLeftButtonUp="ListViewItem_Resume" IsEnabled="False" x:Name="Resume">
|
||||||
<StackPanel Orientation="Horizontal" >
|
<StackPanel Orientation="Horizontal" >
|
||||||
|
|||||||
@@ -106,6 +106,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
timer1s.Start();
|
timer1s.Start();
|
||||||
}//时间周期初始化
|
}//时间周期初始化
|
||||||
|
|
||||||
|
public static DataTable TechnologicalProcess =new DataTable();
|
||||||
|
|
||||||
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
void Tick_Event_1S(object sender, EventArgs e)//Tick_Event周期执行事件1S
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(machine))
|
if (!string.IsNullOrEmpty(machine))
|
||||||
@@ -121,9 +123,27 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
|||||||
log.Text = Sys_log;
|
log.Text = Sys_log;
|
||||||
}
|
}
|
||||||
else { log.Text = null; }
|
else { log.Text = null; }
|
||||||
|
if ((State_ == 101) || (State_ == 201) || (State_ == 202) || (State_ == 309))//获得细节信息
|
||||||
|
{
|
||||||
|
MainWindowViewModel.MachiensTcpClient[index].SendAsync("SC831" + MainWindowViewModel.Selet_Machines(MainWindowViewModel.Machines, "SYSKEY", index));
|
||||||
|
if (TechnologicalProcess.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
Gridstep.ItemsSource = TechnologicalProcess.DefaultView;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Gridstep.ItemsSource = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Gridstep.ItemsSource = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ) { log.Text = null; }//返回错误为空
|
catch (Exception ) { log.Text = null; Gridstep.ItemsSource = null; }//返回错误为空
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user