AddStandDialog.xaml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <Window x:Class="MeterVision.Stand.AddStandDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. Background="WhiteSmoke"
  5. ResizeMode="NoResize"
  6. ShowInTaskbar="False"
  7. WindowStartupLocation="CenterOwner"
  8. Title="新建模板" Height="280" Width="320">
  9. <Grid>
  10. <Grid.RowDefinitions>
  11. <RowDefinition Height="*" />
  12. <RowDefinition Height="40" />
  13. </Grid.RowDefinitions>
  14. <!-- 输入模板名称的区域 -->
  15. <Border Grid.Row="0" BorderBrush="#D3D3D3" BorderThickness="1" Margin="10 10 10 0" Background="White">
  16. <StackPanel Orientation="Vertical" VerticalAlignment="Center">
  17. <!-- 单选框区域 -->
  18. <StackPanel Grid.Row="0" Orientation="Vertical" Margin="20,0,20,0" VerticalAlignment="Top">
  19. <RadioButton Name="rbCustomTemplate" FontSize="14px" Foreground="#000000"
  20. Content="自定义模板" IsChecked="False" Margin="0,5" IsEnabled="True"
  21. Checked="rbCustomTemplate_Checked"/>
  22. <RadioButton Name="rbImportExcel" FontSize="14px" Foreground="#000000"
  23. Content="导入Excel模板" IsChecked="True" Margin="0,5"
  24. Checked="rbImportExcel_Checked"/>
  25. </StackPanel>
  26. <StackPanel Orientation="Vertical" Margin="20 10 20 0" VerticalAlignment="Center">
  27. <TextBlock Text="请输入模板名称:" HorizontalAlignment="Left" VerticalAlignment="Center"
  28. FontSize="14px" Foreground="#333333" Margin="0 0 0 5" />
  29. <TextBox Name="txtStandName" FontSize="14px" Foreground="#000000" VerticalAlignment="Center" Padding="2"/>
  30. </StackPanel>
  31. <!-- Excel文件选择区域,初始时隐藏 -->
  32. <StackPanel Grid.Row="0" Orientation="Vertical" Margin="20,10,20,0" Visibility="Visible" x:Name="ExcelImportPanel">
  33. <TextBlock Text="请选择Excel:" HorizontalAlignment="Left" VerticalAlignment="Center"
  34. FontSize="14px" Foreground="#333333" Margin="0 0 0 5" />
  35. <!--<StackPanel Orientation="Horizontal" >-->
  36. <Grid>
  37. <Grid.ColumnDefinitions>
  38. <ColumnDefinition Width="*"/>
  39. <ColumnDefinition Width="Auto"/>
  40. </Grid.ColumnDefinitions>
  41. <TextBox Name="txtExcelFile" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Center"
  42. IsReadOnly="True"
  43. Foreground="#000000" Padding="2" FontSize="14px" Margin="0,0,2,0"/>
  44. <Button Name="btnImportExcel" Grid.Column="1" Content="..." Width="28" Height="26" VerticalAlignment="Center" Click="BtnImportExcel_Click" />
  45. </Grid>
  46. <!--</StackPanel>-->
  47. </StackPanel>
  48. </StackPanel>
  49. </Border>
  50. <!-- 按钮区域 -->
  51. <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
  52. <Button Name="btnOK" Content="确定" HorizontalAlignment="Center" Margin="0 0 20 0"
  53. VerticalAlignment="Center" Width="80" Height="26" Click="BtnOK_Click" />
  54. <Button Name="btnClose" Content="取消" HorizontalAlignment="Center"
  55. VerticalAlignment="Center" Width="80" Height="26" Click="BtnClose_Click" />
  56. </StackPanel>
  57. </Grid>
  58. </Window>