3 Star 10 Fork 4

Talon/ScriptBox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Window_DbcBalance.xaml 3.01 KB
一键复制 编辑 原始数据 按行查看 历史
Talon 提交于 2025-05-19 16:43 +08:00 . style: 将窗口启动位置设置为居中屏幕
<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>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/talonshaw/ScriptBox.git
git@gitee.com:talonshaw/ScriptBox.git
talonshaw
ScriptBox
ScriptBox
master

搜索帮助