代码拉取完成,页面将自动刷新
<Window
x:Class="bst_autotest_ide.MainWindow"
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:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:local="clr-namespace:bst_autotest_ide"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pro="clr-namespace:bst_autotest_ide"
xmlns:view="clr-namespace:bst_autotest_ide.view"
Title="Bst_Autotest_Ide V1.7.0.1"
Width="1200"
Height="900"
d:DataContext="{d:DesignInstance local:TreeViewModel}"
xmlns:data ="clr-namespace:bst_autotest_ide.converter"
Closed="Window_Closed"
Closing="Window_Closing"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
<local:ObjectConvert x:Key="objectConverter"></local:ObjectConvert>
</Window.Resources>
<i:Interaction.Triggers>
<i:EventTrigger EventName="Activated">
<pro:EventCommand Command="{Binding WindowActivated}" />
</i:EventTrigger>
<i:EventTrigger EventName="Loaded">
<pro:EventCommand Command="{Binding WindowActivated}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="2*" />
<RowDefinition Height="auto" />
<RowDefinition Height="1*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<StackPanel Orientation="Vertical">
<StackPanel>
<Menu
Margin="0"
Padding="0"
VerticalAlignment="Center"
IsMainMenu="True">
<MenuItem
Height="24"
Margin="16,0,0,0"
Padding="0"
Header="_文件(F)">
<MenuItem
Padding="0"
Command="Save"
Header="Save"
Icon="{materialDesign:PackIcon Kind=ContentSave}" Margin="10,0,10,0" />
<!--<MenuItem Command="SaveAs" Header="Save As.." />-->
<MenuItem
Padding="0"
Command="Close"
Header="Exit"
Icon="{materialDesign:PackIcon Kind=ExitToApp}" Margin="10,0,10,0"
InputGestureText="Ctrl+E" />
<MenuItem
Padding="0"
Command="{Binding OpenSystemLogCommand}"
Header="打开系统日志路径"
Icon="{materialDesign:PackIcon Kind=OpenInNew}" Margin="10,0,10,0" />
<Separator />
</MenuItem>
<MenuItem
Height="24"
Margin="16,0,0,0"
Padding="0"
Header="_编辑(E)">
<MenuItem
Padding="0"
Command="Cut"
Header="_Cut"
Icon="{materialDesign:PackIcon Kind=ContentCut}" Margin="10,0,10,0" />
<MenuItem
Padding="0"
Command="Copy"
Header="_Copy"
Icon="{materialDesign:PackIcon Kind=ContentCopy}" Margin="10,0,10,0" />
<MenuItem
Padding="0"
Command="Paste"
Header="_Paste"
Icon="{materialDesign:PackIcon Kind=ContentPaste}" Margin="10,0,10,0" />
</MenuItem>
<MenuItem
Height="36"
Margin="16,0,0,0"
Padding="0"
Header="_工程(P)">
<MenuItem Header="测试工程管理">
<MenuItem
Click="Click_Open_Project"
Foreground="Black"
Header="打开测试工程" />
<MenuItem
Click="Click_Create_Test_Project"
Foreground="Black"
Header="生成测试工程" />
</MenuItem>
<MenuItem Header="测试任务管理">
<MenuItem
Click="Click_CreateTask"
Foreground="Black"
Header="新建测试任务" />
<MenuItem Foreground="Black" Header="全局任务策略">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<local:EventCommand Command="{Binding OpenTestStrategy}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</MenuItem>
<MenuItem
Command="{Binding OpenTestLinkSetupCommand}"
Foreground="Black"
Header="执行任务配置"
IsEnabled="True" />
</MenuItem>
</MenuItem>
<MenuItem
Height="36"
Margin="16,0,0,0"
Padding="0"
Header="_调试(D)">
<MenuItem Header="脚本运行" Visibility="Collapsed" />
<MenuItem
Name="Select_Task_Run_MenuItem"
Click="Click_Run_Task"
Header="所选任务运行"
IsEnabled="True" />
</MenuItem>
<MenuItem
Height="36"
Margin="16,0,0,0"
Padding="0"
Header="_分析(N)">
<MenuItem
Command="{Binding OpenReportCommand}"
Header="打开测试报告"
IsEnabled="True">
<MenuItem
Command="{Binding OpenReportCommand}"
Header="当前测试报告(Excel)"
IsEnabled="True" />
<MenuItem
Command="{Binding MakeReportCommand}"
Header="Json任务文件(Json)"
IsEnabled="True" />
<MenuItem
Command="{Binding OpenLocalReportCommand}"
Header="本地测试报告(Excel)"
IsEnabled="True" />
</MenuItem>
<MenuItem Click="Click_OpenHtmlReport" Header="打开测试日志" />
<MenuItem
Command="{Binding OpenReportStrategyWindowCommand}"
Header="合并测试报告"
IsEnabled="True" />
</MenuItem>
<MenuItem
Height="36"
Margin="16,0,0,0"
Padding="0"
Header="_工具(T)">
<MenuItem Header="_python环境管理">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<local:EventCommand Command="{Binding OpenPktCmd}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</MenuItem>
<MenuItem Header="_测试拓扑管理" IsEnabled="True">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<local:EventCommand Command="{Binding OpenTopoMgt}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</MenuItem>
<MenuItem Header="_测试用例转换" IsEnabled="True">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<local:EventCommand Command="{Binding OpenExcelToCase}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</MenuItem>
</MenuItem>
</Menu>
</StackPanel>
<StackPanel>
<ToolBarTray>
<ToolBar ClipToBounds="False" Style="{DynamicResource MaterialDesignToolBar}">
<Button
Name="SaveScriptBt"
Padding="2"
Click="Save_Script"
Content="{materialDesign:PackIcon Kind=ContentSave}"
IsEnabled="False"
ToolTip="Save" />
<Separator />
<Button
Margin="0,0,0,0"
Padding="2"
Command="Cut"
Content="{materialDesign:PackIcon Kind=ContentCut}"
ToolBar.OverflowMode="AsNeeded"
ToolTip="Cut" />
<Button
Margin="0,0,0,0"
Padding="2"
Command="Copy"
Content="{materialDesign:PackIcon Kind=ContentCopy}"
ToolBar.OverflowMode="AsNeeded"
ToolTip="Copy that stuff" />
<Separator />
<Button
Margin="0,0,0,0"
Padding="2"
Command="Paste"
Content="{materialDesign:PackIcon Kind=ContentPaste}"
ToolBar.OverflowMode="AsNeeded"
ToolTip="Paste some stuff" />
<!--
when badging in a toolbar, make sure the parent ToolBar.ClipToBounds="False", and
manually apply the button style
-->
<Separator />
<ListBox>
<ListBoxItem Padding="2" ToolTip="This is a lonley toggle with TextBlock instead of icon">
<TextBlock Text="W" />
</ListBoxItem>
</ListBox>
<Separator />
<Button
Name="Run_Select_Task"
Height="Auto"
Padding="2"
Click="Run_Select_Task_Click"
Content="{materialDesign:PackIcon Kind=PlayCircleOutline}"
IsEnabled="True"
ToolTip="Run Select Task"
Visibility="Visible" />
<Button
Name="Stop_Task"
Height="Auto"
Padding="2"
Click="Stop_Task_Click"
Content="{materialDesign:PackIcon Kind=StopCircle}"
IsEnabled="True"
ToolTip="Stop Task"
Visibility="Collapsed" />
<Button
Name="Stop_Task_Force"
Height="Auto"
Padding="2"
Click="Stop_Task_Force_Click"
Content="{materialDesign:PackIcon Kind=StopCircleOutline}"
IsEnabled="True"
ToolTip="Stop Task(强制停止)"
Visibility="Collapsed" />
<Button
Name="schedule_Select_Task"
Height="Auto"
Padding="2"
Click="schedule_Select_Task_Click"
Content="{materialDesign:PackIcon Kind=CalendarClock}"
IsEnabled="True"
ToolTip="定时执行"
Visibility="Visible" />
<Separator />
<Label VerticalAlignment="Center" Content="Font size:" />
<ComboBox
x:Name="FontBar"
DisplayMemberPath="Info"
ItemsSource="{Binding FontSizeList}"
SelectedValue="{Binding Select}"
SelectedValuePath="Value">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<pro:EventCommand Command="{Binding CmdFontChanged}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<!--
<ComboBoxItem
Content="10" />
<ComboBoxItem
IsSelected="True"
Content="12" />
<ComboBoxItem
Content="14" />
<ComboBoxItem
Content="16" />
-->
<!--
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseLeftButtonDown">
<pro:EventCommand Command="{Binding CmdSetFontSize}" CommandParateter="{Binding FontBar.SelectedItem}" />
</i:EventTrigger>
</i:Interaction.Triggers>
-->
</ComboBox>
<Grid Grid.Row="0" Grid.Column="1">
<CheckBox x:Name="CheckAutoLinkIn" Margin="20,0,0,0" Content="自动回填" IsEnabled="False" IsMouseCapturedChanged="CheckAutoLinkIn_IsMouseCapturedChanged" Command="{Binding CheckAutoLinkSet}" CommandParameter="{Binding ElementName=CheckAutoLinkIn, Path=IsChecked}"/>
</Grid>
<Label VerticalAlignment="Center" Content="执行器类型" Margin="20,0,0,0"/>
<ComboBox
x:Name="runServerTypeBar"
ItemsSource="{Binding runServerTypeList}"
SelectedValue="{Binding runServerTypeSelect}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<pro:EventCommand Command="{Binding CmdrunServerTypeChanged}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</ComboBox>
</ToolBar>
</ToolBarTray>
</StackPanel>
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<StackPanel x:Name="runServerSetting" Orientation="Horizontal" Background='WhiteSmoke' >
<Label VerticalAlignment="Center" Content="执行器IP" Margin="10,0,0,0"/>
<TextBox Name="runServerIP" MinWidth="100" Text="{Binding runServerIPText}"></TextBox>
<Label VerticalAlignment="Center" Content="执行器Port" Margin="10,0,0,0"/>
<TextBox Name="runServerPort" MinWidth="50" Text="{Binding runServerPortText}"></TextBox>
<Button x:Name="runServerConnButton"
Style="{StaticResource MaterialDesignFlatButton}"
Content="连接"
Margin="0,0,0,0"
Command="{Binding runServerConn}">
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource ResourceKey=objectConverter}">
<Binding ElementName="runServerIP" Path="Text"></Binding>
<Binding ElementName="runServerPort" Path="Text"></Binding>
</MultiBinding>
</Button.CommandParameter>
</Button>
<Label VerticalAlignment="Center" Content="执行器Username" Margin="10,0,0,0"/>
<TextBox Name="runServerUsername" MinWidth="50" Text="{Binding runServerUsernameText}"></TextBox>
<Label VerticalAlignment="Center" Content="执行器Password" Margin="10,0,0,0"/>
<TextBox Name="runServerPassword" MinWidth="50" Text="{Binding runServerPasswordText}"></TextBox>
<Label VerticalAlignment="Center" Content="执行器host_port" Margin="10,0,0,0"/>
<TextBox Name="runServerHostport" MinWidth="50" Text="{Binding runServerHostport}"></TextBox>
<Button x:Name="runServersetButton"
Style="{StaticResource MaterialDesignFlatButton}"
Content="设置"
Margin="0,0,0,0"
Command="{Binding runServerset}">
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource ResourceKey=objectConverter}">
<Binding ElementName="runServerUsername" Path="Text"></Binding>
<Binding ElementName="runServerPassword" Path="Text"></Binding>
<Binding ElementName="runServerHostport" Path="Text"></Binding>
</MultiBinding>
</Button.CommandParameter>
</Button>
</StackPanel>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10" MinWidth="10" />
<ColumnDefinition Width="2*" MinWidth="10" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="6*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<TabControl Style="{StaticResource MaterialDesignNavigatilRailTabControl}" TabStripPlacement="Bottom">
<TabItem>
<TabItem.Header>
<StackPanel
Width="auto"
Height="auto"
Orientation="Horizontal">
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="AlphaPCircle" />
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="测试工程" />
</StackPanel>
</TabItem.Header>
<view:TreeControl Loaded="TreeControl_Loaded" />
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel
Width="auto"
Height="auto"
Orientation="Horizontal">
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="AlphaTCircle" />
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="测试任务" />
</StackPanel>
</TabItem.Header>
<view:TaskTreeControl />
</TabItem>
</TabControl>
<!--<Button x:Name="sendtext" Content="SendText" HorizontalAlignment="Left" Margin="144,399,0,0" VerticalAlignment="Top" Width="75" Click="sendtext_Click"/>-->
</Grid>
<GridSplitter
Grid.Column="2"
Width="1"
HorizontalAlignment="Center"
VerticalAlignment="Stretch"
Background="#FF169ED1"
ShowsPreview="False" />
<Grid Grid.Column="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="139*"/>
<ColumnDefinition Width="747*"/>
</Grid.ColumnDefinitions>
<view:TabControl Grid.ColumnSpan="2" />
</Grid>
</Grid>
<GridSplitter
Grid.Row="3"
Height="2"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Background="#FF169ED1"
ShowsPreview="False" />
<Grid Grid.Row="4">
<TabControl Style="{StaticResource MaterialDesignNavigatilRailTabControl}" TabStripPlacement="Bottom">
<TabItem>
<TabItem.Header>
<StackPanel
Width="auto"
Height="auto"
Orientation="Horizontal">
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="AlphaPCircle" />
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="测试执行日志" />
</StackPanel>
</TabItem.Header>
<view:OutputControl/>
</TabItem>
<TabItem>
<TabItem.Header>
<StackPanel
Width="auto"
Height="auto"
Orientation="Horizontal">
<materialDesign:PackIcon
Width="24"
Height="24"
HorizontalAlignment="Center"
Kind="AlphaTCircle" />
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="环境日志" />
</StackPanel>
</TabItem.Header>
<view:PacketOutputControl/>
</TabItem>
</TabControl>
</Grid>
<Grid Grid.Row="5">
<StatusBar>
<StatusBar.ItemsPanel>
<ItemsPanelTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="100" />
</Grid.ColumnDefinitions>
</Grid>
</ItemsPanelTemplate>
</StatusBar.ItemsPanel>
<StatusBarItem Grid.Column="0">
<TextBlock x:Name="Statusbar" Text="{Binding StatusText}" />
</StatusBarItem>
<Separator Grid.Column="1" />
<StatusBarItem Grid.Column="2">
<ProgressBar
Width="90"
Height="16"
Value="{Binding ProgressBarValue}" />
</StatusBarItem>
</StatusBar>
</Grid>
</Grid>
</Window>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。