alielie
2026-09-10 9ec80cafc23f5ee3278cacce3c9f86f4087b435a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<Window x:Class="OpenTapEditor.EditorWindow"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:OpenTapEditor"
        mc:Ignorable="d"
        xmlns:ui="clr-namespace:UILib;assembly=UILib"
        x:Name="self"
        WindowState="Maximized"
        Closing="self_Closing"
        KeyDown="self_KeyDown"
        Loaded="self_Loaded"
        Background="{DynamicResource TsBgBrush}"
        FontSize="{DynamicResource GlobalFontSize}"
        Title="MainWindow" Height="1080" Width="1920">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="8*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="7*"/>
            <ColumnDefinition Width="3*"/>
        </Grid.ColumnDefinitions>
 
        <Border Grid.ColumnSpan="3" BorderBrush="{StaticResource BorderBrush}" 
                BorderThickness="0,1,0,1">
            <Menu Background="{DynamicResource BgBrush}">
                <MenuItem Header="{DynamicResource 文件(F)}" Style="{StaticResource MenuItemStyle}" ItemsSource="{Binding FileMenuItems,ElementName=self}">
                    <!--<MenuItem Click="MenuItem_Click" Header="关闭"/>-->
                    <!--<Separator />-->
                </MenuItem>
 
                <MenuItem Style="{StaticResource MenuItemStyle}" Header="{DynamicResource 设置(S)}">
                    <MenuItem Click="MenuItem_Click" Tag="自定义测试步骤" Header="{DynamicResource 自定义测试步骤}"/>
                    <MenuItem Click="MenuItem_Click" Tag="UISetting" Header="{DynamicResource 设置}"/>
                    <Separator />
                </MenuItem>
            </Menu>
        </Border>
 
 
        <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="8*"/>
                <RowDefinition Height="2*"/>
            </Grid.RowDefinitions>
 
            <Border Background="#e8e8e8">
                <TabControl x:Name="stepTabControl" Grid.Row="0" SelectedValue="{Binding SelectedTab,ElementName=self}"
                        BorderThickness="0" Margin="-2,-2,-2,0"
                            Background="{DynamicResource TsBgBrush}"
                        ItemsSource="{Binding TabItems,ElementName=self}">
                    <TabControl.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"/>
                                    <ColumnDefinition Width="Auto"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock FontSize="12" Grid.Column="0" VerticalAlignment="Center">
                                <Run Text="{Binding Content.TabName}" />
                                <Run>
                                    <Run.Style>
                                        <Style TargetType="Run">
                                            <Setter Property="Text" Value=""/>
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding Content.HasChanged}" Value="True">
                                                    <Setter Property="Text" Value="*"/>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Run.Style>
                                </Run>
                                </TextBlock>
                                <Button Grid.Column="1" Content="❌" Width="20" Height="20" 
                                    Margin="5,0,0,0"
                        Click="CloseTabItem_Click" Tag="{Binding }"
                        ToolTip="关闭标签页"
                        Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"/>
                            </Grid>
                        </DataTemplate>
                    </TabControl.ItemTemplate>
 
                    <TabControl.ContentTemplate>
                        <DataTemplate>
                            <Border Margin="0,-2,0,0" BorderThickness="0,1,0,0" Padding="5,5,5,0" 
                                    BorderBrush="{DynamicResource BorderBrush}">
                                <ContentControl Content="{Binding Content}"/>
                            </Border>
                        </DataTemplate>
                    </TabControl.ContentTemplate>
                </TabControl>
            </Border>
 
            <GridSplitter Grid.Row="1" HorizontalAlignment="Stretch" Background="Transparent" VerticalAlignment="Top" Height="5"/>
            <local:LogControl FontSize="12" Grid.Row="1" Margin="5" x:Name="logControl"/>
        </Grid>
 
 
        <!--<GridSplitter Grid.Row="1" Grid.Column="1" Width="5" HorizontalAlignment="Left"/>
 
 
        <Grid Grid.Row="1" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <GroupBox Header="单步设置" Grid.Row="0" Grid.Column="1" Margin="5">
                <local:StepSettingView  x:Name="settingView"/>
            </GroupBox>
 
            <GroupBox Header="变量设置" Grid.Row="1" Grid.Column="1" Margin="5">
                <local:VariablesControl x:Name="variableControl"/>
            </GroupBox>
        </Grid>-->
 
 
        <!--<GridSplitter Grid.Row="1" Grid.Column="2" Width="5" HorizontalAlignment="Left"/>
        
        <GridSplitter Grid.Row="2" Grid.ColumnSpan="3" HorizontalAlignment="Stretch"  VerticalAlignment="Top" Height="5"/>-->
 
        <!--<StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2">
            <Button Grid.Row="3" Grid.Column="0" Click="Button_Click" x:Name="openSetting" Content="openSetting"/>
            <local:BreakConditionCtrl Grid.Row="3" Grid.Column="1" x:Name="bcSetting"/>
        </StackPanel>-->
 
        <!--<DataGrid Grid.Row="2" Grid.Column="1" x:Name="instView"/>-->
    </Grid>
</Window>