添加项目文件。
This commit is contained in:
489
SamplePreSystem.UI/Views/MonitorManager/MonitorView.xaml
Normal file
489
SamplePreSystem.UI/Views/MonitorManager/MonitorView.xaml
Normal file
@@ -0,0 +1,489 @@
|
||||
<UserControl
|
||||
x:Class="SamplePre.UIWpf.SampleManager.MonitorView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:local="clr-namespace:SamplePre.UIWpf.SampleManager"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:pro="clr-namespace:SamplePreSystem.UI.BaseControls"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Background="#E6E6E6"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="220" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
|
||||
<Border
|
||||
Margin="5,5,0,0"
|
||||
Background="White"
|
||||
BorderThickness="1"
|
||||
CornerRadius="5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Height="30"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
Padding="6"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Text="样品列表" />
|
||||
</StackPanel>
|
||||
<DataGrid
|
||||
x:Name="dg_sample"
|
||||
Grid.Row="1"
|
||||
Margin="5"
|
||||
AutoGenerateColumns="False"
|
||||
Background="White"
|
||||
CanUserAddRows="False"
|
||||
CanUserSortColumns="True"
|
||||
FrozenColumnCount="1"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding SampleExecList}"
|
||||
SelectedItem="{Binding SelectSample}"
|
||||
SelectionMode="Extended"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseDoubleClick">
|
||||
<i:InvokeCommandAction Command="{Binding MouseDoubleDetailWindowCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding qrcode}"
|
||||
Header="二维码" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding item_name}"
|
||||
Header="样品名称" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding standrad}"
|
||||
Header="标准名称" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding input_user}"
|
||||
Header="录入人员" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding input_date}"
|
||||
Header="录入日期" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding exec_state}"
|
||||
Header="状态" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- sop监控内容 -->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="2*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 进度图 -->
|
||||
<Border
|
||||
Margin="5"
|
||||
Background="White"
|
||||
CornerRadius="5">
|
||||
<Grid Grid.Row="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Margin="5,5,0,10"
|
||||
HorizontalAlignment="Left"
|
||||
FontWeight="Bold"
|
||||
Text="样品进度" />
|
||||
<Grid Grid.Row="1">
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<TextBlock Margin="5" Text="当前SOP:DCM固相萃取" />
|
||||
<TextBlock Margin="5" Text="当前样品:xxx" />
|
||||
<TextBlock Margin="5" Text="当前步骤:离心" />
|
||||
<TextBlock />
|
||||
</StackPanel>
|
||||
<pro:RingProgressBar
|
||||
x:Name="ringProgress"
|
||||
Width="200"
|
||||
Height="200"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Progress="{Binding CurrentPercent}" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="20"
|
||||
Foreground="Black"
|
||||
Text="{Binding Progress, ElementName=ringProgress, StringFormat={}{0}%}" />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- SOP执行列表 -->
|
||||
<Border
|
||||
Grid.Column="1"
|
||||
Margin="0,5,0,5"
|
||||
Background="White"
|
||||
CornerRadius="5">
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
FontWeight="Bold"
|
||||
Text="SOP执行信息" />
|
||||
<DataGrid
|
||||
x:Name="dg_sopExec"
|
||||
Grid.Row="1"
|
||||
Margin="5"
|
||||
AutoGenerateColumns="False"
|
||||
Background="White"
|
||||
CanUserAddRows="False"
|
||||
CanUserSortColumns="True"
|
||||
FrozenColumnCount="1"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
IsReadOnly="True"
|
||||
ItemsSource="{Binding SopExecInfo}"
|
||||
SelectionMode="Extended"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn Width="0.5*" Header="">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button
|
||||
Width="13"
|
||||
Height="13"
|
||||
Margin="0"
|
||||
HorizontalContentAlignment="Left"
|
||||
materialDesign:ButtonProgressAssist.IndicatorBackground="#ffcc80"
|
||||
materialDesign:ButtonProgressAssist.IndicatorForeground="#e65100"
|
||||
materialDesign:ButtonProgressAssist.IsIndeterminate="True"
|
||||
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding doIngShow}"
|
||||
materialDesign:ButtonProgressAssist.Value="-1"
|
||||
Style="{StaticResource MaterialDesignFloatingActionButton}" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="0.5*"
|
||||
Binding="{Binding state}"
|
||||
Header="状态" />
|
||||
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding sapmleName}"
|
||||
Header="样品名称" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding actionName}"
|
||||
Header="动作" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding starDate}"
|
||||
Header="开始时间" />
|
||||
<DataGridTextColumn
|
||||
Width="*"
|
||||
Binding="{Binding endDate}"
|
||||
Header="完成时间" />
|
||||
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<!--<StackPanel>
|
||||
<TextBlock Text="SOP执行信息" Margin="5" FontWeight="Bold"/>
|
||||
<ListBox ItemsSource="{Binding SopExecInfo}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
<Button
|
||||
Width="13"
|
||||
Height="13"
|
||||
Margin="5"
|
||||
HorizontalContentAlignment="Left"
|
||||
materialDesign:ButtonProgressAssist.IsIndeterminate="True"
|
||||
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding doIngShow}"
|
||||
materialDesign:ButtonProgressAssist.Value="-1"
|
||||
Style="{StaticResource MaterialDesignFloatingActionButton}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="2,0,10,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding state}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="30,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding sapmleName}" />
|
||||
<TextBlock
|
||||
Margin="30,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding actionName}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="30,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding starDate}" />
|
||||
<TextBlock
|
||||
Margin="30,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding endDate}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</StackPanel>-->
|
||||
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
<GridSplitter
|
||||
Grid.Column="1"
|
||||
Width="5"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="#e6e6e6" />
|
||||
|
||||
<!-- 功能单元 -->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="31*" />
|
||||
<RowDefinition Height="44*" />
|
||||
<RowDefinition Height="15*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 功能岛信息 -->
|
||||
<Border
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,5,5,5"
|
||||
Background="White"
|
||||
BorderThickness="1"
|
||||
CornerRadius="5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Height="30"
|
||||
Margin="0,0"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
Padding="6"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Text="功能单元" />
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<ItemsControl Grid.Row="1" ItemsSource="{Binding WorkUnits}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Margin="10,5" Columns="1" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!-- 给 Border 单独写 Style,实现默认背景 + 鼠标悬停背景 -->
|
||||
<Border
|
||||
Margin="0,10"
|
||||
BorderBrush="LightGray"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4">
|
||||
<Border.Style>
|
||||
<Style TargetType="Border">
|
||||
<!-- 默认背景色 -->
|
||||
<Setter Property="Background" Value="White" />
|
||||
<!-- 鼠标悬停触发器 -->
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FFF0F8FF" />
|
||||
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock
|
||||
Margin="5"
|
||||
HorizontalAlignment="Left"
|
||||
Text="{Binding unitName}" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="5"
|
||||
HorizontalAlignment="Right">
|
||||
<Hyperlink
|
||||
x:Name="hLinkDetail"
|
||||
Command="{Binding DataContext.HLinkDetailClickCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
||||
CommandParameter="{Binding unitName}">
|
||||
[详情]
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<!--<Image Grid.Row="1" Grid.Column="0"
|
||||
Source="{Binding imgPath}" Height="48" Width="48" Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>-->
|
||||
|
||||
<Border
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Width="50"
|
||||
Height="50"
|
||||
Margin="5"
|
||||
BorderBrush="#0071b8"
|
||||
BorderThickness="2"
|
||||
CornerRadius="50">
|
||||
<materialDesign:PackIcon
|
||||
Width="40"
|
||||
Height="40"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="#0071b8"
|
||||
Kind="{Binding packIconKind}" />
|
||||
</Border>
|
||||
|
||||
|
||||
|
||||
<UniformGrid
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Columns="1"
|
||||
Rows="2">
|
||||
|
||||
<StackPanel
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Margin="2" Text="动作:" />
|
||||
<TextBlock Margin="2" Text="{Binding actionName}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Margin="0,2"
|
||||
HorizontalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<Border
|
||||
Width="6"
|
||||
Height="6"
|
||||
Margin="2"
|
||||
Background="{Binding RunColor}"
|
||||
CornerRadius="3" />
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding StateName}" />
|
||||
</StackPanel>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
|
||||
<!-- 故障信息 -->
|
||||
<Border
|
||||
Grid.Row="2"
|
||||
Margin="0,0,5,5"
|
||||
Background="White"
|
||||
BorderThickness="1"
|
||||
CornerRadius="5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Height="30"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
Padding="6"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="Bold"
|
||||
Text="故障信息" />
|
||||
</StackPanel>
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding FaultInfos}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
|
||||
<Border
|
||||
Width="6"
|
||||
Height="6"
|
||||
Margin="2"
|
||||
Background="Red"
|
||||
CornerRadius="3" />
|
||||
<TextBlock
|
||||
Margin="3,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding FaultName}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
36
SamplePreSystem.UI/Views/MonitorManager/MonitorView.xaml.cs
Normal file
36
SamplePreSystem.UI/Views/MonitorManager/MonitorView.xaml.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Models.Const;
|
||||
using SamplePre.UIWpf.MonitorManager.chirld;
|
||||
using SamplePre.UIWpf.SampleManager.chirld;
|
||||
using SamplePreSystem.UI.ViewModel.Monitor;
|
||||
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 SamplePre.UIWpf.SampleManager
|
||||
{
|
||||
/// <summary>
|
||||
/// MonitorView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MonitorView : UserControl
|
||||
{
|
||||
public MonitorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.DataContext = new MonitorViewModel();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
25
SamplePreSystem.UI/Views/MonitorManager/SopExecInfo.cs
Normal file
25
SamplePreSystem.UI/Views/MonitorManager/SopExecInfo.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace SamplePreSystem.UI.Views.MonitorManager
|
||||
{
|
||||
public class SopExecInfo
|
||||
{
|
||||
public string sapmleName { get; set; }
|
||||
|
||||
public string actionName { get; set; }
|
||||
|
||||
public string state { get; set; }
|
||||
|
||||
public DateTime starDate { get; set; }
|
||||
public DateTime endDate { get; set; }
|
||||
|
||||
public bool doIngShow { get; set; } = false;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<basewindows:BaseWindow
|
||||
x:Class="SamplePre.UIWpf.MonitorManager.chirld.SampleDetailWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:basewindows="clr-namespace:SamplePre.UIWpf.BaseWindows"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:pro="clr-namespace:SamplePreSystem.UI.BaseControls"
|
||||
Title="样品详情"
|
||||
Width="200"
|
||||
Height="300"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Margin="10">
|
||||
<TextBlock Margin="5" Text="执行标准:固相萃取" />
|
||||
<TextBlock Margin="5" Text="当前动作:离心" />
|
||||
<TextBlock Margin="5" Text="执行时间:30min" />
|
||||
<TextBlock Margin="5" Text="执行进度:40%" />
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- // 自定义控件 - 预览主体部分 注意地址不一定是local 要看RingProgressBar类放在哪里 // -->
|
||||
<pro:RingProgressBar
|
||||
x:Name="ringProgress"
|
||||
Width="100"
|
||||
Height="100"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Progress="40" />
|
||||
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="20"
|
||||
Foreground="Black"
|
||||
Text="{Binding Progress, ElementName=ringProgress, StringFormat={}{0}%}" />
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</basewindows:BaseWindow>
|
||||
@@ -0,0 +1,29 @@
|
||||
using SamplePre.UIWpf.BaseWindows;
|
||||
using SamplePreSystem.UI.BaseControls;
|
||||
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.Shapes;
|
||||
|
||||
namespace SamplePre.UIWpf.MonitorManager.chirld
|
||||
{
|
||||
/// <summary>
|
||||
/// SampleDetailWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class SampleDetailWindow : BaseWindow
|
||||
{
|
||||
public SampleDetailWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<basewindows:BaseWindow
|
||||
x:Class="SamplePre.UIWpf.SampleManager.chirld.UnitDetailWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:basewindows="clr-namespace:SamplePre.UIWpf.BaseWindows"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="详情"
|
||||
Width="400"
|
||||
Height="350"
|
||||
ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="40" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Grid.Row="0" ItemsSource="{Binding FaultInfos}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border
|
||||
Width="6"
|
||||
Height="6"
|
||||
Margin="2"
|
||||
Background="{Binding RunColor}"
|
||||
CornerRadius="3" />
|
||||
<TextBlock
|
||||
Margin="3,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding FaultName}" />
|
||||
<TextBlock
|
||||
Margin="10,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding FaultDesc}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||
<TextBlock Text="当前参数信息:" />
|
||||
<TextBlock Text="-" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</basewindows:BaseWindow>
|
||||
@@ -0,0 +1,33 @@
|
||||
//using SamplePre.UIWpf.ViewModel.Monitor;
|
||||
using SamplePre.UIWpf.BaseWindows;
|
||||
using SamplePreSystem.UI.BaseControls;
|
||||
using SamplePreSystem.UI.ViewModel.Monitor;
|
||||
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.Shapes;
|
||||
|
||||
namespace SamplePre.UIWpf.SampleManager.chirld
|
||||
{
|
||||
/// <summary>
|
||||
/// UnitDetailWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class UnitDetailWindow : BaseWindow
|
||||
{
|
||||
public UnitDetailWindow(string unitId)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.DataContext = new UnitDetailViewModel(unitId);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user