DishInfoUserControl.xaml 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <UserControl x:Class="ivf_tl_Manage.UserControls.DishInfoUserControl"
  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:ivf_tl_Manage.UserControls"
  7. xmlns:customControl="clr-namespace:ivf_tl_CustomControls;assembly=ivf_tl_CustomControls_PC"
  8. mc:Ignorable="d"
  9. FontFamily="{StaticResource sourceHan}"
  10. Width="348" Height="454"
  11. x:Name="_dishInfoUserControl">
  12. <Canvas>
  13. <Canvas.Background>
  14. <ImageBrush ImageSource="{Binding ElementName=_dishInfoUserControl,Path=HouseSource, Converter={StaticResource DishInfoOnlyHouseConvert}, ConverterParameter=CanvasBackground}"/>
  15. </Canvas.Background>
  16. <Rectangle IsHitTestVisible="False" x:Name="maskHouse" Panel.ZIndex="100" Width="318" Height="424" Fill="Black" Opacity="0" Margin="15" RadiusX="10" RadiusY="10"/>
  17. <Border Canvas.Left="15" Canvas.Top="15" Width="318" Height="56" CornerRadius="14 14 0 0" Background="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO.vip,Converter={StaticResource DishInfoUserOnlyVipConvert}, ConverterParameter=border}" >
  18. <Canvas Width="318" Height="56">
  19. <Image Canvas.Left="16" Canvas.Top="9" Width="34" Height="38" Source="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO, Converter={StaticResource DishInfoDataAndVipConvert}, ConverterParameter=DishHeadshot}"/>
  20. <TextBlock Canvas.Left="54" Canvas.Top="13" FontWeight="Medium" FontSize="20" MaxWidth="180" Foreground="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO, Converter={StaticResource DishInfoDataAndVipConvert}, ConverterParameter=DishName}" Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO.wifeShow}"/>
  21. <Rectangle RadiusX="0.75" RadiusY="0.75" Canvas.Left="260" Canvas.Top="13" Width="1.5" Height="30" Fill="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO.vip,Converter={StaticResource DishInfoUserOnlyVipConvert}, ConverterParameter=rectangle1}"/>
  22. <customControl:ButtonImage Canvas.Left="272" Canvas.Top="15" Width="26" Height="26" Click="Edit_Click"
  23. IconSource="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO.vip,Converter={StaticResource DishInfoUserOnlyVipConvert}, ConverterParameter=editButton}"
  24. MouseOverIconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/EditMouseOverIcon.png"
  25. Visibility="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO, Converter={StaticResource DishInfoDataAndVipConvert}, ConverterParameter=EditButton}"/>
  26. <customControl:ButtonImage Canvas.Left="272" Canvas.Top="15" Width="26" Height="26" Click="Add_Click"
  27. IconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/AddButtonIcon.png"
  28. MouseOverIconSource="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/AddButtonMouserOverIcon.png"
  29. Visibility="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO, Converter={StaticResource DishInfoDataAndVipConvert}, ConverterParameter=AddButton}"/>
  30. </Canvas>
  31. </Border>
  32. <Rectangle Canvas.Left="15" Canvas.Top="71" Width="318" Height="1.5" Fill="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO.vip,Converter={StaticResource DishInfoUserOnlyVipConvert}, ConverterParameter=rectangle2}"/>
  33. <Canvas MouseUp="_canvas_MouseUp" x:Name="_canvas" Canvas.Left="34" Canvas.Top="71" Width="280" Height="280">
  34. <Canvas.Background>
  35. <ImageBrush ImageSource="{Binding ElementName=_dishInfoUserControl,Path=HouseSource, Converter={StaticResource DishInfoOnlyHouseConvert}, ConverterParameter=Background}"/>
  36. </Canvas.Background>
  37. <!--<TextBlock Canvas.Left="148" Canvas.Top="111" FontWeight="Medium" FontSize="40" Foreground="#4D4D4D" Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSn}"/>-->
  38. </Canvas>
  39. <Grid Canvas.Left="34" Canvas.Top="71" Width="280" Height="280" IsHitTestVisible="False">
  40. <StackPanel VerticalAlignment="Center">
  41. <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontWeight="Medium" FontSize="40" Foreground="{Binding ElementName=_dishInfoUserControl,Path=HouseSource, Converter={StaticResource DishInfoOnlyHouseConvert}, ConverterParameter=HouseForeground}" Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSn}"/>
  42. <TextBlock FontWeight="Medium" Foreground="#4D75AC" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.cultureState,Converter={StaticResource Int0ToCollapsedConvert}}">
  43. <Run Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.HouseStateString1}"/><Run Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.HouseStateString2}"/>
  44. </TextBlock>
  45. </StackPanel>
  46. </Grid>
  47. <Rectangle Canvas.Left="15" Canvas.Top="351" Width="318" Height="1.5" Fill="#CFCFCF"/>
  48. <Image Canvas.Left="31" Canvas.Top="359" Width="32" Height="36" >
  49. <!--Source="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO, Converter={StaticResource DishInfoDataAndVipConvert}, ConverterParameter=StartTime}">-->
  50. <Image.Source>
  51. <MultiBinding Converter="{StaticResource DishInfoDataAndVipConvert1}" ConverterParameter="StartTime">
  52. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.embryoRecordVO"/>
  53. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.balanceVO"/>
  54. </MultiBinding>
  55. </Image.Source>
  56. </Image>
  57. <TextBlock Canvas.Left="65" Canvas.Top="364" FontWeight="Medium" FontSize="17"
  58. Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.StartTime}">
  59. <TextBlock.Foreground>
  60. <MultiBinding Converter="{StaticResource DishInfoDataAndVipConvert1}" ConverterParameter="DishInfo">
  61. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.embryoRecordVO"/>
  62. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.balanceVO"/>
  63. </MultiBinding>
  64. </TextBlock.Foreground>
  65. </TextBlock>
  66. <Image Canvas.Left="31" Canvas.Top="395" Width="32" Height="36" >
  67. <!--Source="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.embryoRecordVO, Converter={StaticResource DishInfoDataAndVipConvert}, ConverterParameter=FaYuTime}">-->
  68. <Image.Source>
  69. <MultiBinding Converter="{StaticResource DishInfoDataAndVipConvert1}" ConverterParameter="FaYuTime">
  70. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.embryoRecordVO"/>
  71. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.balanceVO"/>
  72. </MultiBinding>
  73. </Image.Source>
  74. </Image>
  75. <TextBlock Canvas.Left="65" Canvas.Top="400" FontWeight="Medium" FontSize="17" Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.FaYuTime}">
  76. <TextBlock.Foreground>
  77. <MultiBinding Converter="{StaticResource DishInfoDataAndVipConvert1}" ConverterParameter="DishInfo">
  78. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.embryoRecordVO"/>
  79. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.balanceVO"/>
  80. </MultiBinding>
  81. </TextBlock.Foreground>
  82. </TextBlock>
  83. <!--<Image Canvas.Left="210" Canvas.Top="359" Width="32" Height="36" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/HouseTemperatureIcon.png"/>-->
  84. <Image Canvas.Left="210" Canvas.Top="359" Width="32" Height="36">
  85. <Image.Source>
  86. <MultiBinding Converter="{StaticResource HouseInfoAlarmImageConvert}" ConverterParameter="HouseTemperature">
  87. <Binding ElementName="_dishInfoUserControl" Path="OnLine"/>
  88. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.temperatureAlarm"/>
  89. </MultiBinding>
  90. </Image.Source>
  91. </Image>
  92. <TextBlock Canvas.Left="244" Canvas.Top="364" FontWeight="Medium" Foreground="#4D4D4D" FontSize="17" Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.temperature,StringFormat={}{0:F2}℃}"/>
  93. <!--<Image Canvas.Left="210" Canvas.Top="395" Width="32" Height="36" Source="pack://application:,,,/ivf_tl_Manage;component/Resources/Images/HousePressureIcon.png"/>-->
  94. <Image Canvas.Left="210" Canvas.Top="395" Width="32" Height="36">
  95. <Image.Source>
  96. <MultiBinding Converter="{StaticResource HouseInfoAlarmImageConvert}" ConverterParameter="HousePressure">
  97. <Binding ElementName="_dishInfoUserControl" Path="OnLine"/>
  98. <Binding ElementName="_dishInfoUserControl" Path="HouseSource.pressureAlarm"/>
  99. </MultiBinding>
  100. </Image.Source>
  101. </Image>
  102. <TextBlock Canvas.Left="244" Canvas.Top="400" FontWeight="Medium" Foreground="#4D4D4D" FontSize="17" Text="{Binding ElementName=_dishInfoUserControl,Path=HouseSource.pressure,StringFormat={}{0:F0}mbar}"/>
  103. </Canvas>
  104. </UserControl>