| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <hc:Window x:Class="TeamAAS.Views.AddRobotDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:loc="clr-namespace:TeamAAS.Localization"
- Title="{loc:Translate '添加机器人'}"
- Width="400" Height="458"
- WindowStartupLocation="CenterOwner"
- ResizeMode="NoResize"
- Background="{DynamicResource RegionBrush}">
- <Grid Margin="24,20">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="100*"/>
- <RowDefinition Height="50"/>
- </Grid.RowDefinitions>
- <!-- Title -->
- <TextBlock Grid.Row="0" Text="{loc:Translate '🤖 添加机器人'}" FontSize="18" FontWeight="Bold"
- Foreground="{DynamicResource PrimaryTextBrush}" Margin="0,0,0,24"/>
- <ScrollViewer Grid.Row="1">
- <!-- Form -->
- <StackPanel Orientation="Vertical">
-
- <!-- Name -->
- <TextBlock Text="{loc:Translate '名称'}" FontSize="13" Margin="0,0,0,4" Foreground="{DynamicResource SecondaryTextBrush}"/>
- <TextBox x:Name="txtName" Text="{loc:Translate '机器人 1'}" FontSize="13" Padding="8,6" Margin="0,0,0,16"/>
- <!-- Brand -->
- <TextBlock Text="{loc:Translate '品牌'}" FontSize="13" Margin="0,0,0,4" Foreground="{DynamicResource SecondaryTextBrush}"/>
- <ComboBox x:Name="cbBrand" FontSize="13" Padding="8,6" Margin="0,0,0,16" SelectedIndex="1">
- <ComboBoxItem Content="{loc:Translate '默认'}" Tag="0"/>
- <ComboBoxItem Content="{loc:Translate '爱普生 (EPSON)'}" Tag="1"/>
- <ComboBoxItem Content="{loc:Translate '发那科 (FANUC)'}" Tag="2"/>
- <ComboBoxItem Content="{loc:Translate '施耐德 (Schneider)'}" Tag="3"/>
- <ComboBoxItem Content="{loc:Translate 'XYZ模组平台'}" Tag="11"/>
- <ComboBoxItem Content="{loc:Translate 'XYZU模组平台'}" Tag="12"/>
- </ComboBox>
- <!-- Communication Type -->
- <TextBlock Text="{loc:Translate '通讯方式'}" FontSize="13" Margin="0,0,0,4" Foreground="{DynamicResource SecondaryTextBrush}"/>
- <ComboBox x:Name="cbConnectType" FontSize="13" Padding="8,6" Margin="0,0,0,16" SelectedIndex="1">
- <ComboBoxItem Content="{loc:Translate '软件作为服务器'}" Tag="0"/>
- <ComboBoxItem Content="{loc:Translate '软件作为客户端'}" Tag="1"/>
- </ComboBox>
- <!-- IP + Port -->
- <Grid Margin="0,0,0,16">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="16"/>
- <ColumnDefinition Width="120"/>
- </Grid.ColumnDefinitions>
- <StackPanel Grid.Column="0">
- <TextBlock Text="{loc:Translate 'IP地址'}" FontSize="13" Margin="0,0,0,4" Foreground="{DynamicResource SecondaryTextBrush}"/>
- <TextBox x:Name="txtIP" Text="192.168.0.1" FontSize="13" Padding="8,6"/>
- </StackPanel>
- <StackPanel Grid.Column="2">
- <TextBlock Text="{loc:Translate '端口'}" FontSize="13" Margin="0,0,0,4" Foreground="{DynamicResource SecondaryTextBrush}"/>
- <hc:NumericUpDown x:Name="nudPort" Value="3600" Minimum="1" Maximum="65535"
- Width="120" FontSize="13" HorizontalAlignment="Left"/>
- </StackPanel>
- </Grid>
- <!-- Terminator -->
- <TextBlock Text="{loc:Translate '结束符'}" FontSize="13" Margin="0,0,0,4" Foreground="{DynamicResource SecondaryTextBrush}"/>
- <ComboBox x:Name="cbTerminator" FontSize="13" Padding="8,6" Margin="0,0,0,16" SelectedIndex="2">
- <ComboBoxItem Content="{loc:Translate '回车 (CR)'}" Tag="0"/>
- <ComboBoxItem Content="{loc:Translate '换行 (LF)'}" Tag="1"/>
- <ComboBoxItem Content="{loc:Translate '回车+换行 (CRLF)'}" Tag="2"/>
- <ComboBoxItem Content="{loc:Translate '无'}" Tag="3"/>
- </ComboBox>
- <!-- Encoding -->
- <TextBlock Text="{loc:Translate '编码格式'}" FontSize="13" Margin="0,0,0,4" Foreground="{DynamicResource SecondaryTextBrush}"/>
- <ComboBox x:Name="cbEncoding" FontSize="13" Padding="8,6" Margin="0,0,0,16" SelectedIndex="0">
- <ComboBoxItem Content="Default" Tag="0"/>
- <ComboBoxItem Content="ASCII" Tag="1"/>
- <ComboBoxItem Content="UTF7" Tag="2"/>
- <ComboBoxItem Content="UTF8" Tag="3"/>
- <ComboBoxItem Content="UTF32" Tag="4"/>
- <ComboBoxItem Content="Unicode" Tag="5"/>
- <ComboBoxItem Content="BigEndianUnicode" Tag="6"/>
- <ComboBoxItem Content="GB2312" Tag="7"/>
- </ComboBox>
- </StackPanel>
- </ScrollViewer>
- <!-- Buttons -->
- <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left" Margin="176,0,0,0">
- <Button Content="{loc:Translate '取消'}" MinWidth="80" Padding="16,0" Margin="0,0,12,0" IsCancel="True"
- Style="{StaticResource ButtonDefault}"/>
- <Button Content="{loc:Translate '确定'}" MinWidth="80" Padding="16,0" IsDefault="True" Click="BtnOK_Click"
- Style="{StaticResource ButtonPrimary}"/>
- </StackPanel>
- </Grid>
- </hc:Window>
|