10 changed files with 279 additions and 61 deletions
@ -0,0 +1,155 @@ |
|||
<UserControl x:Class="SunlightCentralizedControlManagement_SCCM_.View.MonitorView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|||
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.View" |
|||
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties" |
|||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
|||
mc:Ignorable="d" |
|||
d:DesignHeight="1000" d:DesignWidth="1900"> |
|||
<Grid> |
|||
<DataGrid x:Name="Griddata" AlternationCount="2" IsReadOnly="True" SelectionChanged="Griddata_SelectionChanged" |
|||
Margin="0,0,0,0" d:ItemsSource="{d:SampleData ItemCount=999}" AutoGenerateColumns="False" MinColumnWidth="30" |
|||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" |
|||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False" |
|||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" |
|||
CanUserAddRows="True" CanUserDeleteRows="False" HeadersVisibility ="Column" |
|||
Background="White" SelectionMode="Single" FontSize="15" TabIndex="1" Focusable="True" VerticalAlignment="Top" Height="300"> |
|||
<DataGrid.RowStyle > |
|||
<Style TargetType="{x:Type DataGridRow}"> |
|||
<Setter Property="Height" Value="30" /> |
|||
<Setter Property="FontSize" Value="25" /> |
|||
<Style.Triggers> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|||
<Setter Property="Background" Value="#FFFFFFFF" /> |
|||
</Trigger> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|||
<Setter Property="Background" Value="#FFF0F0F0" /> |
|||
</Trigger> |
|||
<Trigger Property="IsMouseOver" Value="False"/> |
|||
</Style.Triggers> |
|||
</Style> |
|||
</DataGrid.RowStyle> |
|||
<DataGrid.CellStyle> |
|||
<Style TargetType="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="Foreground" Value="Black"/> |
|||
</Trigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
</DataGrid.CellStyle> |
|||
<DataGrid.Columns> |
|||
<!--列信息绑定--> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.Machine}" Binding="{Binding Name}" Width="150" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.WorkOrder}" Binding="{Binding WorkOrder}" Width="200" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.Dyelot}" Binding="{Binding Dyelot}" Width="200" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.Temperature}" Binding="{Binding Temperature}" Width="100" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.process}" Binding="{Binding Process}" Width="300" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.Step}" Binding="{Binding Step}" Width="300" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.message}" Binding="{Binding Message}" Width="*" IsReadOnly="True"/> |
|||
</DataGrid.Columns> |
|||
</DataGrid> |
|||
<DataGrid x:Name="Gridstep" AlternationCount="2" IsReadOnly="True" SelectionChanged="Gridstep_SelectionChanged" |
|||
Margin="700,300,0,50" d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30" |
|||
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9" GridLinesVisibility="All" BorderBrush="Black" |
|||
BorderThickness="1,1,1,1" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" Grid.ColumnSpan="2" AllowDrop="False" |
|||
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserResizeRows="False" CanUserResizeColumns="False" |
|||
CanUserAddRows="True" CanUserDeleteRows="False" HeadersVisibility ="Column" |
|||
Background="White" SelectionMode="Single" FontSize="15" MinHeight="632" TabIndex="1" Focusable="True"> |
|||
<DataGrid.RowStyle > |
|||
<Style TargetType="{x:Type DataGridRow}"> |
|||
<Setter Property="Height" Value="30" /> |
|||
<Setter Property="FontSize" Value="25" /> |
|||
<Style.Triggers> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="0"> |
|||
<Setter Property="Background" Value="#FFFFFFFF" /> |
|||
</Trigger> |
|||
<Trigger Property="ItemsControl.AlternationIndex" Value="1"> |
|||
<Setter Property="Background" Value="#FFF0F0F0" /> |
|||
</Trigger> |
|||
<Trigger Property="IsMouseOver" Value="False"/> |
|||
</Style.Triggers> |
|||
</Style> |
|||
</DataGrid.RowStyle> |
|||
<DataGrid.CellStyle> |
|||
<Style TargetType="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="Foreground" Value="Black"/> |
|||
</Trigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
</DataGrid.CellStyle> |
|||
<DataGrid.Columns> |
|||
<!--列信息绑定--> |
|||
<DataGridTextColumn Binding="{Binding ProgramID}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Program}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.Step}" Binding="{Binding Step}" Width="60" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.Code}" Width="0" MinWidth="0" MaxWidth="0" Binding="{Binding StepID}" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.Directives}" Width="300" Binding="{Binding StepName}" IsReadOnly="True"/> |
|||
<DataGridTextColumn Header="{x:Static lang:Resources.ParameterSet}" Width="*" Binding="{Binding ParameterName}" IsReadOnly="True"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter1}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter2}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter3}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter4}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter5}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter6}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter7}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter8}" Width="0" MinWidth="0" MaxWidth="0"/> |
|||
<DataGridTextColumn Binding="{Binding Parameter9}" 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"/> |
|||
</DataGrid.Columns> |
|||
</DataGrid> |
|||
<TextBlock x:Name="log" HorizontalAlignment="Left" Margin="0,300,0,50" TextWrapping="Wrap" Width="700" FontSize="25" Background="White" Text="{Binding Sys_log}"/> |
|||
<StackPanel x:Name="scr" VerticalAlignment="Bottom" Height="50" Background="#FF00204E" Orientation="Horizontal"> |
|||
<ListViewItem Width="150" Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> |
|||
<StackPanel Orientation="Horizontal" Height="50" > |
|||
<materialDesign:PackIcon Kind="Resume" Width="25" Height="40" Margin="10" VerticalAlignment="Center" Foreground="#FF1368BD"/> |
|||
<TextBlock Text="{x:Static lang:Resources.Resume}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> |
|||
</StackPanel> |
|||
</ListViewItem> |
|||
<ListViewItem Height="50" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<materialDesign:PackIcon Kind="Pause" Width="25" Height="25" Margin="10" VerticalAlignment="Center" Foreground="#FF1368BD"/> |
|||
<TextBlock Text="{x:Static lang:Resources.Paused}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> |
|||
</StackPanel> |
|||
</ListViewItem> |
|||
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<materialDesign:PackIcon Kind="Stop" Width="25" Height="25" Margin="10" VerticalAlignment="Center" Foreground="#FF1368BD"/> |
|||
<TextBlock Text="{x:Static lang:Resources.Stop}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> |
|||
</StackPanel> |
|||
</ListViewItem> |
|||
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<materialDesign:PackIcon Kind="Edit" Width="25" Height="25" Margin="10" VerticalAlignment="Center" Foreground="#FF1368BD"/> |
|||
<TextBlock Text="{x:Static lang:Resources.edit}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> |
|||
</StackPanel> |
|||
</ListViewItem> |
|||
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<materialDesign:PackIcon Kind="InsertComment" Width="25" Height="25" Margin="10" VerticalAlignment="Center" Foreground="#FF1368BD"/> |
|||
<TextBlock Text="{x:Static lang:Resources.Insert}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> |
|||
</StackPanel> |
|||
</ListViewItem> |
|||
<ListViewItem Height="60" MouseLeftButtonUp="ListViewItem_MouseLeftButtonUp"> |
|||
<StackPanel Orientation="Horizontal"> |
|||
<materialDesign:PackIcon Kind="Delete" Width="25" Height="25" Margin="10" VerticalAlignment="Center" Foreground="#FF1368BD"/> |
|||
<TextBlock Text="{x:Static lang:Resources.Delete}" VerticalAlignment="Center" Margin="20 10" Foreground="White"/> |
|||
</StackPanel> |
|||
</ListViewItem> |
|||
|
|||
</StackPanel> |
|||
</Grid> |
|||
</UserControl> |
@ -0,0 +1,50 @@ |
|||
using SunlightCentralizedControlManagement_SCCM_.ViewModel; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Data; |
|||
using System.Windows.Documents; |
|||
using System.Windows.Input; |
|||
using System.Windows.Media; |
|||
using System.Windows.Media.Imaging; |
|||
using System.Windows.Navigation; |
|||
using System.Windows.Shapes; |
|||
|
|||
namespace SunlightCentralizedControlManagement_SCCM_.View |
|||
{ |
|||
/// <summary>
|
|||
/// MonitorView.xaml 的交互逻辑
|
|||
/// </summary>
|
|||
public partial class MonitorView : UserControl |
|||
{ |
|||
public MonitorView() |
|||
{ |
|||
InitializeComponent(); |
|||
Griddata.ItemsSource = MainWindowViewModel.Machines.DefaultView; |
|||
} |
|||
|
|||
private void Griddata_SelectionChanged(object sender, SelectionChangedEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void Grid_SelectionChanged(object sender, SelectionChangedEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void Gridstep_SelectionChanged(object sender, SelectionChangedEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
|
|||
private void ListViewItem_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue