AddStandDialog.xaml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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" Content="自定义模板" IsChecked="False" Margin="0,5" Checked="rbCustomTemplate_Checked"/>
  20. <RadioButton Name="rbImportExcel" FontSize="14px" Foreground="#000000" Content="导入Excel模板" IsChecked="True" Margin="0,5" Checked="rbImportExcel_Checked"/>
  21. </StackPanel>
  22. <StackPanel Orientation="Vertical" Margin="20 10 20 0" VerticalAlignment="Center">
  23. <TextBlock Text="请输入模板名称:" HorizontalAlignment="Left" VerticalAlignment="Center"
  24. FontSize="14px" Foreground="#333333" Margin="0 0 0 5" />
  25. <TextBox Name="txtStandName" FontSize="14px" Foreground="#000000" VerticalAlignment="Center" Padding="2"/>
  26. </StackPanel>
  27. <!-- Excel文件选择区域,初始时隐藏 -->
  28. <StackPanel Grid.Row="0" Orientation="Vertical" Margin="20,10,20,0" Visibility="Visible" x:Name="ExcelImportPanel">
  29. <TextBlock Text="请选择Excel:" HorizontalAlignment="Left" VerticalAlignment="Center"
  30. FontSize="14px" Foreground="#333333" Margin="0 0 0 5" />
  31. <!--<StackPanel Orientation="Horizontal" >-->
  32. <Grid>
  33. <Grid.ColumnDefinitions>
  34. <ColumnDefinition Width="*"/>
  35. <ColumnDefinition Width="Auto"/>
  36. </Grid.ColumnDefinitions>
  37. <TextBox Name="txtExcelFile" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Center"
  38. IsReadOnly="True"
  39. Foreground="#000000" Padding="2" FontSize="14px" Margin="0,0,2,0"/>
  40. <Button Name="btnImportExcel" Grid.Column="1" Content="..." Width="28" Height="26" VerticalAlignment="Center" Click="BtnImportExcel_Click" />
  41. </Grid>
  42. <!--</StackPanel>-->
  43. </StackPanel>
  44. </StackPanel>
  45. </Border>
  46. <!-- 按钮区域 -->
  47. <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
  48. <Button Name="btnOK" Content="确定" HorizontalAlignment="Center" Margin="0 0 20 0"
  49. VerticalAlignment="Center" Width="80" Height="26" Click="BtnOK_Click" />
  50. <Button Name="btnClose" Content="取消" HorizontalAlignment="Center"
  51. VerticalAlignment="Center" Width="80" Height="26" Click="BtnClose_Click" />
  52. </StackPanel>
  53. </Grid>
  54. </Window>