添加项目文件。
This commit is contained in:
128
MainModule/Views/AutomatedTestingView.xaml
Normal file
128
MainModule/Views/AutomatedTestingView.xaml
Normal file
@@ -0,0 +1,128 @@
|
||||
<UserControl x:Class="MainModule.Views.AutomatedTestingView"
|
||||
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:prism="http://prismlibrary.com/"
|
||||
xmlns:local="clr-namespace:MainModule.Views"
|
||||
xmlns:b="clr-namespace:UIShare.Behaviors;assembly=UIShare"
|
||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:vs="clr-namespace:TestingModule.Views;assembly=TestingModule"
|
||||
xmlns:converters="clr-namespace:UIShare.Converters;assembly=UIShare"
|
||||
mc:Ignorable="d"
|
||||
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<converters:LessThanConverter x:Key="LessThanConverter" />
|
||||
</UserControl.Resources>
|
||||
<Border >
|
||||
<i:Interaction.Behaviors>
|
||||
<b:MouseDoubleClickBehavior
|
||||
Command="{Binding DataContext.RefreshCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"/>
|
||||
</i:Interaction.Behaviors>
|
||||
|
||||
<!-- 给最外层 Grid 命名,方便子控件通过 Binding 找到它的 ActualWidth -->
|
||||
<Grid x:Name="RootGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<!-- 给第二行取个名字 Row1,方便触发器控制它 -->
|
||||
<RowDefinition x:Name="Row1">
|
||||
<RowDefinition.Style>
|
||||
<Style TargetType="RowDefinition">
|
||||
<!-- 正常情况下是占 1* 比例 -->
|
||||
<Setter Property="Height" Value="1*" />
|
||||
<Style.Triggers>
|
||||
<!-- 当宽度小于 600 时,把第二行的高度死死锁在 0 像素 -->
|
||||
<DataTrigger Binding="{Binding ActualWidth, ElementName=RootGrid, Converter={StaticResource LessThanConverter}, ConverterParameter=600}" Value="True">
|
||||
<Setter Property="Height" Value="0" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</RowDefinition.Style>
|
||||
</RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- ==================== 1. 左侧:命令树 ==================== -->
|
||||
<vs:CommandTree DataContext="{Binding CommandTreeVM}"
|
||||
Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Margin="5">
|
||||
<vs:CommandTree.Style>
|
||||
<Style TargetType="UserControl">
|
||||
<Style.Triggers>
|
||||
<!-- 核心逻辑:当最外层 Grid 宽度小于 600 时,隐藏自己 -->
|
||||
<DataTrigger Binding="{Binding ActualWidth, ElementName=RootGrid, Converter={StaticResource LessThanConverter}, ConverterParameter=600}" Value="True">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</vs:CommandTree.Style>
|
||||
</vs:CommandTree>
|
||||
|
||||
<!-- ==================== 2. 中上:步骤管理(核心显示) ==================== -->
|
||||
<!-- 1. 注意:标签上不要再写任何 Grid.Row、Grid.Column、Grid.ColumnSpan 属性了! -->
|
||||
<vs:StepsManager DataContext="{Binding StepsManagerVM}"
|
||||
Margin="5">
|
||||
<vs:StepsManager.Style>
|
||||
<Style TargetType="UserControl">
|
||||
<!-- 2. 【核心】把默认的网格位置写在这里(低优先级) -->
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="1"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="2"/>
|
||||
|
||||
<Style.Triggers>
|
||||
<!-- 3. 当宽度小于 600 时,触发器就会顺理成章地覆盖上面的默认值,变成全屏 -->
|
||||
<DataTrigger Binding="{Binding ActualWidth, ElementName=RootGrid, Converter={StaticResource LessThanConverter}, ConverterParameter=600}" Value="True">
|
||||
<Setter Property="Grid.Row" Value="0" />
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<!-- 附加属性在 Trigger 里的标准全称写法就是这样,只要上面没有本地值冲突,它就能完美生效 -->
|
||||
<Setter Property="Grid.RowSpan" Value="2" />
|
||||
<Setter Property="Grid.ColumnSpan" Value="4" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</vs:StepsManager.Style>
|
||||
</vs:StepsManager>
|
||||
|
||||
<!-- ==================== 3. 右上:单步编辑 ==================== -->
|
||||
<vs:SingleStepEdit DataContext="{Binding SingleStepEditVM}"
|
||||
Grid.Row="0" Grid.Column="3" Margin="5">
|
||||
<vs:SingleStepEdit.Style>
|
||||
<Style TargetType="UserControl">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ActualWidth, ElementName=RootGrid, Converter={StaticResource LessThanConverter}, ConverterParameter=600}" Value="True">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</vs:SingleStepEdit.Style>
|
||||
</vs:SingleStepEdit>
|
||||
|
||||
<!-- ==================== 4. 中下:日志显示 ==================== -->
|
||||
<vs:LogArea DataContext="{Binding LogAreaVM}"
|
||||
Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="5">
|
||||
<!-- 这里不需要写 Visibility 触发器了,保持默认即可 -->
|
||||
</vs:LogArea>
|
||||
|
||||
<!-- ==================== 5. 右下:参数管理 ==================== -->
|
||||
<vs:ParametersManager DataContext="{Binding ParametersManagerVM}"
|
||||
Grid.Row="1" Grid.Column="3" Margin="5">
|
||||
<vs:ParametersManager.Style>
|
||||
<Style TargetType="UserControl">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ActualWidth, ElementName=RootGrid, Converter={StaticResource LessThanConverter}, ConverterParameter=600}" Value="True">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</vs:ParametersManager.Style>
|
||||
</vs:ParametersManager>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
28
MainModule/Views/AutomatedTestingView.xaml.cs
Normal file
28
MainModule/Views/AutomatedTestingView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
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 MainModule.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// AutomatedTestingView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class AutomatedTestingView : UserControl
|
||||
{
|
||||
public AutomatedTestingView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
258
MainModule/Views/MainView.xaml
Normal file
258
MainModule/Views/MainView.xaml
Normal file
@@ -0,0 +1,258 @@
|
||||
<UserControl x:Class="MainModule.Views.MainView"
|
||||
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:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:converters="clr-namespace:UIShare.Converters;assembly=UIShare"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Loaded">
|
||||
<i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
|
||||
<UserControl.Resources>
|
||||
<converters:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 单元 1:TestCell1,默认 (0,0) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell1" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell1">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<!-- 单元 2:TestCell2,默认 (0,1) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell2" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="1"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell2">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<!-- 单元 3:TestCell3,默认 (0,2) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell3" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="2"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell3">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<!-- 单元 4:TestCell4,默认 (1,0) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell4" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="1"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell4">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<!-- 单元 5:TestCell5,默认 (1,1) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell5" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="1"/>
|
||||
<Setter Property="Grid.Column" Value="1"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell5">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<!-- 单元 6:TestCell6,默认 (1,2) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell6" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="1"/>
|
||||
<Setter Property="Grid.Column" Value="2"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell6">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<!-- 单元 7:TestCell7,默认 (2,0) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell7" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="2"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell7">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<!-- 单元 8:TestCell8,默认 (2,1) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell8" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="2"/>
|
||||
<Setter Property="Grid.Column" Value="1"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell8">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<!-- 单元 9:TestCell9,默认 (2,2) -->
|
||||
<ContentControl prism:RegionManager.RegionName="TestCell9" Margin="2">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
<Setter Property="Grid.Row" Value="2"/>
|
||||
<Setter Property="Grid.Column" Value="2"/>
|
||||
<Setter Property="Grid.RowSpan" Value="1"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="1"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName, Converter={StaticResource StringToVisibilityConverter}}" Value="Visible">
|
||||
<Setter Property="Visibility" Value="Collapsed"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ExpandedCellName}" Value="TestCell9">
|
||||
<Setter Property="Visibility" Value="Visible"/>
|
||||
<Setter Property="Grid.Row" Value="0"/>
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="Grid.RowSpan" Value="3"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="3"/>
|
||||
<Setter Property="Panel.ZIndex" Value="99"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
19
MainModule/Views/MainView.xaml.cs
Normal file
19
MainModule/Views/MainView.xaml.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using MainModule.ViewModels;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace MainModule.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// MainView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class MainView : UserControl
|
||||
{
|
||||
public MainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
85
MainModule/Views/ProtocolStartView.xaml
Normal file
85
MainModule/Views/ProtocolStartView.xaml
Normal file
@@ -0,0 +1,85 @@
|
||||
<UserControl x:Class="MainModule.Views.ProtocolStartView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:prism="http://prismlibrary.com/"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True">
|
||||
|
||||
<Grid>
|
||||
<Grid.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="#F8FAFC" Offset="0"/>
|
||||
<GradientStop Color="#E2E8F0" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</Grid.Background>
|
||||
|
||||
<materialDesign:Card Width="320" Height="380"
|
||||
UniformCornerRadius="16"
|
||||
Background="#FFFFFF"
|
||||
materialDesign:ElevationAssist.Elevation="Dp4"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
|
||||
<Grid Margin="30">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Row="0" HorizontalAlignment="Center" Margin="0,8,0,0">
|
||||
<materialDesign:PackIcon Kind="Chip"
|
||||
Width="24" Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="#94A3B8"/>
|
||||
<TextBlock Text="{Binding TestStatus}"
|
||||
FontSize="15"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="#64748B"
|
||||
Margin="0,6,0,0"
|
||||
HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<Ellipse Width="150" Height="150" Fill="#F1F5F9"/>
|
||||
<Ellipse Width="130" Height="130" Fill="#E2E8F0"/>
|
||||
|
||||
<Button Command="{Binding StartProtocolCommand}"
|
||||
Width="110" Height="110"
|
||||
Style="{StaticResource MaterialDesignFloatingActionDarkButton}"
|
||||
Background="#1E293B"
|
||||
BorderBrush="#334155"
|
||||
BorderThickness="2"
|
||||
materialDesign:ElevationAssist.Elevation="Dp6"
|
||||
materialDesign:RippleAssist.Feedback="#38BDF8">
|
||||
<Button.Resources>
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="55"/>
|
||||
</Style>
|
||||
</Button.Resources>
|
||||
|
||||
<materialDesign:PackIcon Kind="Play"
|
||||
Width="48" Height="48"
|
||||
Foreground="#38BDF8"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="4,0,0,0"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<StackPanel Grid.Row="2" HorizontalAlignment="Center" Margin="0,0,0,8">
|
||||
<TextBlock Text="READY"
|
||||
FontSize="13"
|
||||
FontWeight="Black"
|
||||
Foreground="#10B981"
|
||||
HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="点击按钮加载测试序列"
|
||||
FontSize="12"
|
||||
Foreground="#94A3B8"
|
||||
Margin="0,4,0,0"
|
||||
HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
MainModule/Views/ProtocolStartView.xaml.cs
Normal file
28
MainModule/Views/ProtocolStartView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
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 MainModule.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// ProtocolStartView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class ProtocolStartView : UserControl
|
||||
{
|
||||
public ProtocolStartView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user