代码拉取完成,页面将自动刷新
<Window x:Class="ScriptBox.Window_DbcBalance"
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:ScriptBox"
mc:Ignorable="d"
Title="DBC负载均衡转换器" Height="450" Width="800" WindowStartupLocation="CenterScreen">
<Grid Margin="10">
<Grid.RowDefinitions>
<!-- 新增选项行 -->
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 新增时间槽选择 -->
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0 0 0 10">
<TextBlock Text="时间槽设置:" VerticalAlignment="Center"/>
<RadioButton x:Name="rb5ms" Content="5ms" Margin="10 0" IsChecked="True"
GroupName="TimeSlot" Checked="RadioButton_Checked" ToolTip="标准5ms时间槽分配"/>
<RadioButton x:Name="rb10ms" Content="10ms"
GroupName="TimeSlot" Checked="RadioButton_Checked" ToolTip="适用于10ms时间槽的特殊场景"/>
</StackPanel>
<!-- 原拖放区域(行号改为1) -->
<Border Grid.Row="1" Name="DropZone"
Background="#FFF0F0F0"
BorderBrush="Gray"
BorderThickness="2"
CornerRadius="8"
Padding="20"
Margin="0 0 0 10">
<TextBlock Text="将文件拖放到此处,支持拖入多个"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Foreground="Gray"/>
</Border>
<!-- 已选文件显示 -->
<!-- 修改后(使用ListBox显示文件列表) -->
<ListBox Grid.Row="2"
Name="FilePathTextBox"
ItemsSource="{Binding FilePaths}"
DisplayMemberPath="."
ScrollViewer.VerticalScrollBarVisibility="Auto"
Margin="0 0 0 10"
Background="White">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="2"/>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
<!-- 操作按钮 -->
<Button Grid.Row="3" Content="开始转换"
Name="ConvertButton"
Click="ConvertButton_Click"
HorizontalAlignment="Right"
Padding="20 5"
IsEnabled="{Binding HasFiles}"/>
<!-- 状态信息 -->
<StatusBar Grid.Row="4" Margin="0,10,0,0">
<TextBlock Name="StatusText"/>
</StatusBar>
</Grid>
</Window>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。