CreateDevice.xaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <UserControl x:Class="DeviceScanner.Views.Dialogs.CreateDevice"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:DeviceScanner.Views.Dialogs"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <UserControl.Resources>
  10. <ResourceDictionary Source="/UICommon;component/Resources.xaml"/>
  11. </UserControl.Resources>
  12. <Grid Width="450">
  13. <Grid.RowDefinitions>
  14. <RowDefinition/>
  15. <RowDefinition Height="8"/>
  16. <RowDefinition Height="auto"/>
  17. <RowDefinition Height="16"/>
  18. </Grid.RowDefinitions>
  19. <Grid Margin="16" TextElement.FontSize="14">
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="24"/>
  22. <RowDefinition Height="8"/>
  23. <RowDefinition Height="24"/>
  24. <RowDefinition Height="8"/>
  25. <RowDefinition Height="24"/>
  26. <RowDefinition Height="8"/>
  27. <RowDefinition Height="32"/>
  28. <RowDefinition Height="8"/>
  29. <RowDefinition Height="32"/>
  30. </Grid.RowDefinitions>
  31. <Grid.ColumnDefinitions>
  32. <ColumnDefinition Width="120"/>
  33. <ColumnDefinition Width="16"/>
  34. <ColumnDefinition/>
  35. </Grid.ColumnDefinitions>
  36. <TextBlock Grid.Row="0" Grid.Column="0" VerticalAlignment="Center">设备型号:</TextBlock>
  37. <TextBlock Grid.Row="0" Grid.Column="2" VerticalAlignment="Center" Text="{Binding TempDevice.DeviceModel}"></TextBlock>
  38. <TextBlock Grid.Row="2" Grid.Column="0" VerticalAlignment="Center">子型号:</TextBlock>
  39. <TextBlock Grid.Row="2" Grid.Column="2" VerticalAlignment="Center" Text="{Binding TempDevice.DeviceSubModel}"></TextBlock>
  40. <TextBlock Grid.Row="4" Grid.Column="0" VerticalAlignment="Center">网络地址:</TextBlock>
  41. <TextBlock Grid.Row="4" Grid.Column="2" VerticalAlignment="Center">
  42. <Run Text="{Binding TempDevice.IP}"/>
  43. <Run> : </Run>
  44. <Run Text="{Binding TempDevice.Port}"/>
  45. </TextBlock>
  46. <TextBlock Grid.Row="6" Grid.Column="0" VerticalAlignment="Center">设备名称:</TextBlock>
  47. <TextBox Grid.Row="6" Grid.Column="2" VerticalContentAlignment="Center" Text="{Binding TempDevice.DeviceName, Mode=TwoWay}"/>
  48. <TextBlock Grid.Row="8" Grid.Column="0" VerticalAlignment="Center">位置备注:</TextBlock>
  49. <TextBox Grid.Row="8" Grid.Column="2" VerticalContentAlignment="Center" Text="{Binding TempDevice.Position, Mode=TwoWay}"/>
  50. </Grid>
  51. <Grid Grid.Row="2" Margin="16,0">
  52. <Grid.ColumnDefinitions>
  53. <ColumnDefinition/>
  54. <ColumnDefinition Width="16"/>
  55. <ColumnDefinition/>
  56. </Grid.ColumnDefinitions>
  57. <Button Height="32" Background="Transparent"
  58. BorderBrush="{StaticResource ThemeColor}" TextElement.Foreground="{StaticResource ThemeColor}"
  59. Command="{Binding SaveDeviceCommand}">保存设备</Button>
  60. <Button Height="32" Grid.Column="2" Background="Transparent"
  61. BorderBrush="{StaticResource DisableColor}" TextElement.Foreground="{StaticResource DisableColor}"
  62. Command="{Binding CloseCommand}">返回</Button>
  63. </Grid>
  64. </Grid>
  65. </UserControl>